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.5 $0.00021 $0.00316
Sonnet 5.5 $0.00010 $0.00158
Haiku 4.5 $0.00005 $0.00079

Measured 1mo ago against content hash ed07a0377c12, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (582 stars, last pushed today), licensed MIT. It adds 52 tokens to every session and 790 once invoked, about $0.0002 per session on Opus 5.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

Kiro Crew repo only: how to write a backend pytest test with NO side effects that does not flake. Use when adding, editing, reviewing or debugging a test there: which conftest applies, what leaks (temp dirs, data home, /.kiro, cron, threads), the seven flake classes, cross-platform traps.

kirodotdev/KiroCrew · 72 tokens

dashboard-template

Kiro Crew repo only: load this when a task will author or change a dashboard page. A page never ships alone: the same PR carries its TypedDict contract, its provider, and a parity test that the two agree. Scaffold all four from one field list; read numbers from an existing fold, never type them.

kirodotdev/KiroCrew · 68 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

test-triage

Use before writing, adding, or modifying any unit test in this repo — before creating a Test.kt file or a @Test function, and before touching an existing test after a refactor. Triages whether the test should exist at all, and what must happen to it when the code it guards changes.

niki914/zafiro · 71 tokens

test-hang-watchdog

Prevent and diagnose hanging or long-running Gradle unit tests (> 30s) in Android/Kotlin coroutines codebases. Use when running tests, when a test execution takes unexpectedly long, when background test tasks appear frozen, or when taking thread dumps (jstack) to unblock coroutine deadlocks.

niki914/zafiro · 66 tokens

zafiro-qa

An Android quality-assurance workflow for testing the Zafiro app on a real phone or emulator. It uses one installed app as the test controller and a separate debug app as the app under test, with screenshots, device actions, settings, and logs.

niki914/zafiro · 71 tokens