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 HigorAlves/orc --skill error-handling-patternsgit clone --depth 1 https://github.com/HigorAlves/orcWrote 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/higoralves/orc/error-handling-patterns)<a href="https://agentmods.dev/skills/higoralves/orc/error-handling-patterns"><img src="https://agentmods.dev/badge/skills/higoralves/orc/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/higoralves/orc/error-handling-patterns"><img src="https://agentmods.dev/badge/skills/higoralves/orc/error-handling-patterns.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.00021 | $0.00790 |
| Opus 5.5 | $0.00008 | $0.00316 |
| Sonnet 5.5 | $0.00004 | $0.00158 |
| Haiku 4.5 | $0.00002 | $0.00079 |
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 6d 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 — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Error Handling Patterns
Build resilient applications with robust error handling strategies that gracefully handle failures and provide excellent debugging experiences.
This SKILL.md is a thin index. Read the relevant references/<topic>.md file only when you need that topic's detail — the code samples and full patterns live there, not here.
When to Use This Skill
- Implementing error handling in new features
- Designing error-resilient APIs
- Debugging production issues
- Improving application reliability
- Creating better error messages for users and developers
- Implementing retry and circuit breaker patterns
- Handling async/concurrent errors
- Building fault-tolerant distributed systems
Core Concepts
Error handling philosophies:
- Exceptions — traditional try-catch, disrupts control flow.
- Result types — explicit success/failure, functional approach.
- Error codes — C-style, requires discipline.
- Option/Maybe types — for nullable values.
Error categories:
- Recoverable — network timeouts, missing files, invalid user input, API rate limits. Handle and continue (retry, fallback).
- Unrecoverable — out of memory, stack overflow, programming bugs (null pointer). Fail loudly / crash.
Decision Tree — which strategy?
Is the failure expected as part of normal operation
(validation, parse, lookup miss, rate limit)?
├── YES → Return a Result / Option type. → references/result-types.md
│ Caller must explicitly handle the failure.
└── NO → Is it a programming bug or truly unrecoverable
(OOM, invariant violation)?
├── YES → Panic / crash. Don't try to recover.
└── NO → It's an unexpected-but-recoverable error
→ Throw an exception. → references/exceptions.md
Then, regardless of strategy:
- Does the error cross layers / async boundaries, or do you
need to collect several before surfacing? → references/propagation.md
- Is this a flaky external / distributed dependency you must
keep serving through (retry, circuit breaker, fallback)?
→ references/graceful-degradation.md
- Need the language-native idiom or full type defs?
→ references/language-specific.md
- Unsure about messaging, logging, or cleanup hygiene?
→ references/best-practices.md
What ships with it
6 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.
- 6d ago Changed · +1 lines · -14 tokens per session 2834de3e589c
- 1mo ago First seen · 72 lines · 35 tokens per session scan A a4155775336a
error-handling-patterns is a skill published in the GitHub repository HigorAlves/orc (7 stars, last pushed today), licensed MIT. It adds 21 tokens to every session and 790 once invoked, about $0.0001 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.
Other skills, from other repositories
spine-perf
Find and fix performance bottlenecks — N+1 queries, missing indexes, sync bottlenecks, caching gaps. Use when asked "why is this slow", "performance issue", "optimize this endpoint", or "N+1 queries".
spine-recon
Backend reconnaissance — map all routes, middleware, models, dependencies, auth, and assess code quality for project takeover. Use when asked to "understand this backend", "map the API", or "assess code quality".
debug
Perform an evidence-based Parallax diagnosis or post-build audit and verify the repair.
parallax-core
Apply session-safe Parallax reasoning and verification to code changes.
fable-debug
Use when behavior contradicts expectation — a bug, an unexplained error, a failing test, output that looks wrong, a fix that didn't hold — or when you're about to retry the same category of fix a second time, or work keeps failing or stalling. Also when the user says "debug this", "why is this happening", or "still…
five-whys
Finds the root cause of a bug, failure or recurring problem by asking "why" until the answer is a cause you can fix. Use when the user asks why something keeps happening, or wants the root cause rather than a quick fix.