Skill idea
Add a Flutter skill for generating and updating Bloc/Cubit-based features.
The skill should help agents scaffold feature-first Flutter code using:
data/, logic/, and ui/ layers
- Cubit for command-style flows
- Bloc for event-heavy, stream-heavy, or transformer-based flows
- Freezed union states
- repository +
ApiResult<T> style result handling
- route-level
BlocProvider / MultiBlocProvider
- DI registration
- pagination patterns
- side-effect handling via listeners
- targeted tests
Why this is useful
Bloc/Cubit is common in production Flutter apps, but generated code is often too generic. A skill could guide agents to produce complete, repo-ready features instead of only isolated Cubit or Bloc classes.
Example prompts
- Create a new orders feature using Bloc with pagination and filters.
- Add a Cubit-based profile settings feature.
- Convert this screen to use Cubit with Freezed states.
- Add DI, routing, and tests for this feature.
- Decide whether this flow should use Bloc or Cubit.
Suggested behavior
The skill should:
- Ask for the feature name and app structure when unclear.
- Choose Cubit by default for linear command-style flows.
- Choose Bloc when there are multiple event types, streams, subscriptions, debounce, or complex transitions.
- Generate feature folders under a feature-first structure.
- Include state, logic, repository integration, UI provider wiring, and tests.
- Keep navigation, snackbars, dialogs, and overlays as listener-handled side effects.
- Avoid putting feature-local state into shared app/runtime owners.
Possible output
A complete feature scaffold including:
- model/repository files when needed
- Cubit or Bloc + Freezed state
- screen/widget integration
- DI registration instructions
- routing instructions
- tests
- build runner command
Related patterns
This is inspired by production Bloc/Cubit architecture where Cubit is the default, Bloc is used for event-heavy flows, dependencies are registered through DI, and route-level providers define feature scope.
Skill idea
Add a Flutter skill for generating and updating Bloc/Cubit-based features.
The skill should help agents scaffold feature-first Flutter code using:
data/,logic/, andui/layersApiResult<T>style result handlingBlocProvider/MultiBlocProviderWhy this is useful
Bloc/Cubit is common in production Flutter apps, but generated code is often too generic. A skill could guide agents to produce complete, repo-ready features instead of only isolated Cubit or Bloc classes.
Example prompts
Suggested behavior
The skill should:
Possible output
A complete feature scaffold including:
Related patterns
This is inspired by production Bloc/Cubit architecture where Cubit is the default, Bloc is used for event-heavy flows, dependencies are registered through DI, and route-level providers define feature scope.