bloc-signals
Skill7 starsChanged 8 months agoMITView on GitHub
Implement, review, test, and migrate Dart and Flutter code that uses BlocSignal (bloc_signals, bloc_signals_flutter, bloc_signals_test), the BLoC-style API built on signals. Use this when the code imports package:bloc_signals, extends BlocSignal or CubitSignal, uses BlocSignalProvider, BlocSignalBuilder, BlocSignalListener, or context.select, or when the user asks how BlocSignal differs from flutter_bloc or wants to move from BLoC to synchronous signal-based state.
In this repository41 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- skill-creatorSkill
- flutter-dbSkill
- flutter-routingSkill
- flutter-state-managementSkill
- configuring-codemagicSkill
- applying-effective-dartSkill
- deploying-with-fastlaneSkill
- integrating-firebaseSkill
- implementing-fl-chartSkill
- integrating-google-adsSkill
- animating-flutter-widgetsSkill
- routing-with-autorouteSkill
- implementing-flutter-blocSkill
- configuring-deep-linksSkill
- persisting-data-with-driftSkill
- building-flutter-production-appsSkill
- generating-flutter-uiSkill
- routing-with-gorouterSkill
- managing-hive-storageSkill
- using-flutter-hooksSkill
- running-flutter-isolatesSkill
- managing-flutter-provider-stateSkill
- implementing-responsive-layoutsSkill
- implementing-riverpodSkill
- managing-secure-storageSkill
- flutter-setupSkill
- managing-shared-preferencesSkill
- implementing-flutter-social-authSkill
- flutter-testingSkill
- generating-freezed-modelsSkill
- configuring-github-actionsSkill
- building-jaspr-web-appsSkill
- testing-with-marionetteSkill
- implementing-openapi-in-dartSkill
- integrating-revenuecatSkill
- integrating-sentrySkill
- developing-serverpod-backendSkill
- building-shadcn-flutter-uiSkill
- integrating-supabaseSkill
- converting-ts-to-dartSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Read the consumer project's pubspec.yaml and pubspec.lock to find the bloc_signals version.
- Very specific: line 16
Check every type and member you plan to use against the installed source (package:bloc_signals/...).
- Distinctive: line 17
Read the matching reference below, then make the smallest change that keeps behavior.
- Very specific: line 30
Read raw values with stateValue (or value) inside methods and handlers.
- Very specific: line 33
Never create an effect or computed inside build.
- Very specific: line 43
Run flutter analyze and the nearest tests.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
BlocSignal
BlocSignal keeps the BLoC event model (events in, state out) on top of Rody Davis's signals v7 primitives. Its updates are synchronous: emit changes state immediately, with no stream and no microtask. It is young and its API can change, so verify against the installed package source before editing code.
Start from the installed package
- Read the consumer project's
pubspec.yamlandpubspec.lockto find thebloc_signalsversion. - Check every type and member you plan to use against the installed source (
package:bloc_signals/...). Do not assume parity withpackage:blocor Riverpod. - Read the matching reference below, then make the smallest change that keeps behavior.
Route the task
- references/core.md:
BlocSignal,CubitSignal,on<E>,emit,createEffect, equality, andclose. - references/flutter.md:
BlocSignalProvider,BlocSignalBuilder,BlocSignalListener,BlocSignalConsumer,BlocSignalSelector, andcontext.value/state/select. - references/testing.md:
blocSignalTest, synchronous assertions, and widget tests. - references/migration-from-bloc.md: moving from
flutter_bloc/blocto BlocSignal, and the differences that break code.
Contracts to preserve
- Constructors take named
initialState:. Write: super(initialState: 0), not: super(0). emitis synchronous, and it skips a value equal to the current state.addreturnsvoid. Synchronous handlers finish beforeaddreturns.close()is idempotent, disposes effects created withcreateEffect, and drops events after closure.- Read raw values with
stateValue(orvalue) inside methods and handlers.statereturns aReadonlySignalfor reactive bindings. BlocSignalProvider(create:)is lazy by default and owns its bloc.BlocSignalProvider.valuedoes not own it.context.watch<T>()tracks provider replacement, not state changes. UseBlocSignalBuilderto rebuild on state.- Never create an
effectorcomputedinsidebuild. Give it an explicit owner and a disposal path. - A global
BlocSignalObserveris a single slot. Compose observers instead of replacing them.
Packages
bloc_signals: core (pure Dart).bloc_signals_flutter: Flutter providers, builders, listeners, selectors.bloc_signals_test:blocSignalTesthelpers.- Optional:
bloc_signals_lint,bloc_signals_hydrate,bloc_signals_replay,bloc_signals_riverpod,bloc_signals_devtools,bloc_signals_jaspr.
Validation
Run flutter analyze and the nearest tests. The examples in these references were compiled and tested against bloc_signals 1.7.0, bloc_signals_flutter 1.5.0, and bloc_signals_test 1.0.3.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

