flutter-error-handling

flutter-error-handling is a skill for Claude Code, Codex from HoangNguyen0403/agent-skills-standard. It costs 37 tokens per session (599 once invoked), scanned A, original, MIT.

A Flutter error-handling pattern that turns technical exceptions into typed failures before they reach the user interface. Repositories return either a failure or a successful value, and the BLoC—the layer that coordinates screen state—handles the result.

In plain words
What is it for?
Use it to map network or infrastructure exceptions to domain failures, process Either results in BLoCs, provide localised error text, and route errors to logging or Crashlytics.
Why use it?
It keeps error recovery out of UI code and makes failures explicit, logged, and suitable for user-facing messages.

Skill for Claude CodeCodex

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

Good fit Use it to map network or infrastructure exceptions to domain failures, process Either results in BLoCs, provide localised error text, and route errors to logging or Crashlytics.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hoangnguyen0403/agent-skills-standard/flutter-error-handling
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-error-handling
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-error-handling

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoangnguyen0403/agent-skills-standard/flutter-error-handling/github.svg)](https://agentmods.dev/skills/hoangnguyen0403/agent-skills-standard/flutter-error-handling)
Your own site
<a href="https://agentmods.dev/skills/hoangnguyen0403/agent-skills-standard/flutter-error-handling"><img src="https://agentmods.dev/badge/skills/hoangnguyen0403/agent-skills-standard/flutter-error-handling/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-error-handling

Your own site · 80×15
<a href="https://agentmods.dev/skills/hoangnguyen0403/agent-skills-standard/flutter-error-handling"><img src="https://agentmods.dev/badge/skills/hoangnguyen0403/agent-skills-standard/flutter-error-handling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 599 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.00037 $0.00599
Opus 5 $0.00018 $0.00300
Sonnet 5 $0.00007 $0.00120
Haiku 4.5 $0.00004 $0.00060

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

Security

Grade A, and why

flutter-error-handling 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-error-handling/SKILL.md · 58 lines

How it starts

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

Error Handling

Priority: P1 (HIGH)

Implementation Workflow

  1. Define failures — Create domain-specific failures using @freezed unions (e.g., UnauthorizedFailure, OutOfStockFailure).
  2. Return Either — Repositories return Either<Failure, T>. No exceptions in UI/BLoC.
  3. Catch in Infrastructure only — Infrastructure catches exceptions (e.g., DioException) and returns Left(Failure). Never rethrow to UI.
  4. Fold in BLoC — Use .fold(failure, success) in BLoC to emit corresponding states. Remove try/catch from BLoC.
  5. Localize messages — Use failure.failureMessage (returns TRObject or localized string) for UI-safe text.
  6. Log with stable templates — Use low-cardinality message templates; pass variable data via metadata/context.
  7. No Silent Catch: Never swallow errors without logging or documented retry.
  8. Crashlytics Routing: All UI/BLoC catch blocks MUST route errors via AppLogger.error(AppException.fromException(e).message, error: e, stackTrace: st) for observability and type-safe UI messages.

Repository & BLoC Examples

See implementation examples for repository error mapping and BLoC consumption patterns.

Reference & Examples

For Failure definitions and API error mapping: See references/REFERENCE.md.

Anti-Patterns

  • No Try-Catch in BLoC: BLoC receives Either and folds; try/catch belongs in Infrastructure
  • No Plain String Failures: Define typed @freezed Failure subclasses instead of Left('Something went wrong')
  • No Empty Catch Blocks: Always log and propagate; never swallow errors silently
  • No Repositories Throwing Status: Return Left(Failure) instead of throwing Exception
  • No Missing Log Registration: Use AppLogger.error in BLoC/UI catch to ensure Crashlytics tracking and type-safe UI messages

layer-based-clean-architecture | bloc-state-management

Canonical response anchors

Read the full file on GitHub · 58 lines

Files

What ships with it

4 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 · 58 lines · 37 tokens per session scan A 5eb50540da80

Subscribe to this mod's changes

flutter-error-handling is a skill published in the GitHub repository HoangNguyen0403/agent-skills-standard (565 stars, last pushed 3d ago), licensed MIT. It adds 37 tokens to every session and 599 once invoked, about $0.0002 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

Debroid CLI Debugger

Orchestrate headless Android debugging via JDWP. ACTIVATE this skill whenever asked to debug an Android application, set line or exception breakpoints, inspect runtime variables or Jetpack Compose state, step through execution, evaluate live expressions, watch fields, or diagnose runtime crashes.

PatilShreyas/debroid · 61 tokens

rn-debugging

This skill should be used when the user asks to "debug the app", "fix a crash", "diagnose a blank screen", "read error logs", "troubleshoot CDP connection", "check Metro status", "find native crashes", "inspect network failures", "the app crashed", "I see a blank screen", "the screen is white", "something broke", "app…

Lykhoyda/rn-dev-agent · 123 tokens

android-finance-spec

Use when generating, reviewing, or refactoring Android Kotlin code for financial apps that require BigDecimal/String precision, RTL/i18n safety, Kotlin style discipline, and "do not reinvent existing project patterns" constraints.

brycegao/android-finance-spec · 48 tokens

android

Use when working with Android devices via ADB - connecting devices, running shell commands, installing apps, debugging, taking screenshots, UI automation, viewing logs, analyzing crashes, or exploring system internals. Triggers on "adb", "logcat", "install apk", "debug android", "android device", "shell command"…

hyperb1iss/hyperdroid-skill · 85 tokens

rubber-duck

Adversarial "rubber duck" review that turns explaining-out-loud into a hallucination check. The main session is the PRESENTER (it did the work — a design doc, investigation, or analysis — and holds the real reasoning) and reconstructs the topic to a LISTENER — a spawned subagent pinned to a DIFFERENT-vendor model that…

kirodotdev/KiroCrew · 161 tokens

ios-simulator

Verify and debug native, React Native, Expo, or Flutter apps on an iOS Simulator with agent-device. Use when an agent needs to launch an app, inspect its live UI, tap, type, scroll, validate a code change, collect failure evidence, or reproduce a workflow on an iPhone or iPad Simulator.

callstack/agent-device · 69 tokens