Download for MacApple silicon, macOS 14+
Skill

bloc

@verygoodopensource Updated 2026-10-20

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:flutter_bloc, or package:bloc_test. 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 depends on, and asserting the states an event emits. Bloc and Cubit tests must use blocTest() from package:bloc_test with package:mocktail, so prefer this over the testing skill whenever the class under test is a Bloc or Cubit. Also use when a request pushes against these rules, such as injecting one bloc into another to read its state, calling a repository from a widget or build method, or keeping a Cubit for a feature that needs an event transformer such as debounce.

a11yaibest-practicesblocclaude-codedartflutteri18n

Install

With your agent

Install OMGSkills skill "verygoodopensource/vgv-ai-flutter-plugin:skills/bloc" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.

Manual command

git clone https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin /tmp/vgv-ai-flutter-plugin && ln -s /tmp/vgv-ai-flutter-plugin/skills/bloc ~/.claude/skills/bloc

From README

Bloc State management library for Dart and Flutter using the BLoC (Business Logic Component) pattern to separate business logic from the presentation layer. --- Core Standards Apply these standards to all Bloc/Cubit work: Use blocTest() from package:bloctest for all Bloc and Cubit tests — never raw test() with manual stream assertions Use package:mocktail for mocking — never package:mockito build: constructs the bloc under test — return a new instance from the callback, never one built in and shared, so every blocTest starts from a clean bloc and its lifecycle stays with blocTest No bloc-to-bloc direct dependencies — blocs communicate through the UI or shared repositories Page/View separation — Page provides the Bloc/Cubit via BlocProvider, View consumes via BlocBuilder/BlocListener Sealed classes for events and multi-state types — enables exhaustive pattern matching with Dart 3 switch Equatable for all states and events — extend Equatable and override props for value equality...