error-envelope

error-envelope is a skill for Claude Code from sigistry/marketplace. It costs 99 tokens per session (1,002 once invoked), scanned A, original, MIT.

A skill for returning API errors in one consistent, machine-readable format while validating requests at the boundary. It uses RFC 9457 Problem Details, a standard format for HTTP error responses.

In plain words
What is it for?
Use it to standardize validation failures and API error responses, including fields such as the problem type, HTTP status, detail, and instance.
Why use it?
It avoids inconsistent error shapes, false-success responses, and accidental exposure of stack traces across endpoints.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the api-contract-keeper plugin — 4 skills, 3 commands, 2 agents shipped together

Good fit Use it to standardize validation failures and API error responses, including fields such as the problem type, HTTP status, detail, and instance.

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

Made for: Claude Code.

Or install api-contract-keeper, the plugin that ships this one along with the rest of its 4 skills, 3 commands, 2 agents.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/sigistry/marketplace/error-envelope"><img src="https://agentmods.dev/badge/skills/sigistry/marketplace/error-envelope.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,002 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.00099 $0.01002
Opus 5.5 $0.00040 $0.00401
Sonnet 5.5 $0.00020 $0.00200
Haiku 4.5 $0.00010 $0.00100

Measured 3mo ago against content hash cfe02c34ebd1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

error-envelope 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 3mo 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.

plugins/api-contract-keeper/skills/error-envelope/SKILL.md · 43 lines

How it starts

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

Error Envelope

Purpose

Provide one standardized way to (1) validate a request at the boundary and (2) return every error in a consistent, machine-readable envelope. These are high-volume boilerplate that teams re-implement inconsistently, one endpoint returns { "error": "bad" }, the next returns a 200 with { "success": false }, a third leaks a stack trace. The cure is a single validation layer plus a single error format: RFC 9457 Problem Details (application/problem+json), which obsoletes RFC 7807 (same wire format, updated reference).

The RFC 9457 envelope

Every error response is application/problem+json with these standard members (all optional, but be consistent):

Member Meaning
type A URI identifying the problem kind (dereferenceable docs, or about:blank). The primary identifier.
title Short, human-readable, stable summary for that type.
status The HTTP status code, duplicated in the body.
detail Human-readable explanation specific to this occurrence.
instance A URI for this specific occurrence (e.g. the request path or an error id).

Add extension members for machine use: errors (per-field validation failures), traceId/requestId, code (your internal error code), retryAfter. See references/rfc9457.md.

Validation → error, at the boundary

Validate params, query, and body before business logic. A validator failure is not an exception to leak, map it into the envelope with a 422 Unprocessable Content (or 400) and an errors array of { field, message, code }. See references/validation-patterns.md for the idiomatic validator per stack (Zod, Pydantic, class-validator, Joi, JSON Schema/Ajv, Go validator, Rails strong params) and how to reshape each library's native error into the envelope.

Golden rules

  • One error handler. Centralize the envelope in middleware / an exception filter / @ControllerAdvice / DRF exception_handler: never hand-format errors per route.
  • Status in the status line and the body. They must match.
  • Never 200-with-error. An error is a 4xx/5xx; a 200 { success: false } breaks every generic client and HTTP cache.
  • Reject unknown fields in strict endpoints (.strict(), forbid_extra, additionalProperties: false) so typos and injected fields fail loudly.
  • Never leak internals. No stack traces, SQL, file paths, or ORM messages in detail; log those server-side and put a traceId in the body instead.
  • Stable type URIs. Clients branch on type, not on the prose in title/detail: keep type stable even when you reword the message.
  • Content negotiation. Set Content-Type: application/problem+json so clients can distinguish a problem from a normal body.

Read the full file on GitHub · 43 lines

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. 3mo ago First seen · 43 lines · 99 tokens per session scan A cfe02c34ebd1

Subscribe to this mod's changes

error-envelope is a skill published in the GitHub repository sigistry/marketplace (3 stars, last pushed 7d ago), licensed MIT. It adds 99 tokens to every session and 1,002 once invoked, about $0.0004 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-envelope compared with skills from other repositories

error-envelope next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
error-envelopesigistry/marketplaceSkill37d agoMITA99Claude Code
design-code-architecturewondelai/skillsSkill2.9k4d agoMITA220Claude Code
system-designwondelai/skillsSkill2.9k4d agoMITA139Claude Code, Codex
mcp-tool-devandisab/swe-marketplaceSkill233d agoMITA158Claude Code
mcp-server-devandisab/swe-marketplaceSkill233d agoMITA175Claude Code
nodejsxobotyi/cc-foundrySkill23yesterdayMITB50Claude Code
zogxobotyi/cc-foundrySkill23yesterdayMITB45Claude Code