Flutter architecture
Skill Neznakometz/StackForge/mobile/skills/flutter-architecture
Thin core + domain sets for a fast, stack-aware project start. Cross-agent (Claude Code, Cursor, Codex, Gemini) via the SKILL.md standard. MIT.
npx -y skills add Neznakometz/StackForge --skill flutter-architectureAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Architecture and state management for a Flutter app on Riverpod 3. Apply when building features, screens, providers, repositories, and for any "where should this logic go" question in a Flutter project.
SKILL.md
1.9 KB, as published. Nobody here has run it
Flutter + Riverpod 3 — architecture
Grounded in the official Flutter guide (layered + MVVM) and the Riverpod 3 docs.
Rule details — knowledge pack flutter-riverpod (loaded into CLAUDE.md at /init).
Layers
- UI:
View(widgets, zero business logic) +ViewModel(=Notifier/AsyncNotifierprovider, one per feature/screen). - Data:
Repository(single source of truth, domain models, cache/retry) +Service(wrapper over a single source, stateless). - Domain (optional): use-cases — only when the logic combines multiple repositories or is reused.
- Feature-first structure:
lib/features/<feature>/= view + viewmodel + repositories; shared code inlib/core/, data inlib/data/.
State (strict)
- Providers —
@riverpodcodegen. State holders —Notifier/AsyncNotifier. Do not useStateProvider/StateNotifier(legacy). ref.watchinbuild;ref.readin callbacks;ref.listenfor side effects. Optimize rebuilds withselect(), notread.- autoDispose by default (codegen). Long-lived —
@Riverpod(keepAlive: true). - Async — via
AsyncValue+AsyncValue.guard; the UI handles a sealedswitch(data/error/loading). Afterawait—ref.mounted. - State — Freezed classes (immutable,
copyWith).
Pre-code check
- Where does the logic go? UI → ViewModel(Notifier); data → Repository; source → Service.
- Provider with parameters — without
family, parameters passed directly,==consistent. - The widget does not touch data directly — only through the ViewModel provider.
- Run the gates:
dart analyze(riverpod_lint),dart format. See theflutter-testingskill for tests.