error-code-design

Community

Turn failures into stable, actionable error contracts

Authormachenjie
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill designs error responses that are safe, consistent, and diagnosable, so clients can reliably branch on machine-readable codes instead of fragile messages, and operators can trace failures without leaking internal details.

Core Features & Use Cases

  • Stable error code governance: Ensures error code/type values remain compatibility contracts over time, preventing breaking changes when wording changes.
  • Secure response shaping: Prevents raw exceptions, stack traces, database/provider details, and internal implementation names from reaching clients.
  • Transport- and contract-aligned semantics: Aligns HTTP status decisions with RFC 9110 and defines retryability and correlation behavior so client behavior is predictable.
  • Validation and authorization posture: Standardizes field-level validation violations and uses an existence-leakage-aware approach for 404 vs 403 to reduce enumeration risk.

Use it when designing a new service or subdomain’s API error taxonomy, defining retry and idempotency expectations for failure scenarios, or establishing a publishable error catalog that supports long-term client integration.

Quick Start

Use the error-code-design skill to produce an error catalog entry (code taxonomy, HTTP/grpc mapping, user-safe messages, retry guidance, trace/correlation requirements, and validation/authorization rules) for your next API error scenario.

Dependency Matrix

Required Modules

None required

Components

references

đź’» Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: error-code-design
Download link: https://github.com/machenjie/rd-skills/archive/main.zip#error-code-design

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.