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 ericrisco/rsc-harness --skill error-handlinggit clone --depth 1 https://github.com/ericrisco/rsc-harnessWrote 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/ericrisco/rsc-harness/error-handling)<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/error-handling"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/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.
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/error-handling"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/error-handling.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.00078 | $0.03286 |
| Opus 5.5 | $0.00031 | $0.01314 |
| Sonnet 5.5 | $0.00016 | $0.00657 |
| Haiku 4.5 | $0.00008 | $0.00329 |
Grade A, and why
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 8d 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 — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Error handling — classify, contain, surface
You are designing what happens whenever anything in a class breaks, not chasing
one crash (that is debug). Every failure gets classified,
contained, and surfaced — never swallowed. The deliverable, in that order: a typed
error taxonomy, a retry policy with caps and jitter, boundary placement, and a
two-audience message contract — never a pile of try { … } catch {}.
Step 1 — Model failure as a taxonomy
Bucket every failure into one of three kinds. The bucket dictates the reaction; get the bucket wrong and every downstream decision is wrong too.
| Bucket | Examples | Retry? | Tell the user | Tell the operator |
|---|---|---|---|---|
| Domain / expected | insufficient funds, slot taken, validation failed | No | Yes, actionable | info — it is normal |
| Infrastructure / transient | timeout, 503, connection reset, 429 | Yes (capped) | "temporary, retrying" | warn — watch the rate |
| Programmer error / bug | null deref, bad assertion, type error | No | generic "something broke" + id | error — page if frequent |
Result vs throw
Decide per call site, not per codebase:
Result<T, E>for expected domain failures the caller must handle. The type checker forces a branch — the failure cannot be ignored by accident.throwfor exceptional / programmer errors. These should crash up to the nearest boundary, not be threaded through every signature.
In TypeScript, neverthrow (current) is the instrument for the Result path:
import { ok, err, Result } from "neverthrow";
type ChargeError = "insufficient_funds" | "card_declined";
// Expected domain failure → Result. The caller MUST handle both arms.
function charge(cents: number, balance: number): Result<number, ChargeError> {
if (cents > balance) return err("insufficient_funds");
return ok(balance - cents);
}
const r = charge(500, 200);
if (r.isErr()) {
// r.error is the typed union — exhaustive, no `any`.
}
What ships with it
5 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.
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.
- 8d ago Changed · +2 lines 427604f2d6ef
- 24d ago Changed bd103dda5b52
- 3mo ago First seen · 274 lines · 78 tokens per session scan A 1195f482283b
error-handling is a skill published in the GitHub repository ericrisco/rsc-harness (707 stars, last pushed 2d ago), licensed MIT. It adds 78 tokens to every session and 3,286 once invoked, about $0.0003 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 compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| error-handlingericrisco/rsc-harness | Skill | 707 | 2d ago | MIT | A | 78 | Claude Code, Codex |
| backend-resilience-patternsj4flmao/agent-skills | Skill | 47 | 17d ago | MIT | A | 67 | Claude Code, Codex |
| error-handlingpan94u/forge | Skill | 41 | 2d ago | none | A | 26 | Claude Code |
| error-handlingasgarovf/locusai | Skill | 23 | 8mo ago | MIT | A | 36 | Claude Code |
| Error Boundary TesterPramodDutta/qaskills | Skill | 253 | 1mo ago | MIT | A | 26 | Claude Code, Codex |
| architecture-microservices-patternsj4flmao/agent-skills | Skill | 47 | 17d ago | MIT | A | 150 | Claude Code, Codex |
| dev-authchristopherlouet/claude-base | Skill | 6 | 4d ago | MIT | A | 62 | Claude Code |