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
npx -y skills add swd3k/skills --skill api-rest-designAssembled 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
| Code | When |
|---|---|
| 200/201 | success |
| 400 | validation |
| 401/403 | authz |
| 404 | missing |
| 409 | conflict |
| 429 | rate limit |
| 5xx | server fault |
Workflow
- List use cases, not tables.
- Define request/response examples first.
- Authn/authz matrix per route.
- Idempotency for payments/webhooks.
- 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.