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.
npx skills add event4u-app/agent-config --skill error-handling-patternsgit clone --depth 1 https://github.com/event4u-app/agent-configWrote 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.
[](https://agentmods.dev/skills/event4u-app/agent-config/error-handling-patterns)<a href="https://agentmods.dev/skills/event4u-app/agent-config/error-handling-patterns"><img src="https://agentmods.dev/badge/skills/event4u-app/agent-config/error-handling-patterns/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.
<a href="https://agentmods.dev/skills/event4u-app/agent-config/error-handling-patterns"><img src="https://agentmods.dev/badge/skills/event4u-app/agent-config/error-handling-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.02024 |
| Opus 5.5 | $0.00017 | $0.00810 |
| Sonnet 5.5 | $0.00009 | $0.00405 |
| Haiku 4.5 | $0.00004 | $0.00202 |
Grade A, and why
error-handling-patterns 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.
error-handling-patterns
Decision framework for picking an error-handling strategy. Catalogues of language-specific code live upstream (links in § Provenance) — this skill is the predicate, not the pattern library. Sunset-policy compliant: large language-specific catalogues stay in authoritative upstream docs.
When to use
- Designing how a new feature, API, or service reports failure.
- Reviewing a diff that introduces a new exception class,
Result<T, E>, or sentinel return. - Debugging production noise that traces back to inconsistent error semantics.
- Choosing between retry, circuit-breaker, fallback, and fail-fast for an external dependency.
Do NOT use when:
- You only need the syntax for a
try/catchin language X — read the upstream language guide directly. - The failure is a single-call Laravel validation error — route to
laravel-validation. - The fix is a one-line null check in existing code — route to
bug-analyzer.
Decision framework
Step 1 — Classify the failure
Failure is:
caller's fault (bad input, missing auth) → reject at boundary, structured error
expected operational (timeout, 404, rate-limit) → Result-type / typed return; retry-aware
unexpected operational (DB down, OOM, deadlock) → exception; observability + alert
programmer bug (null deref, off-by-one) → crash early; do not catch
Step 2 — Pick the reporting mechanism
IF failure is an EXPECTED, branchable outcome the caller will route on
→ Result type / tagged union / typed error return.
Forces the caller to handle it; the type system is the proof.
IF failure is UNEXPECTED and most callers cannot do anything useful
→ exception, propagated to a single boundary handler.
One layer (HTTP, queue, CLI) translates exceptions to user-facing errors.
IF failure is UNRECOVERABLE (invariant violated, data corruption)
→ fail loud, fail fast. No catch-and-continue.
Log structured context, exit / panic / 500.
IF the language idiom forces one choice (Go: errors are values; Rust: Result;
Python/PHP/JS: exceptions)
→ follow the idiom. Inventing a foreign mechanism is more cost than the
correctness it buys.
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.
- 2mo ago Changed · +9 lines 7f15553fd26d
- 2mo ago First seen · 140 lines · 43 tokens per session scan A 17445dc72722
error-handling-patterns is a skill published in the GitHub repository event4u-app/agent-config (20 stars, last pushed today), licensed MIT. It adds 43 tokens to every session and 2,024 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.
error-handling-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| error-handling-patternsevent4u-app/agent-config | Skill | 20 | today | MIT | A | 43 | Claude Code, Codex |
| error-handling-patternswshobson/agents | Skill | 43k | 5d ago | MIT | A | 43 | Claude Code |
| diagnose-backend-bugQoderAI/better-harness | Skill | 2.5k | 18d ago | MIT | A | 87 | Claude Code, Codex |
| awesome-performance-auditkhasky/awesome-agent-skills | Skill | 45 | 2d ago | MIT | A | 52 | Claude Code |
| kafka-consumer-laglensesio/agentic-engineering-for-apache-kafka | Skill | 71 | 3mo ago | MIT | A | 84 | Claude Code |
| backend-error-handlingkensaurus/cursor-kenji | Skill | 9 | 2mo ago | MIT | A | 57 | Claude Code |
| debug-fe-be-integrationkensaurus/cursor-kenji | Skill | 9 | 2mo ago | MIT | A | 61 | Claude Code |