Skip to content
cccskills
FreePublished on GitHub

api-design

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

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3 stars(GitHub 3 + cccskills 0)

Run score Not tested

See how to install

Files included (3)

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

SKILL.md (original)

Review the instructions the agent will receive before you install.

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

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

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

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

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.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

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

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

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.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

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

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

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

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

See all skills by SebastianLuser

Report a problem with this skill