flutter-architecture
Skill106 starsChanged 7 months agoMITView on GitHub
Design, refactor, review, or implement Flutter app architecture using MVVM, layered UI/Data/optional Domain boundaries, feature-first or layer-first project structure, repositories, services, dependency injection, Result and Command patterns, offline-first or optimistic UI flows. Use when asked to add a Flutter feature, audit layer dependencies, fix cross-feature imports, migrate to feature-first, choose architecture for a Flutter project, or create scalable maintainable Flutter code organization.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- lubshad/skillstheir own version, first seen Nov 1, 2026
- thienqo/flutter-skillstheir own version, first seen Nov 1, 2026
- bryanus1/agent-skillstheir own version, first seen Nov 1, 2026
- gspencergoog/skillstheir own version, first seen Oct 16, 2026
- thiennc-tesoglobal/flutter-skillstheir own version, first seen Aug 30, 2026
- zakariaf/CatchLawtheir own version, first seen Aug 1, 2026
Used with
Projects with it also use flutter-performance and dart-concurrency.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
zakariafSkillflutter-performance
Enforces Flutter runtime performance — const subtrees, minimal rebuild scope via ref.watch(select), lazy ListView/GridView builders and slivers, sized image decode (cacheWidth/ResizeImage), heavy work off the UI isolate via compute/Isolate, surgical RepaintBoundary, dispose everything, and measurement in profile mode on a floor device. Use when optimizing UI, diagnosing jank or dropped frames, tuning long lists or images, reviewing rebuild/repaint scope, or when the task mentions const, select, ListView.builder, cacheWidth, compute, RepaintBoundary, AnimatedBuilder, DevTools, raster thread, or 60/120fps.
Also in 4 projects that use this
thiennc-tesoglobalSkilldart-concurrency
Design and debug Dart asynchronous infrastructure with Future, Stream, isolates, cancellation, and lifecycle-safe ownership. Use for races, stale results, background CPU work, stream leaks, or async error handling; not for routine form-local validation or submission unless its underlying ordering mechanism is the task.
Also in 3 projects that use this
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- zakariaf/Flutter-Skills★ 32same name
- thiennc-tesoglobal/flutter-skills★ 16same name
- thienqo/flutter-skills★ 16same name
- gspencergoog/skills★ 2same name
- lubshad/skills★ 1same name
- paurakhsharma/skills★ 1same name
- bryanus1/agent-skills★ 0same name
- sonhaicoder/haiclaudeskill★ 0same name
- zakariaf/CatchLaw★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- agents-md-generatorSkill
- dart-driftSkill
- flutter-adaptive-uiSkill
- flutter-animationsSkill
- flutter-driftSkill
- flutter-duit-bduiSkill
- flutter-internationalizationSkill
- flutter-navigationSkill
- flutter-networkingSkill
- flutter-testingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 13 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Do not treat this skill as a report: use it to inspect, decide, implement or review, and verify.
- Distinctive: line 31
Use feature-first for medium/large apps, team work, frequent feature changes, or clearly bounded business capabilities.
- Distinctive: line 33
Use layer-first for small apps, solo work, or simple CRUD flows.
- Distinctive: line 34
Use a Domain layer only for complex, reusable, or multi-repository business logic.
- Distinctive: line 36
Keep Views declarative and thin, ViewModels responsible for UI state and commands, Repositories as the single source of truth for app data, …
- Distinctive: line 51
Ask the user only when a high-impact decision cannot be inferred from the project:
- Distinctive: line 59
If the project is unavailable or is not a Flutter project, give an architecture plan or review based on the provided context, do not invent …
- Distinctive: line 65
Read only the references needed for the current task:
- Very specific: line 88
Do not add folders just to satisfy a diagram.
- Distinctive: line 93
Before finishing an implementation or review:
- Distinctive: line 95
Check that new imports respect the chosen feature/layer boundary.
- Distinctive: line 96
Check that ViewModels do not perform platform, file, or network I/O directly.
- Distinctive: line 97
Check that repositories remain UI-independent and service interactions are testable.
- Distinctive: line 99
Run the closest available validation:
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flutter Architecture
You are an architecture agent for Flutter apps. Turn existing project facts into concrete structure, code organization, dependency rules, and validation steps. Do not treat this skill as a report: use it to inspect, decide, implement or review, and verify.
Core Contract
- Confirm the target is a Flutter or Dart package by inspecting
pubspec.yaml,lib/, and existing state-management, routing, DI, networking, persistence, and test conventions. - Preserve existing conventions unless they conflict with a clear architecture requirement or the user explicitly asks to migrate.
- Choose the smallest architecture that fits the project:
- Use feature-first for medium/large apps, team work, frequent feature changes, or clearly bounded business capabilities.
- Use layer-first for small apps, solo work, or simple CRUD flows.
- Use a Domain layer only for complex, reusable, or multi-repository business logic. ViewModels may call Repositories directly for simple flows.
- Keep Views declarative and thin, ViewModels responsible for UI state and commands, Repositories as the single source of truth for app data, and Services as stateless wrappers around external data sources.
- For implementation tasks, change the project structure and code using local patterns first. Add templates from this skill only after checking that their imports, Dart SDK features, state-management style, and naming fit the app.
- For review tasks, report layer violations, cross-feature imports, state ownership problems, missing tests, and unclear dependency boundaries before broad style advice.
- Validate with the repo's normal commands. Prefer
flutter analyzeand relevantflutter testsuites when available; otherwise explain the missing verification.
Clarification Rules
Ask the user only when a high-impact decision cannot be inferred from the project:
- product boundary of a new feature;
- expected scale of team or app when structure choice is ambiguous;
- offline-first, sync, or conflict-resolution requirements;
- whether a migration should be incremental or all-at-once.
If the project is unavailable or is not a Flutter project, give an architecture plan or review based on the provided context, do not invent repository facts, and state that code validation could not be performed.
Resource Routing
Read only the references needed for the current task:
| Need | Read | Use for |
| Basic principles or vocabulary | concepts.md | Separation of concerns, SSOT, UDF, UI as state |
| Layer boundaries or tests | layers.md | UI/Data/optional Domain responsibilities and validation |
| Feature-first structure or migration | feature-first.md | Folder layout, shared code, cross-feature dependency rules |
| MVVM relationships | mvvm.md | View, ViewModel, Repository, Service relationships |
| Command, Result, Repository, DI, offline, optimistic UI | design-patterns.md | Pattern selection and code examples |
| Command template | command.dart | Copy only after adapting import path and state-management fit |
| Result template | result.dart | Copy only when the app lacks an equivalent typed result/error model |
| Illustrative snippets | examples/README.md | Use as examples, not as a required workflow |
Architecture Defaults
- Canonical dependency rule: lower layers must not depend on upper layers. ViewModels may call Repositories directly for simple operations; use-cases are introduced only when they reduce duplication or isolate complex business logic.
- Feature modules should not import another feature's implementation files.
Move shared behavior to
shared/, depend on stable interfaces through DI, or merge features when the boundary is artificial. - Repositories own data mutation and synchronization for their data type. Services should stay stateless and should not own business state.
- Do not add folders just to satisfy a diagram. Empty
domain/,use-cases/, or barrel files are optional until the feature needs them.
Validation
Before finishing an implementation or review:
- Check that new imports respect the chosen feature/layer boundary.
- Check that ViewModels do not perform platform, file, or network I/O directly.
- Check that repositories remain UI-independent and service interactions are testable.
- Run the closest available validation:
flutter analyze- focused
flutter testsuites for changed features - template-only validation with
dart format --output=none --set-exit-if-changedfor copied Dart assets
- Report commands run, failures, skipped checks, and residual architecture risks.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

