본문으로 건너뛰기
cccskills
무료GitHub에 공개

api-design

API design: REST conventions, OpenAPI, versioning, pagination, error format, GraphQL, webhooks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane스타 3(GitHub 3 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(3)

  • SKILL.md3.7 KB
  • references/anti-patterns.md1.1 KB
  • references/versioning-deprecation.md983 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

api-design — REST, GraphQL, Versioning & Docs

MANDATORY WORKFLOW

Antes de recomendar o generar cualquier diseño, completar estos pasos en orden.

Step 0: Gather Requirements

Clarificar (o inferir del contexto si ya fue especificado):

  1. ¿API nueva o extensión? (si es extensión, leer la existente primero)
  2. Tipos de clientes: SPA / mobile / third-party / server-to-server
  3. ¿Over-fetch o deeply nested relations? → influye en REST vs GraphQL
  4. Auth: JWT / API Key / OAuth / ninguna
  5. ¿Versioning desde día 1? ¿Hay clientes externos que no podemos romper?

Si el usuario ya especificó estos valores, saltar directamente al Step 1.

Step 1: Recomendar approach

Usar la tabla API Style Decision más abajo para elegir REST / GraphQL / gRPC. Explicar la elección en 1 oración.

Step 2: Diseñar + Verificar

Implementar el diseño. Al terminar, validar contra el Checklist al final de este documento.


API Style Decision

StyleUse when
RESTDefault. CRUD-dominant, cacheable, broad client support
GraphQLMultiple clients with very different shapes, deep nested relations, significant over-fetch
gRPCInternal service-to-service, streaming, strict contracts, performance-critical

REST Conventions

  • URLs: plural nouns, kebab-case, nesting max 2 levels, no verbs. Pattern: /api/v1/resources/{id}/sub-resources
  • Verbs: GET (read), POST (create, use Idempotency-Key if critical), PUT (full replace), PATCH (partial), DELETE
  • Pagination: cursor keyset over offset (offset drifts with concurrent writes, re-scans rows)
  • Response wrapper: { "data": [...], "pagination": { "cursor": "...", "hasMore": true } }
  • Filtering/sorting: ?filter[status]=active&sort=-createdAt&fields=id,name
  • Dates: ISO 8601 UTC. IDs: opaque (never auto-increment — reveals volume)
  • Rate limiting headers: X-RateLimit-Limit, X-RateLimit-Remaining, Retry-After

Error Format — RFC 9457 Problem Details

Fields: type (URI), title, status, detail, traceId (log correlation). Never invent a custom format. Never expose stack traces in production.

Schema-first Approach

  1. Recommended: OpenAPI spec first, generate types + client code
  2. Alternative (Fastify): Code-first with Zod, auto-generate OpenAPI via @fastify/swagger
  3. Monorepo: Share schemas in packages/api-types between backend and frontend
  4. Tooling: Lint (Spectral), mock (Prism), docs (Redocly/Scalar)

Versioning

  • Default: URL path (/v1/) — simple, cacheable, grep-friendly
  • Non-breaking (no bump): add optional field, new endpoint, new enum value
  • Breaking (requires bump): remove/rename field, change type, change status codes

→ Read references/versioning-deprecation.md for deprecation flow, support windows, and webhook outbound details

Anti-patterns

→ Read references/anti-patterns.md for 10 common API design anti-patterns with corrections

Checklist

  • URLs plural, no verbs, nesting max 2
  • Correct status codes, RFC 9457 errors with traceId
  • Cursor pagination with { data, pagination } wrapper
  • OpenAPI spec up-to-date and linted, generated types in client
  • Breaking changes trigger version bump
  • Deprecation headers + usage monitoring on old endpoints
  • Rate limit headers, auth documented per endpoint
  • Webhooks signed with HMAC

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Plan, design, and implement A/B tests and experiments with statistical rigor. Covers hypothesis frameworks, sample sizing, metrics, and result analysis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Web/mobile accessibility decision guide: WCAG 2.2 AA, ARIA, keyboard nav, focus management, contrast, testing. Use for: a11y, accessibility, wcag, aria, screen reader, keyboard, contrast.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Generate, iterate, and scale ad creative for paid advertising across Google, Meta, LinkedIn, and X. Covers platform specs, creative frameworks, and quality validation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Musica interactiva para juegos: layering vertical, re-secuenciacion horizontal, stingers, reglas de transicion con sync points, y mapeo de estados de gameplay a musica. Usar para: musica adaptativa, sistema de musica dinamica, transiciones musicales, combat music.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Design multi-agent systems, create agent architectures, define communication patterns, and build autonomous agent workflows with structured evaluation frameworks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, response formats, and quality loops.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

SebastianLuser/claude-code-arcane32026년 10월 27일 업데이트

SebastianLuser의 스킬 모두 보기

이 스킬의 문제 신고