This skill may not reflect the latest upstream change
Next.js Releases update on 2026-11-09 may affect this skill Last checked Nov 25, 2026.
flutter-architecture
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.
Install this skill
No account required. Pick your tool, or use the command that detects it for you.
Run in your terminal. It detects your AI tool.
npx @skills-hub-ai/cli install flutter-dart-skills-flutter-architectureManual setup by platform
Claude Code
~/.claude/skills/flutter-dart-skills-flutter-architecture/SKILL.md
Signing
SignedSLSA L2- Signed by
- skills-hub.ai distributor
- Method
- Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
- Key
- skills-hub-ed25519-2026-11
- Signed
Instructions
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.
- Use feature-first for medium/large apps, team work, frequent feature
- 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 toshared/, 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.
Security
Reviews (0)
Related skills
Browse all →More from Flutter/Dart Skills
View source →More Build skills
Browse category →Frequently asked questions about flutter-architecture
What does the flutter-architecture skill do?
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. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the flutter-architecture skill?
Run `npx @skills-hub-ai/cli install flutter-dart-skills-flutter-architecture` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/flutter-dart-skills-flutter-architecture/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does flutter-architecture work with?
flutter-architecture runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the flutter-architecture skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use flutter-architecture after installing it?
In Claude Code, type `/flutter-dart-skills-flutter-architecture` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the flutter-architecture skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.