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 flutter-architecturegit 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/flutter-architecture)<a href="https://agentmods.dev/skills/zakariaf/flutter-skills/flutter-architecture"><img src="https://agentmods.dev/badge/skills/zakariaf/flutter-skills/flutter-architecture.svg" alt="Measured on agentmods" 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.00176 | $0.04255 |
| Opus 5 | $0.00088 | $0.02128 |
| Sonnet 5 | $0.00035 | $0.00851 |
| Haiku 4.5 | $0.00018 | $0.00426 |
Grade A, and why
flutter-architecture 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 8d 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 — 266 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Flutter Architecture
Structure every Flutter app as a layered, feature-first MVVM system, sized to the app. You must always answer "where does this code belong?" in one second. Based on Flutter's official Guide to app architecture, with Riverpod 3.x as the one mechanism for both state and dependency injection.
Two failure modes kill an architecture: under-structure (a widget touching a database) and
over-structure (a *UseCase wrapping one repository call, an interface over code that already runs in
a test). This skill fights both. Start small; add a layer only when it carries a load you can name.
Read the reference for the task at hand:
references/module-and-layers.md— the layer model, folder-vs-package continuum, the DAG, barrels, feature-folder anatomy, and the "when multi-package (workspace)" note.references/right-sizing.md— the reject-over-engineering table, "abstract only what you can't test", and how architecture scales with app size.references/state-di-riverpod.md— provider graph, keepAlive vs autoDispose, placeholder-override composition root, isolate-safe factories,ProviderContainertests.
Run scripts/check_architecture.sh before opening a PR.
Non-negotiable rules
- Answer "where does this belong?" in one second. Group by feature first, layer second. No
giant app-wide
screens/,models/, orwidgets/bucket — those smear one feature across the tree and force a name lookup on every edit. - Two layers minimum: UI and Data. A domain/use-case layer only when logic spans multiple
repositories (projection, aggregation, a multi-step workflow). A
*UseCasethat forwards one repository call is a rename, not a boundary — Flutter's own guidance rates the domain layer conditional and says most apps don't need it. - Abstract exactly what cannot run in a test — name what the abstraction makes testable. A
platform channel, network client, or plugin that can't execute in
flutter testearns an interface + a fake. Code that already runs headless (an in-memory DB, a pure calculator, a repository over it) stays concrete. "It's cleaner" is not a load; if you can't name the seam it buys, don't add it. - Data flows one way; never skip or reverse a hop. Data down:
Service → Repository → ViewModel → View. Events up:View → ViewModel → Repository. A widget calls its ViewModel only; a ViewModel calls repositories only. No two-way binding, no widget reaching a data source. - The View is dumb. A View does layout,
if/switchon state, animation, and navigation — nothing else. No business logic, no formatting/number math, notry/catch, no data access. If a widget computes or fetches, it's in the wrong layer. - One ViewModel per feature, over immutable state. The ViewModel holds private mutable state
and exposes intent methods (
load(),add(...)); every transition assigns a new immutable value with value equality. No public setters, no mutable field the UI edits in place. - Repositories are the single source of truth AND the single write path. Every mutation is one named repository method that persists first, then publishes (one transaction where the store supports it). Never persist-after-publish — a crash in between credits state that never saved.
- Derive, don't store. Counts, totals, streaks, filtered lists are computed from the source of truth (a stream/derived provider), never a second stored counter that can drift out of sync.
- Map at the boundary; keep domain types out of the edges. Repositories map storage rows / JSON
DTOs → immutable domain value objects. A generated Drift row or a
Mapnever reaches a ViewModel or widget; unit math and locale formatting never happen in a widget. - Inject through providers; depend on the abstraction where it earns one. No globals, no
singletons, no service locator reached from a widget, no
DateTime.now()outside an injectedClock. A composition root wires the object graph once. - Features are FOLDERS; foundations become PACKAGES only when a compile wall is load-bearing. Default to a single package. A feature never imports another feature — share via a foundation layer or navigate by route ID. The dependency graph is a strict downward-only DAG.
- Errors are typed values at boundaries. Repositories/use-cases return a sealed
Result/Failurerather than throwing across a layer; the UI switches exhaustively. Seeerror-handling-typed-results.
What ships with it
6 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.
- 8d ago First seen · 266 lines · 176 tokens per session scan A 0da4b8a86f39
flutter-architecture is a skill published in the GitHub repository zakariaf/Flutter-Skills (2 stars, last pushed 10d ago), licensed MIT. It adds 176 tokens to every session and 4,255 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.
quality-engineering-appium-mcp
Drives iOS/Android mobile devices via Appium MCP. Use for verifying mobile bugs, E2E tests, and navigating real device clouds (LambdaTest/BrowserStack).