agentsclimarketplace

Api rest design

Skill swd3k/skills/agent-skills/programming/api-rest-design

Design practical REST/JSON APIs with consistent errors, versioning, and auth boundaries. Use when adding backend endpoints or reviewing API shapes.From its SKILL.md

Install
npx -y skills add swd3k/skills --skill api-rest-design

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.0 KB, 223 tokens by cl100k_base, as published. Nobody here has run it

REST API Design

Defaults

  • Nouns for resources: /projects, /projects/{id}
  • Plural names; nest only one level deep when possible
  • JSON camelCase or snake_case — pick one repo-wide
  • Explicit error body: { "error": { "code", "message" } }

Status codes

CodeWhen
200/201success
400validation
401/403authz
404missing
409conflict
429rate limit
5xxserver fault

Workflow

  1. List use cases, not tables.
  2. Define request/response examples first.
  3. Authn/authz matrix per route.
  4. Idempotency for payments/webhooks.
  5. OpenAPI or equivalent living doc.

Pitfalls

  • Returning 200 for all errors
  • Leaking stack traces
  • Breaking clients without version strategy

Acceptance

  • Happy path + 2 failure examples per endpoint documented

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.