Pular para o conteúdo
Skillpedia
APIs e servidores (backend)12 mil · #11405

api-designer

O que ela faz

Ele orienta o agente de IA a planejar os recursos, endpoints e contratos de uma API antes de construí-la. É para desenvolvedores e arquitetos que querem um desenho de API claro.

Quando usar

  • ✓Quando você está projetando uma nova API REST ou GraphQL.
  • ✓Quando você precisa de uma especificação OpenAPI escrita e verificada.
  • ✓Quando precisa definir regras de paginação, tratamento de erros ou versionamento.

Link da skill

https://github.com/Jeffallan/claude-skills/blob/main/skills/api-designer/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/Jeffallan/claude-skills/blob/main/skills/api-designer/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Projete uma API REST para o meu app de reservas e escreva a especificação OpenAPI dela.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente modela os recursos e seus relacionamentos, define endpoints e schemas e escreve um arquivo OpenAPI 3.1. Depois verifica o arquivo com um linter e testa o contrato em um servidor simulado.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

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)

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, exampl
Perguntas frequentes

Que ferramentas verificam a especificação?

Ele usa um linter para validar o arquivo OpenAPI e um servidor simulado para testar o contrato.

Ele cobre versionamento de API?

Sim. Planeja versionamento, descontinuação e mudanças compatíveis com versões anteriores.

Ele cobre paginação?

Sim. Cobre os padrões de paginação por cursor, por offset e por chave.

Detalhes

Descrição original do autor

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.

repo: Jeffallan/claude-skills

Popularidade

Estrelas no GitHub
12 mil
Posição no ranking
#11405
Licença
MIT
Atualizada em
30/10/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas