Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add MadAppGang/magus/plugin install bunjsWrote 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/madappgang/magus/errors)<a href="https://agentmods.dev/skills/madappgang/magus/errors"><img src="https://agentmods.dev/badge/skills/madappgang/magus/errors/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/madappgang/magus/errors"><img src="https://agentmods.dev/badge/skills/madappgang/magus/errors.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00039 | $0.02142 |
| Opus 5.5 | $0.00016 | $0.00857 |
| Sonnet 5.5 | $0.00008 | $0.00428 |
| Haiku 4.5 | $0.00004 | $0.00214 |
Grade A, and why
errors scanned grade A with 1 finding 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
await retry(() => withTimeout("charge", 2000, (signal) => fetch(url, { signal })), { attempts: 3 }); How it starts
The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Errors and resilience
Error handling is where most Node/Bun services rot, and it rots in a specific way: every catch block
makes its own decision. One returns null, one logs and continues, one re-throws a new Error(String(e))
that destroys the stack, one 500s on a validation failure. The result is a service that cannot tell you
whether it is healthy, because nothing knows what an error means.
This skill installs one distinction and builds everything on it.
The one distinction: operational vs programmer
| Operational | Programmer | |
|---|---|---|
| Examples | bad email, payment declined, upstream 503, rate limit, 404 | undefined is not a function, violated invariant, bad migration |
| Who was wrong | the caller, the network, the world | you |
| Did you anticipate it | yes — you wrote the throw | no |
| Correct response | answer the caller, log at warn, keep serving |
log at error with stack, let the process die and restart |
| Process state after | healthy | unknown |
The last row is the reason this matters. After a programmer error the process holds state nobody reasoned about — a half-applied transaction, a module that threw during init, a connection pool with a poisoned entry. Continuing is not resilience, it is serving unknown-correctness responses. The famous advice "never swallow errors" is really this: never let a programmer error be swallowed into the operational path.
Everything else in this skill follows mechanically. AppError.isOperational() is the classifier; it
returns false for anything that is not an AppError, because an unrecognised error is a bug until
proven otherwise.
Copy the module in; never retype it
The subtle parts — the cause chain walk that is cycle-safe, the 5xx message replacement, the
re-entrancy guard on shutdown, full-jitter backoff — degrade silently when retyped from memory.
53 tests ship with this code and pass (bun test, tsc --noEmit clean, Bun 1.3.10).
SKILL="${CLAUDE_PLUGIN_ROOT:+$CLAUDE_PLUGIN_ROOT/skills/errors}"; SKILL="${SKILL:-PASTE_THE_DIR_THIS_SKILL_MD_WAS_READ_FROM}" # that var is UNSET in a Bash tool (MEASURED) — so paste it. `:?` would ABORT the block and copy nothing
mkdir -p src; if [ -d "$SKILL/assets" ]; then cp -r "$SKILL/assets/errors" src/errors # app-error, catalog, handler, resilience + 3 test files
else echo "SKILL is still the placeholder — paste the real dir above and re-run"; fi
What ships with it
14 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.
- assets/errors/app-error.test.ts 4.7 KB runs code
- assets/errors/app-error.ts 4.9 KB runs code
- assets/errors/catalog.ts 4.5 KB runs code
- assets/errors/handler.test.ts 7.2 KB runs code
- assets/errors/handler.ts 6.2 KB runs code
- assets/errors/resilience.test.ts 8.5 KB runs code
- assets/errors/resilience.ts 5.4 KB runs code
- bun.lock 1.1 KB
- package.json 347 B
- references/async-pitfalls.md 6.2 KB
- references/resilience-patterns.md 5.3 KB
- references/testing-error-paths.md 5.4 KB
- references/validation-boundaries.md 5.4 KB
- tsconfig.json 324 B
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.
- 1mo ago First seen · 154 lines · 39 tokens per session scan A 5470300fa001
errors is a skill published in the GitHub repository MadAppGang/magus (13 stars, last pushed today), licensed MIT. It adds 39 tokens to every session and 2,142 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
api-integration-architect
Design, implement, debug, and optimize API integrations with expert-level patterns for REST, GraphQL, webhooks, and authentication flows.
printing-press-amend
Amend a published CLI from one of two input sources: (1) dogfood mode mines the active Claude Code session transcript for friction (missing flags, hand- rolled API payloads, silent-null returns); (2) direct-input mode accepts user-supplied asks (rename a command, add commands or feeds, fix a named bug, optionally…
convex-performance-audit
Audits Convex performance for reads, subscriptions, write contention, and function limits. Use for slow features, insights findings, OCC conflicts, or read amplification.
convex-insights
Query a running Convex app's logs + health in natural language (official MCP): failures, slow/expensive functions, deploy causality — scoped, evidence-backed, with a dashboard deep link.
diagnose-backend-bug
Diagnose a bounded backend or multi-service failure from GitHub Issues, Jira, Aone, user-provided exports, logs, traces, responses, stack traces, or job records. Use when a service, API, RPC, worker, queue, CLI, or scheduled job bug needs correlation through the project's existing observability route before repair; do…
axiom-networking
Use when implementing or debugging ANY network connection, API call, or socket in an Apple app. Covers URLSession, Network.framework, NetworkConnection, connection diagnostics.