Skip to content
Development
Skill

/flutter-feature-based-clean-architecture

Organize Flutter apps with modular feature-based clean architecture. Use when creating features under lib/features/ with domain, data, and presentation layers. Do not use for test-only, BlocBuilder, navigation, or spinner requests.

From plugin
agent-skills-standard
583200 skills21 agents33 commands1 MCP

Claude Code

$ npx -y skills add hoangnguyen0403/agent-skills-standard --skill flutter-feature-based-clean-architecture --agent claude-code

SKILL.md

flutter-feature-based-clean-architecture.SKILL.md
name: flutter-feature-based-clean-architecture
description: Organize Flutter apps with modular feature-based clean architecture. Use when creating features under lib/features/ with domain, data, and presentation layers. Do not use for test-only, BlocBuilder, navigation, or spinner requests.
metadata:
  triggers:
    files:
    - 'lib/features/**'
    keywords:
    - flutter feature
    - feature in flutter
    - flutter clean architecture
    - feature-based clean architecture
    - flutter domain layer
    - flutter presentation layer
    - lib/features
    - flutter architecture

Feature-Based Clean Architecture

**Priority: P0 (CRITICAL)**

Structure

Every feature lives in `lib/features/` with **3-layer separation** (domain/data/presentation):

  • `domain/` — Entities, failures, and Repository interfaces.
  • `data/` — DTOs, DataSource, and Repository implementations.
  • `presentation/` — BLoC/Cubit, pages, and widgets.

See [references/folder-structure.md](references/folder-structure.md) for complete directory blueprint.

Implementation Workflow

1. **Create feature directory** — Add new folder under `lib/features/` (e.g., `lib/features/promotions/`). 2. **Define domain layer** — Add entities, failures, and repository interfaces with zero external dependencies. 3. **Implement data layer** — Add DTOs, data sources, and repository implementations that depend only on Domain. 4. **Build presentation layer** — Add BLoC/Cubit, pages, and widgets that depend only on Domain. 5. **Enforce dependency rule** — `Presentation -> Domain <- Data`. Domain must zero external dependencies. 6. **Share cross-cutting logic** — Move reusable utilities to `lib/shared/` or `lib/core/`.

Feature Directory Example

See [implementation examples](references/implementation.md) for full directory tree and cross-feature import patterns.

Reference & Examples

For feature folder blueprints and cross-layer dependency templates: See [references/REFERENCE.md](references/REFERENCE.md).

Anti-Patterns

  • **No Cross-Feature Data Imports**: Only import Domain types across features
  • **No UI/Data in Domain Layer**: Never put UI or Data classes inside `domain/`
  • **No Nested Features**: Keep `lib/features/` flat with no sub-feature directories
  • **No Direct Repository Calls**: Use specific BLoCs or use-cases instead of calling other features' repositories directly from UI

Related Topics

layer-based-clean-architecture | retrofit-networking | go-router-navigation | bloc-state-management | dependency-injection

Read more
@hoangnguyen0403
Ships withagent-skills-standard

The portable standards layer for AI coding agents. Sync once, then work in your own runtime.

583200 skills21 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
583
Star history of hoangnguyen0403/agent-skills-standard on GitHub, a chart by star-history.com

Other skills on agent-skills-standard.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills13d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react4d252k
@facebook@facebookInstall Skill

Questions about flutter-feature-based-clean-architecture.

Which coding agents can use flutter-feature-based-clean-architecture?
flutter-feature-based-clean-architecture installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.