FL

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.zip

Installs 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.
266 charsno explicit “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

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

You give it
a Flutter mobile application development task
You get back
architectural guidance and validation for a Flutter application

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.

SkillInstallsUpdatedSafetyDifficulty
flutter-architecture (this skill)06moNo flagsAdvanced
mobile-state-management-patterns04moNo flagsIntermediate
Liquid Galaxy Flutter Brainstormer06moNo flagsIntermediate
flutter-development1,5555moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry