31 skills · 85 min
Skills
Skill 19 of 31
Architects a Flutter application using the recommended layered approach (UI, Logic, Data).
2 minutes · 421 words · 12 sections
Install
npx skills add flutter/agent-plugins --skill flutter-apply-architecture-best-practicesnpx skills add flutter/agent-plugins/plugin marketplace add flutter/agent-pluginsThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
Enforce strict Separation of Concerns by dividing the application into distinct layers. Never mix UI rendering with business logic or data fetching.
Implement the MVVM (Model-View-ViewModel) pattern to manage UI state and logic.
ChangeNotifier (or use Listenable) to expose state. Expose immutable state snapshots to the View. Inject Repositories into ViewModels via the constructor.Implement the Repository pattern to isolate data access logic and create a single source of truth.
Result wrappers.Organize the codebase using a hybrid approach: group UI components by feature, and group Data/Domain components by type.
lib/
├── data/
│ ├── models/ # API models
│ ├── repositories/ # Repository implementations
│ └── services/ # API clients, local storage wrappers
├── domain/
│ ├── models/ # Clean domain models
│ └── use_cases/ # Optional business logic classes
└── ui/
├── core/ # Shared widgets, themes, typography
└── features/
└── [feature_name]/
├── view_models/
└── views/Follow this sequential workflow when adding a new feature to the application. Copy the checklist to track progress.
freezed or built_value.ChangeNotifier. Inject required Repositories/Use Cases. Expose immutable state and command methods.ListenableBuilder or AnimatedBuilder to listen to ViewModel changes.provider or get_it).// 1. Service (Raw API interaction)
class ApiClient {
Future<UserApiModel> fetchUser(String id) async {
// HTTP GET implementation...
}
}
// 2. Repository (Single source of truth, returns Domain Model)
class UserRepository {
UserRepository({required ApiClient apiClient}) :
// 3. ViewModel (State management and presentation logic)
class ProfileViewModel extends ChangeNotifier {
ProfileViewModel({required UserRepository userRepository})
: _userRepository = userRepository;
final UserRepository _userRepository;
Architects a Flutter application using the recommended layered approach (UI, Logic, Data). Use when structuring a new project or refactoring for scalability.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
main, last pushed 17 September 2026.SKILL.md, not by matching a directory convention. 2 distinct layouts observed: .agents/agents/reidbaker-agent/skills/*/SKILL.md, skills/*/SKILL.md.h1 and no skipped levels:.claude-plugin/marketplace.json by Dart and Flutter Team, declaring 1 plugin. It is read for editorial metadata only — never as the skill index, which is always the repository tree./flutter/agent-plugins.md, and each skill at its own .md URL.