api-errors

api-errors is a skill for Claude Code, Codex from samuelfaj/distill. It costs 12 tokens per session (64 once invoked), scanned A, original, Apache-2.0.

A guide for shaping errors returned by an HTTP API, the web interface that programs use to communicate. It defines consistent JSON fields for an error, message, and optional details.

In plain words
What is it for?
Use it when implementing validation failures and other API errors, including responses that identify each invalid field.
Why use it?
It gives clients predictable errors and prevents internal stack traces from being exposed to users.

Skill for Claude CodeCodex

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

Good fit Use it when implementing validation failures and other API errors, including responses that identify each invalid field.

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

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 api-errors

README.md
[![agentmods](https://agentmods.dev/badge/skills/samuelfaj/distill/api-errors/github.svg)](https://agentmods.dev/skills/samuelfaj/distill/api-errors)
Your own site
<a href="https://agentmods.dev/skills/samuelfaj/distill/api-errors"><img src="https://agentmods.dev/badge/skills/samuelfaj/distill/api-errors/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 api-errors

Your own site · 80×15
<a href="https://agentmods.dev/skills/samuelfaj/distill/api-errors"><img src="https://agentmods.dev/badge/skills/samuelfaj/distill/api-errors.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 64 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.00012 $0.00064
Opus 5.5 $0.00005 $0.00026
Sonnet 5.5 $0.00002 $0.00013
Haiku 4.5 $0.00001 $0.00006

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

Security

Grade A, and why

api-errors 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 17d 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.

tools/task_cost_eval/profiles/realistic/skills/api-errors/SKILL.md · 8 lines

What it actually says

Api errors

Errors are JSON objects with code (stable snake_case), message (human readable) and optional details. Never leak stack traces. Validation errors use status 422 and list each failing field.

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. 17d ago First seen · 8 lines · 12 tokens per session scan A 2d1eae9e3e12

Subscribe to this mod's changes

api-errors is a skill published in the GitHub repository samuelfaj/distill (784 stars, last pushed 4d ago), licensed Apache-2.0. It adds 12 tokens to every session and 64 once invoked, about $0.0000 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-11-13.

Related

api-errors compared with skills from other repositories

api-errors next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
api-errorssamuelfaj/distillSkill7844d agoApache-2.0A12Claude Code, Codex
open-sourcebrowser-use/browser-useSkill122ktodayMITA101Claude Code
stripe-projectsNousResearch/hermes-agentSkill267ktodayMITA15Claude Code, Codex
fastapi-patternsaffaan-m/ECCSkill313k7d agoMITA35Claude Code, Kiro
statusmem0ai/mem0Skill70k2d agoApache-2.0A54Claude Code
mem0-test-integrationmem0ai/mem0Skill70k2d agoApache-2.0A207Claude Code, Codex
mem0-oss-to-platformmem0ai/mem0Skill70k2d agoApache-2.0A217Claude Code, Codex