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 saajunaid/caddis-plugin --skill error-handlinggit clone --depth 1 https://github.com/saajunaid/caddis-pluginWrote 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/saajunaid/caddis-plugin/error-handling)<a href="https://agentmods.dev/skills/saajunaid/caddis-plugin/error-handling"><img src="https://agentmods.dev/badge/skills/saajunaid/caddis-plugin/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/saajunaid/caddis-plugin/error-handling"><img src="https://agentmods.dev/badge/skills/saajunaid/caddis-plugin/error-handling.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.00037 | $0.01922 |
| Opus 5.5 | $0.00015 | $0.00769 |
| Sonnet 5.5 | $0.00007 | $0.00384 |
| Haiku 4.5 | $0.00004 | $0.00192 |
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 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 — 261 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Error Handling Skill
Errors are not exceptional — they are part of the contract. This skill defines how to classify, propagate, and recover from errors consistently.
1. When to Apply This Skill
Trigger conditions:
- Designing error handling for a new service or feature
- "How should we handle errors in this module?"
- Building retry logic or circuit breakers
- Reviewing code with bare
except:or swallowed errors - Establishing error handling conventions for a project
2. Error Classification
Every error falls into one of three categories. Handle each differently.
| Category | Retryable? | User Action? | Example |
|---|---|---|---|
| Transient | Yes | None (auto-retry) | Network timeout, DB connection dropped, rate limit |
| Operational | No | Inform user | Invalid input, resource not found, insufficient permissions |
| Fatal | No | Alert team | Corrupted state, config missing, unrecoverable assertion |
3. Python Exception Hierarchy
Build domain-specific exceptions. Never raise raw Exception.
class AppError(Exception):
"""Base error for the application."""
def __init__(self, message: str, code: str | None = None):
self.message = message
self.code = code or self.__class__.__name__
super().__init__(self.message)
# Operational errors (expected, handled gracefully)
class NotFoundError(AppError):
"""Resource does not exist."""
class ValidationError(AppError):
"""Input validation failed."""
class AuthorizationError(AppError):
"""User not authorized for this action."""
# Transient errors (retry-eligible)
class TransientError(AppError):
"""Temporary failure — safe to retry."""
class ExternalServiceError(TransientError):
"""External API call failed."""
class DatabaseConnectionError(TransientError):
"""Database connection lost."""
Usage Patterns
# ✅ GOOD: Specific exception with context
def get_user(user_id: str) -> User:
user = repo.find_by_id(user_id)
if user is None:
raise NotFoundError(f"User {user_id} not found")
return user
# ✅ GOOD: Catch specific, re-raise as domain error
def fetch_external_data(url: str) -> dict:
try:
response = httpx.get(url, timeout=10)
response.raise_for_status()
return response.json()
except httpx.TimeoutException as e:
raise ExternalServiceError(f"Timeout calling {url}") from e
except httpx.HTTPStatusError as e:
raise ExternalServiceError(f"HTTP {e.response.status_code} from {url}") from e
# ❌ BAD: Bare except swallows everything
try:
result = process()
except:
pass
# ❌ BAD: Catching too broadly
try:
result = process()
except Exception:
logger.error("Something went wrong")
return None # Hides the real error
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 · -14 tokens per session 3673d9ade95a
- 2mo ago First seen · 261 lines · 51 tokens per session scan A 0a0a4d9b3986
error-handling is a skill published in the GitHub repository saajunaid/caddis-plugin (0 stars, last pushed 3d ago), licensed MIT. It adds 37 tokens to every session and 1,922 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.
error-handling compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| error-handlingsaajunaid/caddis-plugin | Skill | 0 | 3d ago | MIT | A | 37 | Claude Code, Codex |
| goga-prototype-plan-verificationqarium/goga | Skill | 46 | 8d ago | BSD-3-Clause | A | 17 | Claude Code, Codex |
| goga-change-investigatorqarium/goga | Skill | 46 | 8d ago | BSD-3-Clause | A | 11 | Claude Code, Codex |
| goga-change-tracerqarium/goga | Skill | 46 | 8d ago | BSD-3-Clause | A | 11 | Claude Code, Codex |
| rn-debuggingLykhoyda/rn-dev-agent | Skill | 20 | 1mo ago | MIT | A | 123 | Claude Code |
| python-runcongchuanling-dot/Cohort | Skill | 180 | 3mo ago | MIT | A | 56 | Claude Code |
| doctorLykhoyda/rn-dev-agent | Skill | 20 | 1mo ago | MIT | A | 30 | Claude Code, Codex |