flutter-architecture
Standardizes Flutter project structure using Clean Architecture principles to ensure maintainability.
Install
mkdir -p .claude/skills/flutter-architecture && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15601" && unzip -o skill.zip -d .claude/skills/flutter-architecture && rm skill.zipInstalls to .claude/skills/flutter-architecture
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
This skill is specialized in Flutter mobile application architecture, based on Clean Architecture, strict layer separation, low coupling, and high testability. Its purpose is to guide architectural decisions and validate architectural compliance across the codebase.Key capabilities
- →Build Flutter mobile applications
- →Apply Clean Architecture principles
- →Ensure low coupling between layers
- →Achieve high testability
- →Isolate features for framework independence
How it works
This skill guides the architectural decisions for Flutter mobile applications based on Clean Architecture principles, enforcing strict layer separation for domain, data, infrastructure, and presentation. It defines rules for state management, dependency injection, and routing.
Inputs & outputs
When to use flutter-architecture
- →Design app architecture
- →Enforce clean code layers
- →Improve testability
- →Separate data from ui
About this skill
Flutter Architecture
When to use
- When building a Flutter mobile application
- When following Clean Architecture principles
- When ensuring low coupling and high testability
- When isolating features for framework independence
Principles
- Separation of Concerns
- Clean Architecture
- Dependency Inversion
- Testability First
- Feature Isolation
- Framework Independence
Layers
-
Domain
- Contain pure business rules
- Must not depend on Flutter, packages or infrastructure
allowed:
- Entities
- Domain Services forbidden:
- Imports of Flutter
- Dependência of external packages
- UI or persistence logic
-
Data
- Define data access contracts
- Implement unitary use cases
allowed:
- UseCases
- Repository Interfaces
- DTOs that extend Entities rules:
- UseCases must be unique and focused classes
- Must not contain UI or framework logic
-
Infrastructure
- Implement technical details
- Adapt external packages to domain abstractions
allowed:
- HTTP adapters
- Storage adapters
- Network adapters
- Logger adapters
- Repository implementations rules:
- Must depend on abstractions
- Never expose external dependencies to upper layers
-
Presentation
- Render UI
- Manage state
- Orchestrate use cases
allowed:
- Pages
- Widgets
- Controllers
- States rules:
- Controllers must centralize state logic
- UI must not contain business rules
- Communication happens exclusively through UseCases
State Management
- Standard
- ValueNotifier
- NotifierController
rules:
- State must be as local as possible
- Controllers must not access infrastructure directly
- States must be immutable whenever possible
Dependency Injection
- Tool: provider
rules:
- Injection made in the infra/di layer
- Presentation never instantiates concrete dependencies
- Dependencies must be resolved by abstraction
Routing
- Tool: go_router
rules:
- Routes defined outside the UI
- Navigation must not contain business logic
- Controllers must not know route details
Directory Structure
- Rule: layer-first
Constraints:
- Each feature isolated in presentation
- No cross-feature references
- Domain and Data are shareable
Validation Checks
- Domain must not import Flutter
- Presentation must not access infra directly
- Infra depends only on abstractions
- UseCases must not know UI
- Controllers must not contain persistence logic
Output Expectations
- Modular and testable code
- Ease of architectural evolution
- Low coupling between layers
- Clarity of responsibilities
When not to use it
- →The task does not involve Flutter mobile application development
- →The task does not require Clean Architecture principles
Limitations
- →Domain must not depend on Flutter, packages or infrastructure
- →Presentation must not access infra directly
- →Controllers must not contain persistence logic
How it compares
This skill provides a structured framework for Flutter architecture with explicit rules for layer interaction and dependency management, promoting testability and maintainability beyond typical Flutter development practices.
Compared to similar skills
flutter-architecture side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| flutter-architecture (this skill) | 0 | 6mo | No flags | Advanced |
| mobile-state-management-patterns | 0 | 4mo | No flags | Intermediate |
| Liquid Galaxy Flutter Brainstormer | 0 | 6mo | No flags | Intermediate |
| flutter-development | 1,555 | 5mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
mobile-state-management-patterns
almasumdev
Comparison of mobile state management patterns (MVVM, MVI, TEA, Redux, BLoC, Observable, Compose state, SwiftUI state) and how to choose. Use when designing state flow or evaluating a state library.
Liquid Galaxy Flutter Brainstormer
Shaileshukla529
Transform ideas into validated designs. Engineering trade-offs, A/B decisions, feasibility checks.
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
flutter-expert
sickn33
Master Flutter development with Dart 3, advanced widgets, and multi-platform deployment. Handles state management, animations, testing, and performance optimization for mobile, web, desktop, and embedded platforms. Use PROACTIVELY for Flutter architecture, UI implementation, or cross-platform features.
mobile-games
davila7
Mobile game development principles. Touch input, battery, performance, app stores.
flutter
alinaqi
Flutter development with Riverpod state management, Freezed, go_router, and mocktail testing