Core
Generate core infrastructure for Flutter apps. Creates theme system (AppColors, AppTheme), router (GoRouter), services (SecureStorage, SharedPrefs, Supabase), error handling (Failures), and providers. Run after /init, before /auth.From its SKILL.md
npx -y skills add launch52-ai/flutter-template --skill coreAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 4 commands, including `mkdir -p lib/core/{constants,errors,network,router,navigation,services,theme,utils,widgets}` and 3 more.
SKILL.md
5.5 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
Core - Infrastructure Generation
Generates the core infrastructure that all features depend on.
When to Use This Skill
- After
/initcompletes - Before adding any features or
/auth - Setting up app-wide infrastructure
- User asks to "generate core", "create infrastructure", or "setup theme/router"
What This Skill Creates
lib/app.dart- Root app widget with MaterialApp.routerlib/core/theme/- AppColors, AppTypography, AppThemelib/core/router/- GoRouter configurationlib/core/services/- SecureStorage, SharedPrefs, Supabase, iOS network permissionlib/core/errors/- Typed failures and exceptionslib/core/constants/- App constants, legal URLs, storage keys, debug flagslib/core/network/- Dio client (if custom API)lib/core/navigation/- StatefulShellRoute (if bottom nav)lib/core/providers.dart- Core Riverpod providers
Workflow
Phase 1: Gather Requirements
Use AskUserQuestion to confirm settings from /init:
- Primary Color (hex, from /init or ask)
- Theme Mode (light/dark/both)
- Use Supabase? (from /init)
- Use Custom API? (from /init)
- Bottom Navigation? (yes/no - determines shell creation)
- Privacy Policy URL? (can be placeholder, required before release)
- Terms of Service URL? (can be placeholder, required before release)
Phase 2: Create Directory Structure
mkdir -p lib/core/{constants,errors,network,router,navigation,services,theme,utils,widgets}
mkdir -p lib/features
Phase 3: Generate Files
Copy from reference/ directories and customize:
| Category | Files | Notes |
|---|---|---|
theme/ | app_colors, app_typography, app_theme | Customize primary color |
services/ | secure_storage, shared_prefs, ios_network_permission | Always |
services/ | supabase_service | If Supabase = yes |
network/ | dio_client | If Custom API = yes |
router/ | app_router | Customize routes |
navigation/ | main_shell | If bottom nav = yes |
errors/ | failures, exceptions | Always |
constants/ | app_constants, legal_constants, storage_keys, debug_constants | Always |
utils/ | legal_utils | Always |
| root | providers.dart | Customize based on services |
Note: ios_network_permission_service.dart triggers the iOS permission dialog early to prevent first API call failures.
Phase 10: Generate App Widget
Copy reference/app.dart and customize with theme/router.
Phase 11: Update main.dart
Replace placeholder with actual App():
import 'app.dart';
runApp(const ProviderScope(child: App()));
Phase 12: Verify
dart run build_runner build --delete-conflicting-outputs
flutter analyze
Reference Files
| Directory | Content |
|---|---|
reference/theme/ | AppColors, AppTypography, AppTheme |
reference/router/ | GoRouter setup |
reference/navigation/ | StatefulShellRoute scaffold |
reference/services/ | Storage, Supabase, iOS permission services |
reference/network/ | Dio client with interceptors |
reference/errors/ | Failure types, exceptions |
reference/constants/ | App constants, legal URLs, storage keys, debug flags |
reference/utils/ | Legal URL utilities |
reference/ | app.dart, providers.dart |
Guides
This skill is code-heavy with all templates in reference/. No separate guides needed.
Related guidance from other skills:
| Topic | See |
|---|---|
| Architecture patterns | .claude/skills/plan/architecture.md |
| Color usage (contrast, dark mode) | /design → visual-guide.md |
| Typography sizes & hierarchy | /design → visual-guide.md |
| Color contrast requirements | /a11y → semantics-guide.md |
| Text scaling accessibility | /a11y → testing-guide.md |
Quick Reference
AppColors.primary; AppTheme.light(); // Theme
context.go('/dashboard'); context.push('/profile'); // Router
ref.watch(secureStorageProvider).write('key', 'value'); // Secure storage
ref.watch(sharedPrefsProvider).setBool('onboarded', true); // Shared prefs
triggerIOSNetworkPermission(); // iOS permission (call in main.dart)
Next Steps
After /core:
/auth- Add authentication feature/feature-init dashboard- Initialize dashboard scaffold/i18n- Add localization
Checklist
-
lib/app.dartcreated with MaterialApp.router -
lib/core/theme/has AppColors, AppTypography, AppTheme -
lib/core/router/app_router.dartconfigured -
lib/core/services/has required services -
lib/core/services/ios_network_permission_service.dartcreated -
lib/core/errors/failures.darthas typed failures -
lib/core/constants/has storage keys, legal URLs, and debug flags -
lib/core/utils/legal_utils.dartcreated -
lib/core/providers.dartexports all providers -
main.dartupdated to use App() -
main.dartcallstriggerIOSNetworkPermission()early -
build_runnerexecuted successfully -
flutter analyzepasses
Related Skills
/init- Run before core (project setup)/auth- Run after core (authentication)/feature-init- Initialize feature scaffolds after core/design- UI patterns reference
What ships with it: 23 files
66.7 KB alongside SKILL.md
reference/
- app.dart1.2 KB
- constants/app_constants.dart1005 B
- constants/debug_constants.dart1.8 KB
- constants/legal_constants.dart953 B
- constants/storage_keys.dart1.7 KB
- errors/exceptions.dart2.0 KB
- errors/failures.dart3.0 KB
- navigation/main_shell.dart3.3 KB
- network/dio_client.dart5.0 KB
- providers.dart3.3 KB
- router/app_router.dart5.0 KB
- services/ios_network_permission_service.dart2.1 KB
- services/secure_storage_service.dart1.7 KB
- services/shared_prefs_service.dart2.6 KB
- services/supabase_service.dart1.7 KB
- theme/app_colors.dart5.4 KB
- theme/app_theme.dart7.9 KB
- theme/app_typography.dart6.9 KB
- utils/legal_utils.dart1.6 KB
- utils/validators.dart3.4 KB
- widgets/debug_menu.dart2.5 KB
- widgets/empty_state.dart1.5 KB
- widgets/loading_button.dart1.1 KB