npx skills add ...
npx skills add madteacher/mad-agents-skills --skill 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.
npx skills add madteacher/mad-agents-skills --skill 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.
pubspec.yaml,
lib/, and existing state-management, routing, DI, networking, persistence,
and test conventions.flutter analyze and
relevant flutter test suites when available; otherwise explain the missing
verification.Ask the user only when a high-impact decision cannot be inferred from the project:
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.
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 |
shared/, depend on stable interfaces through DI, or
merge features when the boundary is artificial.domain/, use-cases/,
or barrel files are optional until the feature needs them.Before finishing an implementation or review:
flutter analyzeflutter test suites for changed featuresdart format --output=none --set-exit-if-changed for copied Dart assets