Best for
- Designing a new REST API or endpoint set from scratch
- Defining the API contract for a microservice before implementation begins
- Reviewing and improving an existing API design before it goes public
- Standardizing API conventions across a team or organization
What it produces
The generated document covers:- Overview — API purpose, consumer table (who calls it and how), design principles
- Resource model — Mermaid ERD of domain entities, ownership map (who can read/write each resource)
- Authentication & authorization — token mechanism, role table, service-layer enforcement rule
- Versioning strategy — URI vs. header versioning decision, deprecation timeline,
Sunset/Deprecationheaders - Endpoint specifications — per-endpoint: method, path, query/path params, request schema, response schema (with examples), status codes, authorization, error conditions
- Error handling — RFC 7807 Problem Details schema, standard error catalog (400–503)
- Rate limiting — per-consumer limits,
X-RateLimit-*headers,Retry-Afterbehavior - Pagination — offset or cursor-based wrapper schema, default/maximum page sizes
- Idempotency — which POST endpoints require
Idempotency-Key, collision behavior - Webhooks — event catalog, HMAC-SHA256 signing, retry policy, DLQ
- File upload/download, CORS configuration, batch operations, conditional requests (ETags), caching strategy, health check endpoints, soft-delete vs. hard-delete
- OpenAPI 3.1 YAML snippet — syntactically valid, covers all core endpoints
- Breaking vs. non-breaking changes reference table
- Security checklist and alternatives considered
How to invoke it
Example scenarios
Payment links service
Webhook management
B2B partner integration
Convention standardization
Key concepts
Richardson Maturity Model — target Level 2+
Richardson Maturity Model — target Level 2+
- Level 0: Single endpoint, single verb — not REST
- Level 1: Resources with unique URIs
- Level 2: HTTP methods and status codes used correctly — this is the minimum standard the skill enforces
- Level 3: Hypermedia controls (HATEOAS) — optional for discovery-driven APIs
POST /payments rather than /createPayment. Plural nouns for collections: /users, not /user. Nested resources imply ownership: GET /merchants/{id}/transactions.RFC 7807 Problem Details — the error standard
RFC 7807 Problem Details — the error standard
{ "error": "msg" } with structured responses:Versioning strategy — URI vs. header
Versioning strategy — URI vs. header
/v1/, /v2/) — simple, explicit, cacheable. Recommended for public APIs.Header versioning (Accept: application/vnd.api+json;version=2) — cleaner URLs but harder to test in browsers and curl.The skill picks one and applies it consistently. Deprecated versions advertise the sunset date via Deprecation and Sunset response headers with a Link: rel="successor-version" pointer.Idempotency keys — safe POST retries
Idempotency keys — safe POST retries
Idempotency-Key: <UUID> header. The server stores key + response for 24 hours and returns the cached response on duplicate keys without re-executing. Duplicate keys with a different request body return HTTP 422 idempotency-key-mismatch.Pagination — no unbounded list endpoints
Pagination — no unbounded list endpoints
Webhook specification — HMAC-SHA256 signing
Webhook specification — HMAC-SHA256 signing
X-Webhook-Signature and X-Webhook-Timestamp headers, retry count and backoff strategy, dead-letter queue behavior, and endpoint registration with challenge-response verification.HTTP semantics reference
HTTP semantics reference
Interview process
The skill runs a structured interview before drafting — reading all prior.engineering-docs/ files first to avoid re-asking known facts.
Phase 1: Socratic clarification (mandatory)
Phase 2: Resource model (40–60 min)
Phase 3: Endpoint design (1–2 hrs)
Phase 4: Cross-cutting concerns (40–60 min)
Phase 5: OpenAPI 3.1 snippet (60–90 min)
$ref component reuse.Phase 6: Revision (after user review)
last_updated.Output structure
The generated.engineering-docs/9-api-design-document.md follows this structure:
Handoff
Reads from
4-technical-specification.md— functional requirements, use cases7-system-architecture.md— tech stack, architectural patterns8-database-design-document.md— data model, entities, relationships
Feeds into
11-admin-access-control-specification.md— API actions that need permissions12-security-threat-model.md— API surface for threat modeling14-technical-blueprint.md— API contracts in feature designs15-implementation-plan.md— endpoints sequenced in build phases
Quality gate
Before marking the documentfinal, every item below must be checked:
- Every endpoint specifies method, path, request schema, response schema, status codes, and authorization requirements
- All error responses follow RFC 7807 Problem Details format consistently across all endpoints
- Every list endpoint has pagination defined with both default and maximum page sizes
- The security checklist has all items checked or explicitly waived with written justification
- The OpenAPI 3.1 snippet is syntactically valid and covers all core endpoints
