REST API Design

Installation
SKILL.md

REST API Design

APIs are products: the consumer's mental model, not your database schema, decides the shape. The costly mistake this skill prevents is shipping an inconsistent surface - mixed naming, wrong status codes, offset pagination on a growing table - that every consumer then hardcodes around, making it effectively unfixable once integrated.

Operating procedure

Work in this order. Resources come before methods because method semantics depend on what the resource is; error and pagination contracts come before the spec is written because retrofitting them breaks consumers.

Step 1: gather inputs

Collect before designing. Label any assumption as a guess.

  1. The consumers: internal services, first-party clients, or external developers. External consumers raise the consistency bar - default to external if unknown.
  2. The core nouns of the domain and which ones own which (drives nesting).
  3. Expected collection sizes and growth. A list that can exceed ~10,000 rows rules out offset pagination.
  4. Read/write ratio and latency expectations per endpoint.
  5. Auth model (affects 401 vs 403 correctness).

Step 2: name resources

Installs
GitHub Stars
1
First Seen
REST API Design — skillmedev/full-stack-web-dev