fluttermtl/scaffolding-skills/app-architecture-scaffold
Claude Code and agent skill by fluttermtl/scaffolding-skills
- community
Checking that the SKILL.md file is still in the repository.
Lay down a feature-first, layered Flutter folder structure (presentation/domain/data) with get_it+injectable DI, auto_route wiring, abstract-interface repositories/datasources, domain error enums, and fpdart TaskEither at the usecase layer. Use this whenever setting up the architecture/folder structure of a Flutter app, organizing lib/ into layers or features, applying Clean Architecture, or right after `flutter create` and before adding Firebase services — so every feature and service lands in…
Install
npx vskill@latest install fluttermtl/scaffolding-skills/app-architecture-scaffoldSKILL.md
The same SKILL.md was published earlier as fluttermtl/scaffolding-skills/app-architecture-scaffold.
App Architecture Scaffold
Directory skeleton + conventions rest of series writes into. Feature-first outside, layered inside.
When to use
- Right after
flutter create. - Refactoring flat
lib/into layers.
Target structure
Steps
- Make tree:
``bash mkdir -p lib/core/{di,error,router,config} lib/shared/{widgets,extensions} mkdir -p lib/features/auth/{data,domain,presentation} ``
- Core primitives (see
examples/):
features/<f>/domain/*_error.dart— domain errorenum(e.g.enum AuthError { wrongPassword, network, unknown }).core/di/injector.dart— DI (get_it+injectable).
- Wire
app.dart→core/router/app_router.dart(auto_route). Presentation state =bloc/flutter_bloc. - Contracts =
abstract interface class. Repo interface indomain, impl indata; datasource interface + impl indata.
Rules
- One feature = one
features/folder. - Domain errors = enums. No message strings in domain — enum cases only.
- Repos + datasources: no fpdart. Plain
Future<T>; throw on failure. TaskEither<ErrorEnum, T>only at usecase layer — usecase wraps repo call, maps throws →Left(ErrorEnum.case).- Presentation translates the error enum → user text via localization (
AppLocalizations). No hardcoded error strings in UI. e.g.switch (err) { AuthError.wrongPassword => l10n.errWrongPassword, ... }. - Interfaces:
abstract interface class(repos, datasources).
Examples
Full auth vertical slice in examples/feature_auth/ — copy the shape per feature:
domain/auth_error.dart— domain error enum (no strings).domain/app_user.dart— framework-free entity.domain/auth_repository.dart—abstract interface class, plainFuture, throws.domain/sign_in_usecase.dart— the only fpdart layer;TaskEither<AuthError, AppUser>.data/firebase_auth_repository.dart— impl; Firebase types stay here, maps SDK → enum.presentation/auth_error_l10n.dart— enum → localized text (only place error strings live).
Related
- Prereq:
flutter createdone - Next: flavors-env-setup, firebase-emulators-setup
- Overlaps:
flutter-apply-architecture-best-practices,reactive-repository-generator - Localization (error translation):
flutter-setup-localization
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/app-architecture-scaffold/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/fluttermtl/scaffolding-skills/app-architecture-scaffold)