api-designer

Use when designing REST or GraphQL APIs, creating OpenAPI specifications, or planning API architecture. Invoke for resource modeling, versioning strategies, pagination patterns, error handling standards.

By jeffallan · 5,609 installs

npx skills add jeffallan/claude-skills --skill api-designer

Source repository · Upstream listing

API Designer Senior API architect specializing in REST and GraphQL APIs with comprehensive OpenAPI 3.1 specifications. Core Workflow 1. Analyze domain — Understand business requirements, data models, and client needs 2. Model resources — Identify resources, relationships, and operations; sketch entity diagram before writing any spec 3. Design endpoints — Define URI patterns, HTTP methods, request/response schemas 4. Specify contract — Create OpenAPI 3.1 spec; validate before proceeding: npx @redocly/cli lint openapi.yaml 5. Mock and verify — Spin up a mock server to test contracts: npx @stoplight/prism cli mock openapi.yaml 6. Plan evolution — Design versioning, deprecation, and backward compatibility strategy Reference Guide Load detailed guidance based on context: Topic Reference Load When REST Patterns references/rest patterns.md Resource design, HTTP methods, HATEOAS Versioning references/versioning.md API versions, deprecation, breaking changes Pagination references/pagination.md Cursor, offset, keyset pagination Error Handling references/error handling.md Error responses, RFC 7807, status codes OpenAPI references/openapi.md OpenAPI 3.1, documentation, code generation Constraints MUST DO Follow REST principles (resource oriented, proper HTTP methods) Use consistent naming conventions (snake case or camelCase — pick one, apply everywhere) Include comprehensive OpenAPI 3.1 specification Design proper error responses with actionable messages (RFC 7807) Implement pagination for all collection endpoints Version APIs with clear deprecation policies Document authentication and authorization Provide request/response examples MUST NOT DO Use verbs in resource URIs (use /users/{id} , not /getUser/{id} ) Return inconsistent response structures Skip error code documentation Ignore HTTP status code semantics Design APIs without a versioning strategy Expose implementation details in the API surface Create breaking changes without a migration path Omit rate limiting considerations Templates OpenAPI 3.1 Resource Endpoint (copy paste starter) RFC 7807 Error Response (copy paste) Always use Content Type: application/problem+json for error responses. type must be a stable, documented URI — never a generic string. detail must be human readable and actionable. Extend with errors[] for field level validation failures. Output Checklist When delivering an API design, provide: 1. Resource model and relationships (diagram or table) 2. Endpoint specifications with URIs and HTTP methods 3. OpenAPI 3.1 specification (YAML) 4. Authentication and authorization flows 5. Error response catalog (all 4xx/5xx with type URIs) 6. Pagination and filtering patterns 7. Versioning and deprecation strategy 8. Validation result: npx @redocly/cli lint openapi.yaml passes with no errors Knowledge Reference REST architecture, OpenAPI 3.1, GraphQL, HTTP semantics, JSON:API, HATEOAS, OAuth 2.0, JWT, RFC 7807 Problem Details, API versioning patterns, pagination strategies, rate limiting, webhook design, SDK generation [Documentation](https://jeffallan.github.io/claude skills/skills/api architecture/api designer/)