Flutter Riverpod State Management
andrewyng/context-hub
Guides Flutter state management with Riverpod: choosing provider types, wiring ConsumerWidgets, handling async state and lifecycle, and overriding providers in tests.
Best practices for Bloc state management in Flutter/Dart, covering Cubit versus Bloc, event and state naming, sealed classes with Equatable, the Page/View split with BlocProvider, BlocBuilder…
$ npx skills add VeryGoodOpenSource/vgv-ai-flutter-plugin --skill bloc -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install VeryGoodOpenSource/vgv-ai-flutter-plugin bloc --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/bloc .claude/skills/bloc && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "bloc" agent skill from https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin/tree/main/skills/bloc into .claude/skills/bloc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bloc", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin/tree/main/skills/blocType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add VeryGoodOpenSource/vgv-ai-flutter-plugin --skill bloc -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install VeryGoodOpenSource/vgv-ai-flutter-plugin bloc --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/bloc .agents/skills/bloc && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "bloc" agent skill from https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin/tree/main/skills/bloc into .agents/skills/bloc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bloc", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add VeryGoodOpenSource/vgv-ai-flutter-plugin --skill bloc -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install VeryGoodOpenSource/vgv-ai-flutter-plugin bloc --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/bloc .cursor/skills/bloc && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "bloc" agent skill from https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin/tree/main/skills/bloc into .cursor/skills/bloc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bloc", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin.git --path skills/bloc--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add VeryGoodOpenSource/vgv-ai-flutter-plugin --skill bloc -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install VeryGoodOpenSource/vgv-ai-flutter-plugin bloc --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/bloc .gemini/skills/bloc && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "bloc" agent skill from https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin/tree/main/skills/bloc into .gemini/skills/bloc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bloc", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install VeryGoodOpenSource/vgv-ai-flutter-plugin blocInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add VeryGoodOpenSource/vgv-ai-flutter-plugin --skill bloc -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/bloc .github/skills/bloc && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "bloc" agent skill from https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin/tree/main/skills/bloc into .github/skills/bloc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bloc", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add VeryGoodOpenSource/vgv-ai-flutter-plugin --skill bloc -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install VeryGoodOpenSource/vgv-ai-flutter-plugin bloc --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/bloc .opencode/skills/bloc && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "bloc" agent skill from https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin/tree/main/skills/bloc into .opencode/skills/bloc/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "bloc", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
blocBest practices for Bloc state management in Flutter/Dart, covering Cubit versus Bloc, event and state naming, sealed classes with Equatable, the Page/View split with BlocProvider, BlocBuilder…
Bloc is an agent skill from VeryGoodOpenSource/vgv-ai-flutter-plugin. Best practices for Bloc state management in Flutter/Dart, covering Cubit versus Bloc, event and state naming, sealed classes with Equatable, the Page/View split with BlocProvider, BlocBuilder, BlocListener, and BlocSelector. Use when writing, modifying, or reviewing code that uses package:bloc, package:flutterbloc, or package:bloctest. Also use for any test of a class that extends Bloc or Cubit, including "write the unit tests for this bloc", "test my cubit", "add tests for LoginBloc", mocking a repository a bloc…
Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `agents/openai.yaml`, `references/architecture.md` and `references/patterns.md`).
It sits in Mobile, covering Cross-platform mobile apps, State management and Unit testing. It works with Flutter and Dart. The repository describes itself as: AI plugin to enhance and accelerate Flutter & Dart development, built by Very Good Ventures. The licence is MIT.
Read from SKILL.md and the folder at commit 496a3c6. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadGlobGrepFrom allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are dart).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Bloc loads about 2k tokens when it runs, and up to ~5.3k if it reads all its reference files. Until then it costs about 250 tokens; SKILL.md has 550 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from VeryGoodOpenSource/vgv-ai-flutter-plugin at commit 496a3c6, republished under its MIT licence (© VeryGoodOpenSource). 550 words, ~1,996 tokens.
.claude/skills/bloc/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.State management library for Dart and Flutter using the BLoC (Business Logic Component) pattern to separate business logic from the presentation layer.
Apply these standards to all Bloc/Cubit work:
blocTest() from package:bloc_test for all Bloc and Cubit tests — never raw test() with manual stream assertionspackage:mocktail for mocking — never package:mockitobuild: constructs the bloc under test — return a new instance from the callback, never one built in setUp and shared, so every blocTest starts from a clean bloc and its lifecycle stays with blocTestBlocProvider, View consumes via BlocBuilder/BlocListenerswitchEquatable and override props for value equalityemit only inside the handler — call emit from the on<Event> callback or Cubit method that owns it, never from a stream subscription or callback that outlives the handlerclass const ProfileRequested(final String userId) extends ProfileEvent) rather than this.field; keep the classic form only below 3.13| Aspect | Cubit | Bloc |
|---|---|---|
| API | Functions → emit(state) | Events → on<Event> → emit(state) |
| Complexity | Low | Higher |
| Traceability | Less (no event log) | Full (events + transitions) |
| When to use | Simple state, UI-driven logic | Complex flows, event-driven, transforms |
| Testing | Call methods, assert states | Add events, assert states |
class CounterCubit extends Cubit<int> {
CounterCubit() : super(0);
void increment() => emit(state + 1);
void decrement() => emit(state - 1);
}sealed class CounterEvent extends Equatable {
const CounterEvent();
@override
List<Object> get props => [];
}
final class CounterIncrementPressed extends CounterEvent {}
final class CounterDecrementPressed extends CounterEvent {}
class CounterBloc extends Bloc<CounterEvent, int> {
CounterBloc() : super(0) {
on<CounterIncrementPressed>((event, emit) => emit(state + 1));
on<CounterDecrementPressed>((event, emit) => emit(state - 1));
}
}Pattern: BlocSubject + Noun + VerbPastTense
| Event class name | Meaning |
|---|---|
TodoListSubscriptionRequested | Subscribing to todo list stream |
TodoListTodoDeleted | Deleting a specific todo |
TodoListUndoDeletionRequested | Undoing the last deletion |
LoginFormSubmitted | Submitting the login form |
ProfilePageRefreshed | Refreshing the profile page |
sealed class TodoListEvent extends Equatable {
const TodoListEvent();
@override
List<Object> get props => [];
}
final class TodoListSubscriptionRequested extends TodoListEvent {}
final class const TodoListTodoDeleted({required final Todo todo})
extends TodoListEvent {
@override
List<Object> get props => [todo];
}Use when each state carries different data.
| State class name | Meaning |
|---|---|
LoginInitial | No action taken yet |
LoginInProgress | Login request in flight |
LoginSuccess | Login succeeded |
LoginFailure | Login failed |
sealed class LoginState extends Equatable {
const LoginState();
@override
List<Object> get props => [];
}
final class LoginInitial extends LoginState {}
final class LoginInProgress extends LoginState {}
final class const LoginSuccess({required final User user}) extends LoginState {
@override
List<Object> get props => [user];
}
final class const LoginFailure({required final String error})
extends LoginState {
@override
List<Object> get props => [error];
}Use when all states share the same data shape: one class holding a status enum plus the
data fields, with a copyWith for transitions. See
references/patterns.md for the full shape.
| Layer | Contains | Depends on |
|---|---|---|
| Presentation | Pages, Views, Widgets | Business Logic |
| Business Logic | Blocs, Cubits | Data |
| Data | Repositories, Data Providers | External sources |
Repositories abstract data sources and provide a clean API for Blocs/Cubits. Mirror the feature folder structure under test/ for all test files.
See references/architecture.md for the repository example, feature folder structure, and test directory layout.
Use BlocProvider to supply a Bloc or Cubit to a subtree, then BlocBuilder,
BlocListener, BlocConsumer, or BlocSelector to consume it. Reach for BlocSelector
when a rebuild should depend on one field rather than the whole state, and BlocListener
for side effects such as navigation or a snackbar.
The rule that matters: context.read in callbacks (onPressed, onTap),
context.watch or BlocBuilder in build. Never call context.watch outside a
build method.
BlocListener exampleblocTest() parameters, Cubit/Bloc test examples, mocking dependencies, widget integration tests© VeryGoodOpenSource, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (references) in skills/bloc of VeryGoodOpenSource/vgv-ai-flutter-plugin.
Open the folder on GitHubat commit 496a3c6
Bloc next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Bloc this skillVeryGoodOpenSource/vgv-ai-flutter-plugin | 169 | — | ~2k | Automated safety check: Pass | MIT | |
| Flutter Riverpod State Managementandrewyng/context-hub | 14k | — | ~1.1k | Automated safety check: Pass | MIT | |
| Flutter Dart Code Reviewaffaan-m/ECC | 275k | 2 repos | ~5.8k | Automated safety check: Notes | MIT | |
| Signals for Flutterrodydavis/signals.dart | 819 | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| Flutter Bloc and Cubitandrewyng/context-hub | 14k | — | ~998 | Automated safety check: Pass | MIT | |
| Dart Lifecycle Disposed Flag Overloaddivinevideo/divine-mobile | 266 | — | ~2k | Automated safety check: Pass | MPL-2.0 |
andrewyng/context-hub
Guides Flutter state management with Riverpod: choosing provider types, wiring ConsumerWidgets, handling async state and lifecycle, and overriding providers in tests.
affaan-m/ECC
Library-agnostic Flutter/Dart code review checklist covering widget best practices, state management patterns (BLoC, Riverpod, Provider, GetX, MobX, Signals), Dart idioms, performance…
rodydavis/signals.dart
Reference for the signals_flutter package: reactive signals, computed values, effects, async signals and collection signals bound to Flutter widgets.
andrewyng/context-hub
Helps choose between Bloc and Cubit in Flutter and sets defaults for packages, lifecycle, widget binding and tests.
divinevideo/divine-mobile
Fix Dart/Flutter services where calling start() after stop() is a silent no-op because stop() sets a disposed (or similar) flag that start()'s guard short-circuits on.
FNOSP/FlyNarwhal
A skill your agent uses when building cross-platform applications with Flutter 3+ and Dart.
VeryGoodOpenSource/vgv-ai-flutter-plugin
Audits or remediates Flutter widgets against WCAG 2.2 conformance levels A, AA, or AAA across iOS, Android, Web, macOS, Windows, and Linux, covering Semantics labels and screen reader output under…
VeryGoodOpenSource/vgv-ai-flutter-plugin
Best practices for Flutter animations using the built-in animation framework, covering implicit animations, explicit AnimationController animations, page transitions, and Material 3 motion tokens.
VeryGoodOpenSource/vgv-ai-flutter-plugin
VGV-specific reference for bumping Dart and Flutter SDK constraints across packages, covering pubspec.yaml environment constraints, CI workflow Flutter versions, and SDK upgrade PR preparation.
VeryGoodOpenSource/vgv-ai-flutter-plugin
Best practices for internationalization (i18n) and localization (l10n) in Flutter, using the built-in flutterlocalizations and intl setup with ARB files as the single source of truth.
VeryGoodOpenSource/vgv-ai-flutter-plugin
VGV layered monorepo architecture in Flutter: four layers Data, Repository, Business Logic, and Presentation, unidirectional dependency rules, and model transformation across layers.
VeryGoodOpenSource/vgv-ai-flutter-plugin
Best practices for Flutter theming with Material 3, treating ThemeData as the single source of truth for colors, typography, component styles, and spacing.
Categories
Best practices for Bloc state management in Flutter/Dart, covering Cubit versus Bloc, event and state naming, sealed classes with Equatable, the Page/View split with BlocProvider, BlocBuilder…. Bloc is an agent skill from VeryGoodOpenSource/vgv-ai-flutter-plugin. Best practices for Bloc state management in Flutter/Dart, covering Cubit versus Bloc, event and state naming, sealed classes with Equatable, the Page/View split with BlocProvider, BlocBuilder, BlocListener, and BlocSelector.
Bloc fits situations like: reviewing code that uses package:bloc; package:flutterbloc; package:bloctest; any test of a class that extends Bloc.
Run `npx skills add VeryGoodOpenSource/vgv-ai-flutter-plugin --skill bloc -a claude-code`. Or copy the skill folder (skills/bloc in VeryGoodOpenSource/vgv-ai-flutter-plugin) into .claude/skills/bloc in your project. Claude Code loads it when a task matches its description.
Run `npx skills add VeryGoodOpenSource/vgv-ai-flutter-plugin --skill bloc -a codex`. Or copy the skill folder (skills/bloc in VeryGoodOpenSource/vgv-ai-flutter-plugin) into .agents/skills/bloc in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add VeryGoodOpenSource/vgv-ai-flutter-plugin --skill bloc -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bloc, .gemini/skills/bloc, .github/skills/bloc and .opencode/skills/bloc in your project.
SKILL.md names no scripts, command-line tools or credentials: Bloc is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Glob, Grep.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Bloc is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.3k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Bloc: Flutter Riverpod State Management (andrewyng/context-hub, 14k stars), Flutter Dart Code Review (affaan-m/ECC, 275k stars), Signals for Flutter (rodydavis/signals.dart, 819 stars) and Flutter Bloc and Cubit (andrewyng/context-hub, 14k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
VeryGoodOpenSource (a GitHub organization) maintains it in VeryGoodOpenSource/vgv-ai-flutter-plugin, which has 169 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 6, 2026.
Source: VeryGoodOpenSource/vgv-ai-flutter-plugin on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.