Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/flutter/agent-plugins/dart-use-ffigennpx skills add flutter/agent-plugins --skill dart-use-ffigengit clone --depth 1 https://github.com/flutter/agent-pluginsWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00061 | $0.02684 |
| Opus 5 | $0.00030 | $0.01342 |
| Sonnet 5 | $0.00012 | $0.00537 |
| Haiku 4.5 | $0.00006 | $0.00268 |
Grade A, and why
dart-use-ffigen scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- dart-use-ffigen — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Generating FFI Bindings using package:ffigen
Contents
- Introduction
- Constraints
- FFIgen Overview
- Step-by-Step Workflow
- Concrete Example: Binding a C Library
- Verification Checklist
Introduction
Automate and standardize the generation of FFI bindings using package:ffigen (FfiGenerator). Writing FFI bindings by hand is error-prone, brittle, and highly discouraged.
Constraints
- No Hand-Written FFI Bindings: If native headers (
.hfiles) exist or are generated by a build step, never write manualDynamicLibrary.lookup,@Nativeexternal functions, or raw struct classes. Always useFfiGeneratorto generate them. - Generator Location: The generator script should be located at
tool/ffigen.dartwithin the target package root. - Header Location: If the native header files are third-party, they should be located in
third_party/within the target package (otherwise placing them in asrc/directory at the package root is also acceptable). If the headers are not in one of these standard locations, notify the user that it would be cleaner to move the header files to the standard location (e.g.,third_party/). - Targeted Inclusion Filters: Avoid importing an entire native library unless specifically needed. Always apply precise inclusion lists using positive matches to minimize the size and cognitive load of the generated code (e.g., using
Functions.includeSetor filtering matches inincludeclosures). - Output Setup: If the generated FFI bindings interface with a third-party library (or reference third-party headers), the generated files must always be placed under
lib/src/third_party/. The primary generated FFI bindings file must strictly use the.g.dartextension (e.g.sqlite3.g.dart). - Preamble & License Headers: Always supply a premium
preamblein theOutputclass to specify the license. This must match the native third-party library's license, explicitly include the copyright header of the target native header file, and contain an automatic generation warning (e.g.// Generated by package:ffigen. Do not edit manually.). - No Unnecessary Commits of Stale Bindings: Ensure you run the generator script and check if the generated files have changed before finishing your task. Always verify the package by running
dart analyze. - Record Usage and Tree Shaking: If the package is integrated into standard runtime execution or compiles native assets via native hooks:
- Enable recorded usage on all functions by setting
recordUse: (_) => trueunderFunctions. - Specify the
recordUseMappingtarget inOutput(which must strictly be a.g.dartfile underlib/src/third_party/, e.g.lib/src/third_party/sqlite3.record_use_mapping.g.dart) to register bindings for symbol tree shaking.
- Enable recorded usage on all functions by setting
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 219 lines · 61 tokens per session scan A 129ae526e854
dart-use-ffigen is a skill published in the GitHub repository flutter/agent-plugins (2,895 stars, last pushed 4d ago), licensed BSD-3-Clause. It adds 61 tokens to every session and 2,684 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
orca-emulator-android
Control an Android emulator / device from inside Orca using the orca CLI. Use for listing/booting AVDs, taps, swipes, typing, hardware buttons (incl. Back and Recents), rotation, app install/launch, runtime permissions, the accessibility tree, and logcat — driving a real adb-connected device or emulator.…
android-tombstone-symbolication
Symbolicate the .NET runtime frames in an Android tombstone file. Extracts BuildIds and PC offsets from the native backtrace, downloads debug symbols from the Microsoft symbol server, and runs llvm-symbolizer to produce function names with source file and line numbers. USE FOR triaging a .NET MAUI or Mono Android app…
git-safety
Git safety rules. INVOKE WHEN: git push, force push, git reset, git clean, destructive git, push force, reset hard. NEVER force push or do destructive git operations.
dogfood
Systematically explore and test a mobile app on iOS/Android with agent-device to find bugs, UX issues, and other problems. Use when asked to dogfood, QA, exploratory test, find issues, bug hunt, or test this app on mobile.
release
Cut a sim-use release end-to-end. Use when the user runs /release or asks to "ship a release", "publish a version", "cut a release", or "release to homebrew". Drives scripts/local-release.sh; never reimplement its build/sign/tarball logic.
android-pentest
安卓应用渗透测试 — APK分析、Hook、自动化测试、运行态驱动、签名恢复、抓包分析.