/api-engineering:scaffold-error-model [the API, or the error cases to model]from api-engineering
Scaffolds an RFC 9457 Problem Details error model for an API: generates a catalog of stable type URIs, validation-error mapping, and response shape.
Ships in api-engineering. Installing the plugin adds it to Claude Code.
You are running /api-engineering:scaffold-error-model. Build the standard error model for $ARGUMENTS following this plugin's api-implementation-engineer discipline and ../templates/problem-details-catalog.md.
The API returns inconsistent error shapes, or you're defining errors for a new contract. Part of /api-engineering:design-api; standalone when retrofitting an existing API.
application/problem+json (RFC 9457) as the one error content type — RFC 9457 obsoletes RFC 7807; same wire format (type/title/status/detail/instance + extensions). (build-one-error-model-rfc9457-problem-details.md)type catalog — a stable URI per error class (validation, unauthenticated, forbidden, not-found, conflict, precondition-failed, rate-limited, payload-too-large, internal-error). A type URI is a contract identifier; never repurpose one. Use the catalog template.validation-error type with an errors[] array (pointer + detail) rather than a different shape per field.status to the HTTP status line; pick 422 for semantic vs 400 for syntactic; 409/412/429 for conflict/stale/throttle.detail; use a traceId extension for correlation instead.200 with an error inside; never invent a per-endpoint error shape.type set.type: "about:blank" is valid when the status code is the whole story.What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
6 commands in this plugin
/design-apiDesign an API (contract-first)Design an API contract-first — choose the paradigm (REST/GraphQL/gRPC/webhooks/async) by interaction shape, model resources not RPC verbs, author an OpenAPI 3.1/3.2 or AsyncAPI 3.0 skeleton with RFC 9457 errors + cursor pagination + security schemes, and set the versioning posture./generate-contract-testsGenerate contract tests & a mockGenerate contract tests and a mock from an API spec — consumer-driven contract tests (Pact/schema) that gate the provider's CI, a spec-driven mock (Prism/Postman) for parallel consumer dev, and a k6 load test asserted against an SLO./harden-apiHarden an API (OWASP API Top 10 2023)Run an OWASP API Security Top 10 (2023) pass over an API or endpoint — object-level (BOLA) and function-level (BFLA) authorization, token/scope validation, property-level authorization (BOPLA), resource-consumption limits, SSRF, misconfiguration, inventory, and unsafe upstream consumption. Designs controls; routes the verdict to security-reviewer./lint-api-specLint an API spec (governance gate)Lint an OpenAPI/AsyncAPI spec against the house Spectral ruleset as a governance gate — security on every operation, RFC 9457 errors, cursor pagination, no API key in query, OpenAPI 3.1+ — and wire it into CI to fail the build on violations./review-api-designReview an API designReview an existing API spec or endpoint against the house design-review checklist — paradigm/contract, resource modeling, HTTP semantics, RFC 9457 errors, cursor pagination, idempotency/concurrency, the OWASP API security pass, and versioning/lifecycle.npx claudepluginhub mcorbett51090/ravenclaude --plugin api-engineering