Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
jeffallan avatar

Api Designer

  • 4.7k installs
  • 10.8k repo stars
  • Updated May 20, 2026
  • jeffallan/claude-skills

api-designer is an agent skill for designing REST and GraphQL APIs with OpenAPI 3.1, pagination, RFC 7807 errors, and versioning.

About

The api-designer skill is a senior API architect workflow for REST and GraphQL APIs with comprehensive OpenAPI 3.1 specifications. The six-step core workflow analyzes domain requirements, models resources and relationships with an entity diagram, designs URI patterns and HTTP methods, writes the OpenAPI contract validated via npx @redocly/cli lint openapi.yaml, mocks with npx @stoplight/prism-cli mock openapi.yaml, and plans versioning with deprecation strategy. Must-do rules include resource-oriented REST, consistent snake_case or camelCase naming, RFC 7807 problem details, pagination on collections, documented auth, and rate limiting considerations. Must-not rules forbid verbs in URIs, inconsistent response shapes, missing error docs, and breaking changes without migration paths. Deliverables include resource models, endpoint specs, OpenAPI YAML, auth flows, error catalogs, pagination patterns, and lint-passing validation. Reference guides load for REST patterns, versioning, pagination, error handling, and OpenAPI details on demand.

  • Six-step workflow from domain analysis through OpenAPI lint and Prism mock verification.
  • Requires OpenAPI 3.1 with RFC 7807 problem+json error responses on all 4xx and 5xx.
  • Mandates pagination on collection endpoints and explicit versioning deprecation policies.
  • Forbids verbs in URIs, inconsistent envelopes, and breaking changes without migration paths.
  • Ships copy-paste OpenAPI 3.1 starter with CursorPage pagination and BearerAuth security.

Api Designer by the numbers

  • 4,680 all-time installs (skills.sh)
  • +155 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #143 of 4,386 Backend & APIs skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

api-designer capabilities & compatibility

Capabilities
resource and relationship modeling · openapi 3.1 specification authoring · rfc 7807 error response catalog · pagination and filtering pattern design · versioning deprecation and mock verification
Works with
github
Use cases
api development · documentation · code review
npx skills add https://github.com/jeffallan/claude-skills --skill api-designer

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs4.7k
repo stars10.8k
Security audit3 / 3 scanners passed
Last updatedMay 20, 2026
Repositoryjeffallan/claude-skills

How do I design a production-grade API contract with consistent errors, pagination, and versioning?

Design REST or GraphQL APIs with OpenAPI 3.1 specs, resource modeling, pagination, RFC 7807 errors, versioning, and mock verification.

Who is it for?

API architects designing REST or GraphQL services with OpenAPI 3.1 and RFC 7807 error standards.

Skip if: Skip when you only need framework-specific implementation; pair with fastapi-expert or nestjs-expert after design.

When should I use this skill?

User designs REST API, OpenAPI spec, resource modeling, API versioning, or GraphQL schema architecture.

What you get

Lint-validated OpenAPI 3.1 spec with resource model, auth flows, error catalog, and mock-tested endpoints.

  • OpenAPI 3.1 YAML specification
  • Resource model diagram
  • Error response catalog

By the numbers

  • OpenAPI 3.1 target version
  • RFC 7807 problem details required
  • Redocly lint validation step

Files

SKILL.mdMarkdownGitHub ↗

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:

TopicReferenceLoad When
REST Patternsreferences/rest-patterns.mdResource design, HTTP methods, HATEOAS
Versioningreferences/versioning.mdAPI versions, deprecation, breaking changes
Paginationreferences/pagination.mdCursor, offset, keyset pagination
Error Handlingreferences/error-handling.mdError responses, RFC 7807, status codes
OpenAPIreferences/openapi.mdOpenAPI 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)

openapi: "3.1.0"
info:
  title: Example API
  version: "1.1.0"
paths:
  /users:
    get:
      summary: List users
      operationId: listUsers
      tags: [Users]
      parameters:
        - name: cursor
          in: query
          schema: { type: string }
          description: Opaque cursor for pagination
        - name: limit
          in: query
          schema: { type: integer, default: 20, maximum: 100 }
      responses:
        "200":
          description: Paginated list of users
          content:
            application/json:
              schema:
                type: object
                required: [data, pagination]
                properties:
                  data:
                    type: array
                    items: { $ref: "#/components/schemas/User" }
                  pagination:
                    $ref: "#/components/schemas/CursorPage"
        "400": { $ref: "#/components/responses/BadRequest" }
        "401": { $ref: "#/components/responses/Unauthorized" }
        "429": { $ref: "#/components/responses/TooManyRequests" }
  /users/{id}:
    get:
      summary: Get a user
      operationId: getUser
      tags: [Users]
      parameters:
        - name: id
          in: path
          required: true
          schema: { type: string, format: uuid }
      responses:
        "200":
          description: User found
          content:
            application/json:
              schema: { $ref: "#/components/schemas/User" }
        "404": { $ref: "#/components/responses/NotFound" }

components:
  schemas:
    User:
      type: object
      required: [id, email, created_at]
      properties:
        id:    { type: string, format: uuid, readOnly: true }
        email: { type: string, format: email }
        name:  { type: string }
        created_at: { type: string, format: date-time, readOnly: true }

    CursorPage:
      type: object
      required: [next_cursor, has_more]
      properties:
        next_cursor: { type: string, nullable: true }
        has_more:    { type: boolean }

    Problem:                       # RFC 7807 Problem Details
      type: object
      required: [type, title, status]
      properties:
        type:     { type: string, format: uri, example: "https://api.example.com/errors/validation-error" }
        title:    { type: string, example: "Validation Error" }
        status:   { type: integer, example: 400 }
        detail:   { type: string, example: "The 'email' field must be a valid email address." }
        instance: { type: string, format: uri, example: "/users/req-abc123" }

  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/problem+json:
          schema: { $ref: "#/components/schemas/Problem" }
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/problem+json:
          schema: { $ref: "#/components/schemas/Problem" }
    NotFound:
      description: Resource not found
      content:
        application/problem+json:
          schema: { $ref: "#/components/schemas/Problem" }
    TooManyRequests:
      description: Rate limit exceeded
      headers:
        Retry-After: { schema: { type: integer } }
      content:
        application/problem+json:
          schema: { $ref: "#/components/schemas/Problem" }

  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

security:
  - BearerAuth: []

RFC 7807 Error Response (copy-paste)

{
  "type": "https://api.example.com/errors/validation-error",
  "title": "Validation Error",
  "status": 422,
  "detail": "The 'email' field must be a valid email address.",
  "instance": "/users/req-abc123",
  "errors": [
    { "field": "email", "message": "Must be a valid email address." }
  ]
}
  • 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

Related skills

How it compares

api-designer is an agent skill for designing REST and GraphQL APIs with OpenAPI 3.1, pagination, RFC 7807 errors, and versioning, not a generic alternative.

FAQ

Who is api-designer for?

Senior developers and architects producing OpenAPI 3.1 contracts with pagination and RFC 7807 errors.

When should I use api-designer?

When modeling API resources, writing OpenAPI specs, or planning versioning and error response standards.

Is api-designer safe to install?

Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.