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.
npx skills add Jartan-LLC/grimoire --skill api-error-patternsgit clone --depth 1 https://github.com/Jartan-LLC/grimoireWrote 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.
[](https://agentmods.dev/skills/jartan-llc/grimoire/api-error-patterns)<a href="https://agentmods.dev/skills/jartan-llc/grimoire/api-error-patterns"><img src="https://agentmods.dev/badge/skills/jartan-llc/grimoire/api-error-patterns/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.
<a href="https://agentmods.dev/skills/jartan-llc/grimoire/api-error-patterns"><img src="https://agentmods.dev/badge/skills/jartan-llc/grimoire/api-error-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00022 | $0.00375 |
| Opus 5.5 | $0.00009 | $0.00150 |
| Sonnet 5.5 | $0.00004 | $0.00075 |
| Haiku 4.5 | $0.00002 | $0.00038 |
Grade A, and why
api-error-patterns 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.
What it actually says
API Error Conventions
Response Format
All API error responses use a consistent format:
{
"detail": {
"code": "UPPER_SNAKE_CASE_CODE",
"reason": "Human-readable message."
}
}
code: Machine-readable identifier. Frontend uses this for branching logic (redirect to verification, show specific field errors).reason: User-facing message. Frontend can display directly. Always a complete sentence ending with a period.
Status Code Rules
| Status | When to Use |
|---|---|
| 200 | Successful operation that returns data |
| 201 | Resource created |
| 204 | Success with no body (logout, delete, disable) |
| 400 | Client sent bad data (invalid input, bad credentials) |
| 403 | Authenticated but forbidden (wrong password, disabled feature, insufficient role) |
| 404 | Resource not found |
| 409 | Conflict (duplicate resource) |
| 429 | Too many requests (rate limit exceeded) |
| 500 | Unexpected server error (never intentional except for genuine internal failures) |
Adding New Error Codes
- Use the
{"code": "...", "reason": "..."}format - Reuse an existing code if the error is semantically identical
- Use
UPPER_SNAKE_CASEfor codes - Write reasons as complete sentences the frontend can show to users
- Use appropriate HTTP status codes per the table above
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.
- 1mo ago First seen · 47 lines · 22 tokens per session scan A 1d1fffe50827
api-error-patterns is a skill published in the GitHub repository Jartan-LLC/grimoire (2 stars, last pushed yesterday), licensed MIT. It adds 22 tokens to every session and 375 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.
Other skills, from other repositories
integrate
Build or change a customer-system integration with explicit data mapping, permissions, retries and reconciliation. Use for connectors, imports, write-back and upstream APIs.
speckit.backend
Backend/API Developer - Build production API services, business logic, authentication and authorization, data-safe integrations, reliability controls, and verifiable contracts.
speckit.wordpress
WordPress Master Architect - Expert in developing core-compliant Themes, Gutenberg Blocks (apiVersion 3), Plugins, Interactivity API, REST API endpoints, WP-CLI automation, and Performance profiling/database optimization.
mx-lookup-post-batch
Retrieve MX records for up to 50 domains in a single request. Results for each domain are sorted by priority ascending (lowest numeric value has the highest mail delivery priority per RFC 5321).
email-validate-post-email
Validates a single email address and returns a full breakdown of syntax validity, MX record status, disposable domain check, normalized form, and any typo suggestion.
unit-conversion-post-batch
Skill "unit-conversion-post-batch" from bobadilla-tech/requiems-api-skills, covering endpoint, batch convert units, parameters, request example and response example.