iamantoniodinuzzo/claude-flutter/scaffold-feature

Claude Code and agent skill by iamantoniodinuzzo/claude-flutter

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Scaffold a new Flutter feature respecting clean architecture (feature-first), repository pattern with dependency inversion, Riverpod v3 DI, go_router navigation, structured logging, and explicit exception handling. Use when the user says they are starting a new feature, scaffolding feature folders, or kicking off feature implementation. Does NOT handle git, issues, or branches — those stay manual.

Install

npx vskill@latest install iamantoniodinuzzo/claude-flutter/scaffold-feature

SKILL.md

The same SKILL.md was published earlier as iamantoniodinuzzo/claude-flutter/scaffold-feature.

scaffold-feature

Runtime and resources

Use the current agent's native file, search, shell, and question tools; plain-text questions and direct sequential scans are valid fallbacks. Subagents are optional and require host permission. Bundled paths below are relative to this installed skill directory; application paths are relative to the target Flutter project. Resolve sibling skills through the installed skill registry (or sibling directories), never by assuming a skills/ folder in the application. If a required dependency is absent, name it and report the affected step as unavailable; never invent its rules or claim complete coverage.

Phase 1 — Socratic intake

Ask the user in one message (do not proceed until all answers are received):

  1. Scope: Top-level feature or sub-feature of an existing parent?
  • If sub-feature: which parent? (verify lib/src/features/<parent>/ exists on disk)
  1. Name: Short snake_case name for the feature.
  2. Purpose: One-line description of what this feature does.
  3. Design probes (tailor to the description):
  • What data sources does it touch? (Firestore / REST / local DB / none)
  • What is the navigation entry point? (deep link / tab / modal / nested route)
  • What is the primary state shape? (list / single entity / form / real-time stream)
  • What failures can the repository surface? (e.g. not-found, permission-denied, network)

Wait for the user's full answers before proceeding.


Phase 2 — Scaffold clean-architecture directories

Use the Write tool with empty .gitkeep content to create parent directories implicitly.

Top-level feature → lib/src/features/<name>/
lib/src/features/<name>/domain/entities/.gitkeep
lib/src/features/<name>/domain/repositories/.gitkeep
lib/src/features/<name>/domain/value_objects/.gitkeep
lib/src/features/<name>/domain/failures/.gitkeep
lib/src/features/<name>/data/datasources/.gitkeep
lib/src/features/<name>/data/models/.gitkeep
lib/src/features/<name>/data/repositories/.gitkeep
lib/src/features/<name>/data/mappers/.gitkeep
lib/src/features/<name>/application/providers/.gitkeep
lib/src/features/<name>/application/notifiers/.gitkeep
lib/src/features/<name>/application/states/.gitkeep
lib/src/features/<name>/presentation/screens/.gitkeep
lib/src/features/<name>/presentation/widgets/.gitkeep
lib/src/features/<name>/presentation/controllers/.gitkeep
Sub-feature → lib/src/features/<parent>/<name>/

Sub-features are UI-only. Domain, data, and application layers are provided by the parent feature.

lib/src/features/<parent>/<name>/presentation/screens/.gitkeep
lib/src/features/<parent>/<name>/presentation/widgets/.gitkeep
lib/src/features/<parent>/<name>/presentation/controllers/.gitkeep

Phase 3 — Load architectural context

Read the following files in parallel from inside this skill's own references/ folder.

Mandatory (always load)

Breaking changes — language and async safety

  • references/breaking/dart-language.md
  • references/breaking/dart-async-errors.md
  • references/breaking/riverpod-core.md
  • references/breaking/riverpod-async-mutations.md
  • references/breaking/riverpod-flutter.md

Architecture patterns

  • references/patterns/feature-creation.md
  • references/patterns/repository-pattern.md
  • references/patterns/exception-handling.md
  • references/patterns/go-router-navigation-conventions.md
  • references/patterns/async-notifier-command-api.md
  • references/patterns/riverpod-rebuild-optimization.md
  • references/patterns/no-ui-strings-outside-ui.md
  • references/patterns/widget-classes-no-build-helpers.md
  • references/patterns/flutter-side-effects.md

Logging standard

  • references/logging.md
Conditional (load only when Phase 1 answer matches)
ConditionFile
Primary state shape is real-time streamreferences/breaking/riverpod-streams-lifecycle.md

Internalize rules silently — do not echo back unless the user explicitly asks.


Phase 4 — Architecture contract

Print a compact contract derived from Phase 1 answers + the loaded references. Use this template, filling in every <…> from the intake answers:

Feature: <name> (<top-level> | <sub-feature of parent>)
Domain
- Entities: <e.g. Order, OrderItem>
- Repository iface: <Name>Repository
- Failures: <e.g. OrderFailure.notFound, OrderFailure.permissionDenied>
Data
- Source: <Firestore | REST endpoint | SQLite | none>
- Model: <Name>Model → toEntity() / fromJson()
- Repo impl: <Name>RepositoryImpl maps DataException → DomainFailure
Application
- Provider: <feature>Provider (extends Notifier<<State>>)
- State: <AsyncValue<T> | record | sealed class>
- Side effects: command pattern — mutation methods return Future<void>
Presentation
- Screen: <Feature>Screen (ConsumerWidget)
- Watches: ref.watch(<provider>.select(…)) — one .select() per field read
- Navigation: context.goNamed('<routeName>') (never push for deep-linkable routes)
Logging
- Logger naming: Logger('<feature>.domain'), Logger('<feature>.data'),
Logger('<feature>.application'), Logger('<feature>.presentation')
- Async errors: AsyncErrorLogger handles them — no manual try/catch in async providers
GoRouter notes (critical for web / deep-link targets)
- push() does NOT update browser URL in go_router v11.1.2+; use go/goNamed always
- AppBar default back button does not update GoRouter URL; override leading with
BackButton → context.goNamed(parentRoute) when query params or path segments must clear
- Multiple Scaffolds → consolidate into one outer Scaffold for unified back-button override

Ask the user to confirm or correct the contract before moving to implementation.


Phase 5 — Closing summary

✅ Scaffolded: lib/src/features/<[parent/]name>/
✅ Architecture loaded: 15 reference files (breaking + patterns + logging)
✅ Contract confirmed above — ready to implement
Next manual steps (not handled by this skill):
- gh issue create … (if issue not yet created)
- git start feature <n>_<name> (creates feature/<n>_<name> from develop)
- Implement layers: domain → data → application → presentation
- dart run build_runner build --build-filter="<path>" (after adding @riverpod / @JsonSerializable —
never with --delete-conflicting-outputs; see
ai_docs/FLUTTER_RULES.md)
- /unit-test (domain + application layer tests)
- gh issue close <N> (GitHub does NOT auto-close on PR merge)

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/iamantoniodinuzzo/claude-flutter/scaffold-feature/badge)](https://verified-skill.com/skills/iamantoniodinuzzo/claude-flutter/scaffold-feature)

Something wrong with this skill or its page? Tell us.