flutter-bloc-state-management

flutter-bloc-state-management is a skill for Claude Code, Codex from HoangNguyen0403/agent-skills-standard. It costs 52 tokens per session (790 once invoked), scanned A, original, MIT.

A guide to BLoC and Cubit, Flutter patterns for managing application state through events, state changes, and UI updates. It covers asynchronous work, errors, cancellation, and tests.

In plain words
What is it for?
Use it to define events and states, connect state to widgets, handle asynchronous data, cancel outdated searches, and test BLoC behavior.
Why use it?
It helps keep feature logic predictable and testable instead of scattering loading, success, and error behavior across widgets.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to define events and states, connect state to widgets, handle asynchronous data, cancel outdated searches, and test BLoC behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hoangnguyen0403/agent-skills-standard/flutter-bloc-state-management
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HoangNguyen0403/agent-skills-standard --skill flutter-bloc-state-management
Clone the repo
git clone --depth 1 https://github.com/HoangNguyen0403/agent-skills-standard

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for flutter-bloc-state-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoangnguyen0403/agent-skills-standard/flutter-bloc-state-management/github.svg)](https://agentmods.dev/skills/hoangnguyen0403/agent-skills-standard/flutter-bloc-state-management)
Your own site
<a href="https://agentmods.dev/skills/hoangnguyen0403/agent-skills-standard/flutter-bloc-state-management"><img src="https://agentmods.dev/badge/skills/hoangnguyen0403/agent-skills-standard/flutter-bloc-state-management/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for flutter-bloc-state-management

Your own site · 80×15
<a href="https://agentmods.dev/skills/hoangnguyen0403/agent-skills-standard/flutter-bloc-state-management"><img src="https://agentmods.dev/badge/skills/hoangnguyen0403/agent-skills-standard/flutter-bloc-state-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 790 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.00790
Opus 5 $0.00026 $0.00395
Sonnet 5 $0.00010 $0.00158
Haiku 4.5 $0.00005 $0.00079

Measured 9d ago against content hash ed07a0377c12, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

flutter-bloc-state-management scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/flutter/flutter-bloc-state-management/SKILL.md · 73 lines

How it starts

The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.

BLoC State Management

Priority: P0 (CRITICAL)

Role: Flutter State Management Expert. Design predictable, testable state flows.

State Design Workflow

  1. Define Events: What happens? (UserTap, ApiSuccess). Use @freezed.
  2. Define States: What needs to show? (Initial, Loading, Data, Error).
  3. Implement BLoC: Map Events to States using on<Event>.
  4. Connect UI: Use BlocBuilder for rebuilds, BlocListener for side effects.

Implementation Guidelines

  • States & Events: Use @freezed for union types (e.g., Initial, Loading, Success, Failure states).
  • Error Handling: Emit Failure states for UI-critical errors. For silent/background events, either let exceptions propagate naturally to global onError interceptor (e.g., in AppBlocObserver), or catch and call addError(e, st) without emitting error state.
  • Async Data: Use emit.forEach for streams or await with emit call.
  • Concurrency: Use transformer: restartable() from bloc_concurrency for search/typeahead to debounce and cancel previous requests.
  • UI Connectivity: Use BlocBuilder for UI rebuilds (e.g., loading spinner, data list, error message) and BlocListener for side effects (navigation, snackbars).
  • Testing: Use blocTest for ALL states and verify sequence of emitted states.

Verification Checklist (Mandatory)

  • Initial State: Defined and tested?
  • Test Coverage: blocTest used for ALL states?
  • UI Logic: No complex calculation in BlocBuilder?
  • Side Effects: Navigation/Snackbars in BlocListener (NOT Builder)?

Anti-Patterns

  • No .then(): Use await or emit.forEach() to emit.
  • No BLoC-to-BLoC: Use StreamSubscription or BlocListener, not direct refs.
  • No Logic in Builder: Move valid logic to BLoC.
  • No BlocBuilder without buildWhen: Heavy subtrees must declare buildWhen predicate to prevent unnecessary rebuilds.

Verification

  • Every BLoC has blocTest covering Initial → Loading → Success and Initial → Loading → Failure.
  • Side effects (navigation, snackbars) use BlocListener, not BlocBuilder.
  • Heavy BlocBuilder widgets declare buildWhen.
  • flutter test passes.

Read the full file on GitHub · 73 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 73 lines · 52 tokens per session scan A ed07a0377c12

Subscribe to this mod's changes

flutter-bloc-state-management is a skill published in the GitHub repository HoangNguyen0403/agent-skills-standard (565 stars, last pushed today), licensed MIT. It adds 52 tokens to every session and 790 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

writing-tests

How to write a Kiro Crew backend test that has NO side effects and does not flake. Use when adding, editing, reviewing, or debugging a pytest test in the Kiro Crew source repo: which conftest is under your file, what leaks (temp dirs, the real data home, /.kiro, cron, threads, child processes), how to tell which of…

kirodotdev/KiroCrew · 123 tokens

mobile-automation

Control Android and iOS devices, emulators and simulators — launch apps, tap, swipe, type, take screenshots, read the accessibility tree. Use when a task involves a mobile device or app, mobile UI testing, or reproducing a bug on a phone.

mobile-next/mobile-mcp · 58 tokens

maui-unit-testing

Add MAUI app tests around ViewModels, services, platform abstractions, and unit/integration/device boundaries. USE FOR: xUnit, avoiding MauiProgram.CreateMauiApp in unit tests, fakes/mocks, injectable Essentials interfaces, PlatformNotSupportedException, navigation/data services, AppProjectReference, device-test…

dotnet/maui-labs · 84 tokens

rn-testing

This skill should be used when the user asks to "write a Maestro test", "create E2E flows", "add testIDs", "run UI tests", "run E2E tests", "verify a feature works", "test my screen", "set up maestro-runner", "mock network requests", "inspect store state", "write test assertions", or needs guidance on test timing…

Lykhoyda/rn-dev-agent · 106 tokens

capturing-proof

This skill should be used when the user asks to "capture proof", "record a demo of this feature", "make a video showing it works", "record the flow for the PR", "generate a PR body", "capture screenshots for the PR", "proof-capture", or when a verified feature needs PR-ready proof artifacts (video + numbered…

Lykhoyda/rn-dev-agent · 105 tokens

ios-testing

Testing patterns for Swift and SwiftUI apps.

TalissonVitorino/kmp-ios-skills · 69 tokens