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 skills add zakariaf/Flutter-Skills --skill service-boundary-and-nativegit clone --depth 1 https://github.com/zakariaf/Flutter-SkillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/zakariaf/flutter-skills/service-boundary-and-native)<a href="https://agentmods.dev/skills/zakariaf/flutter-skills/service-boundary-and-native"><img src="https://agentmods.dev/badge/skills/zakariaf/flutter-skills/service-boundary-and-native/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/zakariaf/flutter-skills/service-boundary-and-native"><img src="https://agentmods.dev/badge/skills/zakariaf/flutter-skills/service-boundary-and-native.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00188 | $0.04215 |
| Opus 5 | $0.00094 | $0.02107 |
| Sonnet 5 | $0.00038 | $0.00843 |
| Haiku 4.5 | $0.00019 | $0.00421 |
Grade A, and why
service-boundary-and-native 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 228 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Service boundary and native
Every platform capability — reading "now", sharing, logging an event, fetching remote flags, calling a MethodChannel — crosses the app's layers as an injected interface. The interface names value types only; the concrete SDK lives in exactly one class; the composition root (main) wires one live impl; tests wire a deterministic fake. Abstract exactly what cannot run in a test — nothing more. This is the seam that keeps features pure, SDKs swappable, and the whole app testable headlessly.
Read the reference for the task at hand:
references/service-interface.md— typed outcomes vs bool/throw, exhaustiveness,@useResult, hand-written env-fakes, the arrow-callback Future-drop hole, single write path.references/native-channels.md— MethodChannel placement, the cross-language contract ownership table, versioned-file-vs-shared_preferencestraps, native-fast-path independence, the round-tripintegration_test.references/multi-flavor.md— line-for-line composition roots, build flavors over runtime detection, per-flavor plugin pins, the banned-dependency CI graph gate.
Run scripts/check-service-boundaries.sh and scripts/check-flavor-graph.sh before a PR.
Non-negotiable rules
- Every side effect is an injected interface, never a concrete SDK at the call site. Features, Notifiers, and repositories depend on the interface; the app imports the real SDK in exactly one live-impl class. WHY: one seam to swap, one place to quarantine platform quirks, zero SDK reach into pure code.
- Abstract only what cannot run in
flutter test. One interface + one real impl + one fake = justified. One interface + one impl + no fake = delete the interface. WHY: interfaces "for symmetry" are dead weight that hide where the real risk (untestable I/O) is. - Interface signatures reference value types only. Name a
DateTime, a domain value object, a sealed outcome — never a plugin type, never adart:iosymbol. WHY: keeps the interface nameable from any layer and the SDK confined to one class. - Every method returns a typed result — failure is control flow, not a swallowed exception. Model a cancel, an empty fetch, an unavailable target as a sealed outcome or
Result<T, F extends Failure>, never a thrown-and-forgotten exception. WHY: Dart requires nothrowsdeclaration, so an unhandled failure silently vanishes. Seeerror-handling-typed-resultsfor theResult/Failurespine. - The provider throws
UnimplementedErroruntil overridden — the provider IS the DI. Noget_it, no service locator, no second container, no business logic in the provider body. WHY: a forgotten wiring becomes a loud startup failure instead of silent null data or a live SDK opening at import. - Wire exactly one live impl per interface at the composition root.
main(per flavor) is the only place a live SDK is constructed;app.dartand every widget below are wiring-blind. WHY: the composition root is the single seam where the real world is chosen. - Tests install a hand-written fake that honours the contract — fakes over mocks. The fake's failure path must be reachable; a fake that always succeeds is a happy-path lie.
implements(notextends) so a new interface method breaks the build. WHY: a passing test must reflect real behaviour, including the failure it exists to guard. - The clock is injected via
clockProvider(aClockfrompackage:clock) — "now" has exactly one source. NoDateTime.now()/math.Random()reachable from a view, Notifier, repository, or pure core; feature code readsref.read(clockProvider).now(), pure core takes aClockor the ambientclock. Never a bespokeClockService/SystemClock. WHY: this is what makes date/streak/expiry logic deterministic by overriding withClock.fixed(...). Seevalue-objects-money-and-unitsfor the injectedClock. - A mutating service feeds the single write path — persist before publish. A service that changes durable state is consumed by a repository method that commits (one transaction) before any state republishes. WHY: a crash mid-flow must never leave "acknowledged but not durable".
- Every MethodChannel lives under one
lib/native/directory; nothing else creates one. A channel born inside a widget, repository, or Notifier is a defect regardless of how well it works. WHY: platform channels are the least testable code in the app and must be found in one place. - A cross-language shared format is a versioned contract with one owner per side, edited on both sides in the same commit, and proven by an
integration_test. WHY: no compiler, analyzer, or unit test catches a renamed key across the language boundary — only a real round-trip does.
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 11d ago First seen · 228 lines · 188 tokens per session scan A 2831477998bc
service-boundary-and-native is a skill published in the GitHub repository zakariaf/Flutter-Skills (2 stars, last pushed 13d ago), licensed MIT. It adds 188 tokens to every session and 4,215 once invoked, about $0.0009 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-31.
Other skills, from other repositories
common-store-changelog
Generate user-facing release notes for the App Store and Google Play from git history (App Store <=4000 chars, Google Play <=500). Use when generating release notes, app store changelog, play store release, or "what's new" text for a mobile app.
android-navigation-3
Install and migrate to Jetpack Navigation 3. Use when implementing Navigation 3 patterns including NavDisplay, NavKey routes, deep links, multiple backstacks, scenes (dialogs, bottom sheets), or migrating from Navigation 2.
flutter-auto-route-navigation
Implement typed routing, nested routes, and auth guards using autoroute in Flutter. Use when the task explicitly uses autoroute or its generated router; defer generic deep-link setup and other routing libraries.
flutter-dependency-injection
Configure service locator setup using injectable and getit in Flutter. Use when wiring dependency injection with getit or injectable.
flutter-getx-state-management
Implement reactive state with GetX controllers, bindings, and observables in Flutter. Use when managing app state with GetxController, Obx, GetBuilder, or dependency lifecycle—not unit tests for existing controllers.
accessibility
Audits or remediates Flutter widgets against WCAG 2.2 conformance levels A, AA, or AAA across iOS, Android, Web, macOS, Windows, and Linux, covering Semantics labels and screen reader output under VoiceOver and TalkBack, touch target sizes, dragging alternatives, focus order and keyboard navigation, color contrast…