error-handling-contracts

error-handling-contracts is a skill for Codex from jeremylongworth-source/AgentSkills. It costs 49 tokens per session (322 once invoked), scanned A, original, MIT.

A design for consistent ways that backend services and APIs report failures to the software or people using them.

In plain words
What is it for?
Use it to specify error response formats, failure mappings, retry and idempotency behavior, correlation IDs, safe messages, examples, and tests.
Why use it?
It prevents confusing or unsafe errors by defining status codes, validation details, retry rules, logging, and which information can be shown publicly.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions Codex.

Good fit Use it to specify error response formats, failure mappings, retry and idempotency behavior, correlation IDs, safe messages, examples, and tests.

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

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-contracts

README.md
[![agentmods](https://agentmods.dev/badge/skills/jeremylongworth-source/agentskills/error-handling-contracts/github.svg)](https://agentmods.dev/skills/jeremylongworth-source/agentskills/error-handling-contracts)
Your own site
<a href="https://agentmods.dev/skills/jeremylongworth-source/agentskills/error-handling-contracts"><img src="https://agentmods.dev/badge/skills/jeremylongworth-source/agentskills/error-handling-contracts/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-contracts

Your own site · 80×15
<a href="https://agentmods.dev/skills/jeremylongworth-source/agentskills/error-handling-contracts"><img src="https://agentmods.dev/badge/skills/jeremylongworth-source/agentskills/error-handling-contracts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 322 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.00049 $0.00322
Opus 5 $0.00024 $0.00161
Sonnet 5 $0.00010 $0.00064
Haiku 4.5 $0.00005 $0.00032

Measured 5d ago against content hash e4ea37f7a5ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

error-handling-contracts 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-contracts/SKILL.md · 46 lines

What it actually says

Error Handling Contracts

Core Workflow

  1. Identify clients, failure modes, transport, user-facing surfaces, and logging or observability needs.
  2. Define an error envelope with code, message, details, correlation ID, retry guidance, and documentation link where useful.
  3. Map domain failures to status codes or exception types.
  4. Separate client-safe messages from internal diagnostics.
  5. Specify retryability, idempotency, rate-limit behavior, and partial failure handling.
  6. Add tests and examples for expected error cases.

Safety Rules

  • Do not expose stack traces, secrets, SQL, internal hosts, or sensitive user data in client-facing errors.
  • Do not use errors to hide authorization decisions when explicit denial is required by product or compliance needs.
  • Escalate error contracts for payments, auth, customer data, or public APIs.

Deliverable Shape

For error contracts, provide:

  • Error envelope
  • Status code or exception mapping
  • Validation error format
  • Retry and idempotency guidance
  • Logging and correlation guidance
  • Client-safe versus internal fields
  • Examples
  • Test cases

References

  • Read references/error-handling-contracts-checklist.md when designing or reviewing backend error handling.
Files

What ships with it

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

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 · 46 lines · 49 tokens per session scan A e4ea37f7a5ea

Subscribe to this mod's changes

error-handling-contracts is a skill published in the GitHub repository jeremylongworth-source/AgentSkills (1 stars, last pushed 6d ago), licensed MIT. It adds 49 tokens to every session and 322 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

insforge-debug

Use when diagnosing problems in an InsForge project — reactive failures (SDK error object, HTTP 4xx/5xx, gateway timeout 502/503/504, edge function failure or timeout, login/OAuth/auth errors, RLS denial, realtime channel issues, slow query on one endpoint, edge function or Vercel deploy failure), proactive audits…

aiskillstore/marketplace · 107 tokens

firebase-development-debug

This skill should be used when troubleshooting Firebase emulator issues, rules violations, function errors, auth problems, or deployment failures. Triggers on "error", "not working", "debug", "troubleshoot", "failing", "broken", "permission denied", "emulator issue".

aiskillstore/marketplace · 62 tokens

fabric-rest-api-remediate

Diagnose and resolve Microsoft Fabric REST API errors including HTTP 401 Unauthorized, 403 Forbidden, 404 Not Found, 429 Throttling, and 5xx server errors. Use when debugging Fabric API authentication failures, Entra ID token issues, insufficient scopes, throttling/rate limiting, long running operation (LRO) polling…

PatrickGallucci/fabric-skills · 104 tokens

fabric-udf-perf-remediate

Diagnose and resolve performance issues with Microsoft Fabric User Data Functions. Use when functions are slow, timing out, returning errors, consuming excessive capacity units, or exhibiting cold start latency. Covers execution timeouts, response size limits, connection bottlenecks, logging analysis, capacity metrics…

PatrickGallucci/fabric-skills · 81 tokens

authos-backend-integration

Secure backend APIs with AuthOS-issued JWTs and the AuthOS Node server adapter. Use when building an API that must verify AuthOS bearer tokens, enforce JWT claims, add Express middleware, validate JWKS keys, or create a backend-owned session after a browser OAuth callback.

drmhse/authos_skill · 62 tokens

authos-device-flow

Implement AuthOS device authorization for CLIs, TVs, and headless apps. Use when requesting device codes, building activation pages, polling /auth/token, handling MFA during device auth, or adding platform admin CLI login through AuthOS.

drmhse/authos_skill · 52 tokens