agentsclimarketplace

Flutter feature based clean architecture

Skill ComeOnOliver/skillshub/skills/HoangNguyen0403/agent-skills-standard/flutter-feature-based-clean-architecture

🧠 The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.

Install
npx -y skills add ComeOnOliver/skillshub --skill flutter-feature-based-clean-architecture

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

Feature-based clean architecture standards. ALWAYS consult when creating or modifying any file under lib/features/ β€” new features, domain entities, repositories, data sources, or screens. (triggers: lib/features/**, feature, domain, infrastructure, application, presentation)

SKILL.md

2.4 KB, 453 tokens by cl100k_base, as published. Nobody here has run it

Feature-Based Clean Architecture

Priority: P0 (CRITICAL)

Standard for modular Clean Architecture organized by business features in lib/features/.

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 for the complete directory blueprint.

Implementation Guidelines

  • Feature Encapsulation: Keep all logic, models, and UI internal to the feature directory (e.g., lib/features/promotions/).
  • Strict Layering: Maintain domain/data/presentation separation within each feature.
  • Dependency Rule: Presentation -> Domain <- Data. Domain must have zero external dependencies.
  • Cross-Feature Communication: Features only depend on the Domain layer of other features. Ensure there are no cross-feature presentation or data imports.
  • Flat features: Keep lib/features/ flat; avoid nested features.
  • No DTO Leakage: Never expose DTOs or Data Sources to UI or other features; return Domain Entities.
  • Shared logic: Move cross-cutting concerns to lib/shared/ or lib/core/.

Reference & Examples

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

Anti-Patterns

  • ❌ import '…/features/orders/data/models/order_dto.dart' from another feature β€” only import Domain types across features
  • ❌ lib/features/orders/domain/widgets/ β€” never put UI or Data classes inside Domain
  • ❌ lib/features/orders/sub_orders/ β€” keep lib/features/ flat; no nested feature directories
  • ❌ Calling another feature's repository directly from Presentation β€” route through that feature's BLoC or use-case

Related Topics

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

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 327,069. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.