This skill instructs agents how to automate generation of Dart FFI bindings using package:ffigen instead of hand-writing dart:ffi boilerplate. It codifies constraints and a recommended workflow: generator location (tool/ffigen.dart), header/third_party paths, precise inclusion filters, output to lib/src/third_party/*.g.dart, and adding preamble/license and recordUse mapping for tree-shaking. It includes example generator code and verification steps (dart analyze, path rules).
Use when a task involves creating or updating FFI bindings for C/Objective-C/Swift libraries in Dart packages, when migrating away from manual DynamicLibrary lookups, or when ensuring generated bindings follow license and tree-shaking requirements. Do NOT use for unrelated Dart tasks or for editing generated files manually.
Inferred compatibility: developer-assistant agents that can run Dart tooling or produce code snippets for engineers (e.g., Copilot/GitHub Copilot-style, code-focused assistants)
This skill has not been reviewed by our automated audit pipeline yet.