error-handling

error-handling is a skill for Claude Code, Codex from saajunaid/caddis-plugin. It costs 37 tokens per session (1,922 once invoked), scanned A, original, MIT.

A guide to handling failures in Python and TypeScript applications. It covers custom errors, retries, circuit breakers, result types, logging, and messages shown to users.

In plain words
What is it for?
Use it when designing error handling, retry behavior, error boundaries, or application error messages.
Why use it?
It helps applications fail predictably, recover from temporary problems, and explain errors clearly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing error handling, retry behavior, error boundaries, or application error messages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/saajunaid/caddis-plugin/error-handling
Install

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.

Any agent
npx skills add saajunaid/caddis-plugin --skill error-handling
Clone the repo
git clone --depth 1 https://github.com/saajunaid/caddis-plugin

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for error-handling

README.md
[![agentmods](https://agentmods.dev/badge/skills/saajunaid/caddis-plugin/error-handling/github.svg)](https://agentmods.dev/skills/saajunaid/caddis-plugin/error-handling)
Your own site
<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.

agentmods 80×15 button for error-handling

Your own site · 80×15
<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>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,922 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 2mo ago against content hash 3673d9ade95a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.github/skills/coding/error-handling/SKILL.md · 261 lines

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

Read the full file on GitHub · 261 lines

Changes

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.

  1. 2mo ago Changed · -14 tokens per session 3673d9ade95a
  2. 2mo ago First seen · 261 lines · 51 tokens per session scan A 0a0a4d9b3986

Subscribe to this mod's changes

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.

Related

error-handling compared with skills from other repositories

error-handling next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
error-handlingsaajunaid/caddis-pluginSkill03d agoMITA37Claude Code, Codex
goga-prototype-plan-verificationqarium/gogaSkill468d agoBSD-3-ClauseA17Claude Code, Codex
goga-change-investigatorqarium/gogaSkill468d agoBSD-3-ClauseA11Claude Code, Codex
goga-change-tracerqarium/gogaSkill468d agoBSD-3-ClauseA11Claude Code, Codex
rn-debuggingLykhoyda/rn-dev-agentSkill201mo agoMITA123Claude Code
python-runcongchuanling-dot/CohortSkill1803mo agoMITA56Claude Code
doctorLykhoyda/rn-dev-agentSkill201mo agoMITA30Claude Code, Codex