From flutter-riverpod-architecture
Clean Architecture patterns for Flutter with Riverpod state management. Use when building or reviewing Flutter apps with layered architecture (Domain, Data, Application, Presentation).
How this skill is triggered — by the user, by Claude, or both
Slash command
/flutter-riverpod-architecture:flutter-riverpod-architectureThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill provides architectural patterns and rules for building Flutter applications using Clean Architecture with Riverpod for state management. Follow these patterns to maintain clear layer boundaries, testability, and scalability.
This skill provides architectural patterns and rules for building Flutter applications using Clean Architecture with Riverpod for state management. Follow these patterns to maintain clear layer boundaries, testability, and scalability.
┌─────────────────────────────────────────┐
│ Presentation Layer │ Flutter UI, Widgets, Routing
├─────────────────────────────────────────┤
│ Application Layer │ Riverpod Providers, State Management
├─────────────────────────────────────────┤
│ Data Layer │ Repositories, External APIs
├─────────────────────────────────────────┤
│ Domain Layer │ Entities, Value Objects, Business Rules
└─────────────────────────────────────────┘
| Layer | Can Depend On | Cannot Depend On |
|---|---|---|
| Domain | Nothing (pure Dart) | Flutter, Riverpod, Firebase, any SDK |
| Data | Domain | Flutter, Riverpod, Presentation |
| Application | Domain, Data | Flutter UI classes |
| Presentation | Application, Domain | Data (direct access) |
| Layer | Primary Purpose | Key Technology |
|---|---|---|
| Domain | Business entities, Value Objects | Freezed, pure Dart |
| Data | Repository implementations, API calls | Firebase, HTTP clients |
| Application | State management, Provider definitions | Riverpod, AsyncNotifier |
| Presentation | UI components, routing | ConsumerWidget, go_router |
references/domain-layer.md - Freezed entities, Value Objects, immutable datareferences/data-layer.md - Repository pattern, dependency injectionreferences/application-layer.md - Riverpod providers, AsyncNotifier patternreferences/presentation-layer.md - ConsumerWidget, type-safe routingreferences/ui-patterns.md - Widget composition, anti-patternslib/
├── app/
│ ├── route/ # go_router configuration
│ └── providers/ # App-wide providers
├── features/
│ └── {feature}/
│ ├── domain/ # Entities, Value Objects
│ ├── data/ # Repositories
│ ├── application/ # Providers, Notifiers
│ └── presentation/# Screens, Widgets
└── shared/
├── domain/ # Shared entities
├── data/ # Shared repositories
└── widgets/ # Shared UI components
references/domain-layer.mdreferences/data-layer.mdreferences/application-layer.mdreferences/presentation-layer.mdreferences/ui-patterns.md# Verify Domain layer purity
grep -r "package:flutter" lib/features/*/domain/
grep -r "riverpod" lib/features/*/domain/
# Verify Data layer isolation
grep -r "package:flutter" lib/features/*/data/
grep -r "riverpod" lib/features/*/data/
# Verify Presentation doesn't access Data directly
grep -r "features/.*/data/.*_repository" lib/features/*/presentation/
All commands should return empty results if architecture is properly maintained.
npx claudepluginhub xmgrex/ccx-arsenal --plugin flutter-riverpod-architectureProvides expert Flutter/Dart patterns for cross-platform mobile apps including feature-first project structure, const widget best practices, and Riverpod/Bloc state management.
Builds cross-platform Flutter apps with state management (Riverpod/Bloc), GoRouter navigation, custom widgets, animations, and performance optimization.
Provides production-ready Dart/Flutter patterns for null safety, state management (BLoC, Riverpod, Provider), GoRouter navigation, Dio networking, Freezed code generation, and testing.