
Flutter
Keep Flutter/Dart work aligned to Riverpod, Freezed, go_router, and mocktail testing conventions in this bootstrap layout.
Overview
Flutter is an agent skill for the Build phase that steers Flutter/Dart changes toward Riverpod, Freezed, go_router, and mocktail testing in a layered lib/ structure.
Install
npx skills add https://github.com/alinaqi/claude-bootstrap --skill flutterWhat is this skill?
- Clean architecture folders: core, data, domain, and presentation with feature-scoped modules
- Riverpod providers for state and feature screens wired through go_router in core/router
- Freezed models in data/models and repository interfaces in domain
- mocktail-oriented testing patterns under test/ alongside pubspec-driven dependencies
- Auto-invoked on **/*.dart, pubspec.yaml, lib/**, and test/** paths with medium effort
- Path triggers cover lib/**, test/**, **/*.dart, and pubspec.yaml
Adoption & trust: 615 installs on skills.sh; 691 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Agent edits to Flutter code drift across state management, routing, and folder layout because there is no shared convention for your mobile repo.
Who is it for?
Indie developers maintaining a Flutter app in this claude-bootstrap structure who want automatic path-based guidance on every Dart edit.
Skip if: Native-only iOS/Android projects without Flutter, or teams standardized on Bloc, Provider-only, or unrelated routing libraries who will not adopt this stack.
When should I use this skill?
When working on Flutter/Dart code (paths: **/*.dart, pubspec.yaml, lib/**, test/**).
What do I get? / Deliverables
Dart changes follow the bootstrap’s core/data/domain/presentation layout with Riverpod providers, go_router routes, and test-friendly patterns.
- Feature screens and widgets under presentation/features
- Riverpod providers and go_router route entries
- Freezed data models and repository-aligned data layer code
Recommended Skills
Journey fit
Flutter UI and app architecture work belongs in Build when you are implementing the mobile product surface. Frontend is the canonical shelf because the skill governs presentation layers, routing, theme, and feature modules under lib/presentation.
How it compares
A project-convention skill for one Flutter stack—not a generic mobile CI or app-store launch playbook.
Common Questions / FAQ
Who is Flutter for?
Solo builders and small teams using this bootstrap’s Flutter repo who want agents to follow Riverpod, Freezed, and go_router conventions on Dart files.
When should I use Flutter?
Whenever you edit Flutter/Dart code, pubspec.yaml, lib/**, or test/** during the Build frontend phase— the skill is user-invocable false and triggers from those paths.
Is Flutter safe to install?
Check the Security Audits panel on this Prism page; the skill is documentation and structure guidance without declaring extra privileged tools beyond your agent defaults.
SKILL.md
READMESKILL.md - Flutter
# Flutter Skill --- ## Project Structure ``` project/ ├── lib/ │ ├── core/ # Core utilities │ │ ├── constants/ # App constants │ │ ├── extensions/ # Dart extensions │ │ ├── router/ # go_router configuration │ │ │ └── app_router.dart │ │ └── theme/ # App theme │ │ └── app_theme.dart │ ├── data/ # Data layer │ │ ├── models/ # Freezed data models │ │ ├── repositories/ # Repository implementations │ │ └── services/ # API services │ ├── domain/ # Domain layer │ │ ├── entities/ # Business entities │ │ └── repositories/ # Repository interfaces │ ├── presentation/ # UI layer │ │ ├── common/ # Shared widgets │ │ ├── features/ # Feature modules │ │ │ └── feature_name/ │ │ │ ├── providers/ # Riverpod providers │ │ │ ├── widgets/ # Feature-specific widgets │ │ │ └── feature_screen.dart │ │ └── providers/ # Global providers │ ├── main.dart │ └── app.dart ├── test/ │ ├── unit/ # Unit tests │ ├── widget/ # Widget tests │ └── integration/ # Integration tests ├── pubspec.yaml ├── analysis_options.yaml └── CLAUDE.md ``` --- ## Riverpod State Management ### Provider Types ```dart // Simple value provider final appNameProvider = Provider<String>((ref) => 'My App'); // StateProvider for simple mutable state final counterProvider = StateProvider<int>((ref) => 0); // NotifierProvider for complex state logic final userProvider = NotifierProvider<UserNotifier, User?>(() => UserNotifier()); // AsyncNotifierProvider for async operations final usersProvider = AsyncNotifierProvider<UsersNotifier, List<User>>( () => UsersNotifier(), ); // FutureProvider for simple async data final configProvider = FutureProvider<Config>((ref) async { return await ref.watch(configServiceProvider).loadConfig(); }); // StreamProvider for real-time data final messagesProvider = StreamProvider<List<Message>>((ref) { return ref.watch(messageServiceProvider).watchMessages(); }); // Family providers for parameterized data final userByIdProvider = FutureProvider.family<User, String>((ref, userId) async { return await ref.watch(userRepositoryProvider).getUser(userId); }); ``` ### Notifier Pattern ```dart @riverpod class Users extends _$Users { @override Future<List<User>> build() async { return await _fetchUsers(); } Future<List<User>> _fetchUsers() async { final repository = ref.read(userRepositoryProvider); return await repository.getUsers(); } Future<void> refresh() async { state = const AsyncLoading(); state = await AsyncValue.guard(() => _fetchUsers()); } Future<void> addUser(User user) async { final repository = ref.read(userRepositoryProvider); await repository.addUser(user); ref.invalidateSelf(); } } ``` ### AsyncValue Handling ```dart class UsersScreen extends ConsumerWidget { const UsersScreen({super.key}); @override Widget build(BuildContext context, WidgetRef ref) { final usersAsync = ref.watch(usersProvider); return usersAsync.when( data: (users) => UsersList(users: users), loading: () => const Center(child: CircularProgressIndicator()), error: (error, stack) => ErrorDisplay( error: error, onRetry: () => ref.invalidate(usersProvider), ), ); } } // Pattern matching a