error-handling

error-handling is a skill for Codex from kreek/consult. It costs 25 tokens per session (687 once invoked), scanned A, original, MIT.

A coding guide for designing how software reports and handles failures, including typed errors, retries, recovery, and user messages.

In plain words
What is it for?
Use it when building or reviewing error paths, remote calls, retry behavior, exception handling, or user-facing failure messages.
Why use it?
It prevents errors from being silently ignored or losing the context needed to diagnose them.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when building or reviewing error paths, remote calls, retry behavior, exception handling, or user-facing failure messages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kreek/consult/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 kreek/consult --skill error-handling
Clone the repo
git clone --depth 1 https://github.com/kreek/consult

Made for: 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/kreek/consult/error-handling/github.svg)](https://agentmods.dev/skills/kreek/consult/error-handling)
Your own site
<a href="https://agentmods.dev/skills/kreek/consult/error-handling"><img src="https://agentmods.dev/badge/skills/kreek/consult/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/kreek/consult/error-handling"><img src="https://agentmods.dev/badge/skills/kreek/consult/error-handling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 687 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.00025 $0.00687
Opus 5.5 $0.00010 $0.00275
Sonnet 5.5 $0.00005 $0.00137
Haiku 4.5 $0.00003 $0.00069

Measured 1mo ago against content hash 13d373bc393a, 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 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.

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.

agents/.agents/skills/error-handling/SKILL.md · 67 lines

How it starts

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

Error Handling

Iron Law

ERRORS CARRY CONTEXT. NEVER CATCH WITHOUT HANDLING OR RE-RAISING.

When to Use

  • Designing or reviewing typed errors, Result/Either flows, domain error boundaries, wrapping, retries, remote-call failures, panics, user-facing errors, or swallowed failures.

When NOT to Use

  • Security-specific failure shape; pair with security.
  • REST status codes or public API error schema; use api.
  • Error visibility in production; pair with observability.

Rules

  1. Failure is part of the function contract. Expected failures are typed (named exception classes, discriminated unions, structured Result variants), never bare strings or anonymous generic errors.
  2. Catch only where you can decide: recover, translate, retry, or terminate. Every catch does one of those or re-raises with context, preserving the original cause.
  3. Translate at boundaries. Domain, infrastructure, API, CLI, and UI errors do not leak across a boundary unchanged.
  4. Remote calls declare timeout, retry, idempotency, and dependency-failure behavior (circuit breaker, bulkhead, load shedding, or fail fast) together, before the caller is written. Retries apply only to idempotent transient failures, in one layer, with a capped budget and jittered backoff. Two retrying layers multiply load on a failing dependency.
  5. User-facing errors are actionable and expose no stack traces, SQL, file paths, hostnames, secrets, or auth-enumeration clues. Diagnostic detail stays reachable by correlation ID.
  6. Panics and assertions are for impossible states and process boundaries, not routine control flow.
  7. Every public operation that can fail has at least one failure-path test.

Tripwires

Trigger Do this instead False alarm
"Log and continue is fine" Decide: recover, translate, retry, or terminate. Best-effort telemetry with an explicit drop policy.
"This can't fail in practice" Declare the failure-capable contract and test a representative failure. The state is impossible by type or value construction.
"Swallow at the boundary" Translate for the caller and preserve the cause for diagnostics. A security boundary deliberately hides details while logging a correlation ID.
"We'll add remote-call protection later" Define timeout, retry budget, idempotency guard, and dependency-failure behavior now. Local in-memory call with no blocking I/O.

Read the full file on GitHub · 67 lines

Files

What ships with it

1 file 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.

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. 1mo ago Changed · +2 tokens per session 13d373bc393a
  2. 2mo ago Changed · -36 lines b27a29dcc848
  3. 3mo ago First seen · 103 lines · 23 tokens per session scan A 37110cf5d368

Subscribe to this mod's changes

error-handling is a skill published in the GitHub repository kreek/consult (1 stars, last pushed 1mo ago), licensed MIT. It adds 25 tokens to every session and 687 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-08-31.

Related

error-handling compared with skills from other repositories

error-handling next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
error-handlingkreek/consultSkill11mo agoMITA25Codex
contractsramboz/jigSkill65d agoMITA163Claude Code
build-falco-web-appgaelic-ghost/socketSkill113mo agoApache-2.0A42Claude Code
build-giraffe-web-appgaelic-ghost/socketSkill113mo agoApache-2.0A43Claude Code
build-oxpecker-web-appgaelic-ghost/socketSkill113mo agoApache-2.0A44Claude Code
swift-openapi-client-workflowgaelic-ghost/socketSkill113mo agoApache-2.0A73Claude Code, Codex
aspnet-core-service-workflowgaelic-ghost/socketSkill113mo agoApache-2.0A45Claude Code