error-handling

error-handling is a skill for Claude Code, Codex from CloudAI-X/claude-workflow-v2. It costs 57 tokens per session (3,176 once invoked), scanned A, original, MIT.

A set of software patterns for handling failures and observing applications. It covers logging, retries, circuit breakers, error boundaries, and graceful fallback behavior.

In plain words
What is it for?
Designing error handling, structured logs, retry policies, circuit breakers, error tracking, and user-facing error messages.
Why use it?
It gives developers a way to classify failures, respond consistently, and understand problems after deployment.

Skill for Claude CodeCodex

Part of the claude-workflow-v2 plugin — 14 skills, 26 commands, 7 agents, 6 hooks shipped together

About the project

Project Starter is a workflow plugin that equips coding agents with specialized subagents, reusable skills, commands, hooks, and output styles for software projects. It is for developers who want structured assistance with tasks such as planning, debugging, code review, security, and automation across several coding-agent platforms. Catalogue add-ons are components of its own workflow.

CloudAI-X/claude-workflow-v2 · 1,413 stars · on GitHub

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.

agentmods
npx agentmods add skills/cloudai-x/claude-workflow-v2/error-handling
Any agent
npx skills add CloudAI-X/claude-workflow-v2 --skill error-handling
Clone the repo
git clone --depth 1 https://github.com/CloudAI-X/claude-workflow-v2

Made for: Claude Code, Codex.

Or install claude-workflow-v2, the plugin that ships this one along with the rest of its 14 skills, 26 commands, 7 agents, 6 hooks.

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/cloudai-x/claude-workflow-v2/error-handling.svg)](https://agentmods.dev/skills/cloudai-x/claude-workflow-v2/error-handling)
Your own site
<a href="https://agentmods.dev/skills/cloudai-x/claude-workflow-v2/error-handling"><img src="https://agentmods.dev/badge/skills/cloudai-x/claude-workflow-v2/error-handling.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,176 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00057 $0.03176
Opus 5 $0.00028 $0.01588
Sonnet 5 $0.00011 $0.00635
Haiku 4.5 $0.00006 $0.00318

Measured 5d ago against content hash f6b2830f6e47, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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.

skills/error-handling/SKILL.md · 481 lines

How it starts

The opening of the file, as written. The whole thing — 481 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Error Handling & Observability

When to Load

  • Trigger: Try/catch patterns, retry logic, error responses, circuit breakers, structured logging
  • Skip: No error handling or observability involved in the current task

Error Handling Workflow

Copy this checklist and track progress:

Error Handling Progress:
- [ ] Step 1: Define error taxonomy (categories and severity)
- [ ] Step 2: Implement error handling by layer
- [ ] Step 3: Set up structured logging
- [ ] Step 4: Add retry and circuit breaker patterns
- [ ] Step 5: Configure error tracking service
- [ ] Step 6: Define user-facing error messages
- [ ] Step 7: Validate against anti-patterns checklist

Error Handling Patterns by Language

JavaScript / TypeScript

// Custom error hierarchy
class AppError extends Error {
  constructor(
    message: string,
    public statusCode: number = 500,
    public code: string = "INTERNAL_ERROR",
    public isOperational: boolean = true,
  ) {
    super(message);
    this.name = this.constructor.name;
  }
}
class NotFoundError extends AppError {
  constructor(resource: string, id: string) {
    super(`${resource} with id ${id} not found`, 404, "NOT_FOUND");
  }
}
class ValidationError extends AppError {
  constructor(public errors: Record<string, string[]>) {
    super("Validation failed", 400, "VALIDATION_ERROR");
  }
}

// WRONG: Swallowing errors silently
try {
  await saveUser(data);
} catch (e) {
  // nothing here -- bug hides forever
}

// WRONG: Catching and re-throwing without context
try {
  await saveUser(data);
} catch (e) {
  throw e; // pointless try/catch
}

// CORRECT: Add context, handle or propagate
try {
  await saveUser(data);
} catch (error) {
  if (error instanceof ValidationError) {
    return res.status(400).json({ errors: error.errors });
  }
  logger.error("Failed to save user", { error, userId: data.id });
  throw new AppError("Unable to save user", 500, "USER_SAVE_FAILED");
}

Express Global Error Handler

Read the full file on GitHub · 481 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. 5d ago First seen · 481 lines · 57 tokens per session scan A f6b2830f6e47

Subscribe to this mod's changes

error-handling is a skill published in the GitHub repository CloudAI-X/claude-workflow-v2 (1,413 stars, last pushed 10d ago), licensed MIT. It adds 57 tokens to every session and 3,176 once invoked, about $0.0003 per session on Opus 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-08-30.

Related

Other skills, from other repositories

data-charts-tako

Search and visualize the world's data - get charts, insights, and embeddable knowledge cards for finance, economics, demographics, sports, and more.

gooseworks-ai/goose-skills · 35 tokens

apollo-lead-finder

Two-phase Apollo.io prospecting: free People Search to discover ICP-matching leads, then selective enrichment to reveal emails/phones (credits per contact). Creates Apollo lists. Deduplicates against existing contacts by LinkedIn URL.

gooseworks-ai/goose-skills · 51 tokens

monorepo-management

Master monorepo management with Turborepo, Nx, and pnpm workspaces to build efficient, scalable multi-package repositories with optimized builds and dependency management. Use when setting up monorepos, optimizing builds, or managing shared dependencies.

wshobson/agents · 54 tokens

browse-and-evaluate

Use when exploring the ai-agent-skills catalog to find, compare, and evaluate skills before installing. Always use --fields to limit output size and --dry-run before committing to an install.

MoizIbnYousaf/Ai-Agent-Skills · 43 tokens

render-airdrop-carousel

Assemble a viral iOS "AirDrop" notification-carousel video ad (≈6–8s, 9:16) from a brand line plus 6–16 real product photos — a native AirDrop share-sheet card ("Brand would like to share a · Decline / Accept") springs up and its preview window CYCLES through the products, landing on a range/lineup payoff with an…

gooseworks-ai/goose-skills · 207 tokens

render-3d-product-showcase

Assemble a premium 3D product-showcase ad from a config — four beat clips (an orbiting hero rotation, a macro push-in, a physics reveal, a typographic close) normalized to the brand-color canvas, hard-concatenated in order, closed on a deterministic Playwright brand end card, and mixed under one instrumental bed at…

gooseworks-ai/goose-skills · 159 tokens