⚡AgentSkills
⚙️ Backend Engineering · API Design

Model REST resources without leaking internals (GraphQL flavor)

Design stable resource-oriented endpoints with deliberate error contracts and pagination.

foundation~30 minBackend EngineersAPI DevelopersPlatform Engineers

Steps

  1. 1List nouns (resources) from the domain; map verbs to HTTP methods
  2. 2Pluralize collections; nest at most one level for ownership
  3. 3Standardize errors as {code, message, details} with correct status codes
  4. 4Paginate every collection by cursor; never offset past 10k rows
  5. 5Version in the URL path from v1; document deprecation policy
  6. 6Publish an OpenAPI spec and generate clients from it
  7. 7Schema-first types; expose one query root per aggregate
  8. 8Enforce depth and complexity limits; disable introspection in prod if needed

Common Pitfalls

  • ▲RPC-in-disguise endpoints like /getUserData
  • ▲Leaking column names and internal IDs in payloads

Commands

Install with skills CLI
$ npx skills add aniruddhaadak80/skills --skill api-design-rest-resource-modeling-graphql
Install globally
$ npx skills add aniruddhaadak80/skills --skill api-design-rest-resource-modeling-graphql -g

Tags

#rest#api#http#backend-engineering#api-design

Related skills

Design stable resource-oriented endpoints with deliberate error contracts and pagination.

⚙️ Backend Engineering·~30m

Accept retried mutations gracefully by keying operations so duplicates return the original result.

⚙️ Backend Engineering·~30m

Run two versions in parallel, observe usage, and sunset safely with real telemetry.

⚙️ Backend Engineering·~40m