api-design-reviewer
Skill0 starsChanged 6 months agoMITView on GitHub
Reviews REST/HTTP and JSON API designs for consistency, correctness, and evolvability — resource naming, HTTP methods and status codes, pagination, filtering, errors, versioning, idempotency, and auth. Use when the user shares an API spec, OpenAPI/Swagger doc, endpoint list, or route handlers, or asks to review, critique, or design an API.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- darkweb19/skillstheir own version, first seen Nov 8, 2026
- kazemcodes/skill-treetheir own version, first seen Nov 8, 2026
- Hassaan146/claude-skillstheir own version, first seen Jul 25, 2026
- mahiunfiltered/claude-code-skillstheir own version, first seen Jul 8, 2026
- Hussain-Elfalah/Agentic-Skillstheir own version, first seen Jun 4, 2026
- csiddhant796-blip/claude-skills-collectiontheir own version, first seen May 10, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- Hassaan146/claude-skills★ 18same name
- csiddhant796-blip/claude-skills-collection★ 2same name
- Hussain-Elfalah/Agentic-Skills★ 2same name
- kazemcodes/skill-tree★ 1same name
- mahiunfiltered/claude-code-skills★ 1same name
- Arnav-0/claude-code-setup★ 0same name
- darkweb19/skills★ 0same name
- sharmasundip/claudeskills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- a11y-auditorSkill
- changelog-writerSkill
- conventional-commit-writerSkill
- dockerfile-hardenerSkill
- env-secrets-auditorSkill
- error-message-explainerSkill
- pr-description-writerSkill
- readme-generatorSkill
- regex-builderSkill
- sql-query-optimizerSkill
- test-writerSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Use IDs in the path, filters in the query string.
- Very specific: line 57
Avoid "200 with { "error": ...
- Distinctive: line 72
Never leak stack traces, SQL, or internal hostnames.
- Very specific: line 76
Prefer cursor pagination (?limit=20&cursor=...) over offset for large/append-heavy data.
- Very specific: line 94
Document a deprecation policy and use the Deprecation/Sunset headers.
- Distinctive: line 101
Use HTTPS only; set sensible CORS.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
API Design Reviewer
Review an HTTP/JSON API for the things that make it pleasant, predictable, and safe to evolve. Give actionable feedback grouped by area, with the corrected shape.
Workflow
- [ ] 1. Inventory the resources, endpoints, methods, and payloads
- [ ] 2. Review against the checklist below
- [ ] 3. Report findings by area with severity and a concrete fix
- [ ] 4. Show the corrected request/response where it helpsReview checklist
1. Resources & URLs
- Nouns, not verbs:
POST /ordersnotPOST /createOrder. The HTTP method is the verb. - Plural collection names:
/users,/users/{id},/users/{id}/orders. - Lowercase, hyphenated paths; no file extensions; no trailing slashes inconsistency.
- Nest only to express ownership, and not more than ~2 levels deep. Prefer
/orders?customer_id=42over/customers/42/orders/7/items/9/.... - Use IDs in the path, filters in the query string.
2. HTTP methods & semantics
GET(safe, no side effects, cacheable),POST(create / non-idempotent action),PUT(full replace, idempotent),PATCH(partial update),DELETE(idempotent).GETmust never mutate state.PUT/DELETEmust be idempotent (calling twice = calling once). Support anIdempotency-Keyheader forPOSTthat creates resources.
3. Status codes (use the specific one)
| Code | When |
| 200 | OK with body |
| 201 | Created (include a Location header to the new resource) |
| 202 | Accepted (async work queued) |
| 204 | Success, no body (e.g. DELETE) |
| 400 | Malformed request / validation error |
| 401 | Not authenticated |
| 403 | Authenticated but not authorized |
| 404 | Resource not found |
| 409 | Conflict (duplicate, version mismatch) |
| 422 | Semantically invalid (valid syntax, bad values) |
| 429 | Rate limited (include Retry-After) |
| 500 / 503 | Server error / unavailable |
Avoid "200 with { "error": ... }" — let the status code carry the outcome.
4. Errors (consistent, machine-readable)
Adopt one error envelope everywhere. RFC 9457 Problem Details is a good default:
{
"type": "https://api.example.com/errors/validation",
"title": "Validation failed",
"status": 422,
"detail": "email must be a valid address",
"errors": [{ "field": "email", "code": "invalid_format" }]
}Include a stable machine-readable code, a human detail, and per-field errors for forms.
Never leak stack traces, SQL, or internal hostnames.
5. Collections: pagination, filtering, sorting
- Paginate every list endpoint by default; document the cap.
- Prefer cursor pagination (
?limit=20&cursor=...) over offset for large/append-heavy data; return the next cursor in the body or aLinkheader. - Filtering and sorting via query params:
?status=open&sort=-created_at. - Return total counts only when cheap; they're often expensive at scale.
6. Payload conventions
- Pick one case style (
snake_caseorcamelCase) and use it everywhere. - Timestamps in ISO 8601 UTC (
2026-05-22T14:30:00Z). Money as integer minor units + currency code, never floats. - Be liberal in what you accept, conservative in what you return; don't break clients by removing fields — deprecate first.
- Wrap list responses in an object (
{ "data": [...], "next_cursor": "..." }) so you can add metadata without breaking clients.
7. Versioning & evolution
- Version from day one: URL (
/v1/...) is simplest and most visible; header-based works too. - Additive changes (new optional field, new endpoint) are non-breaking. Removing/renaming a field or changing a type is breaking — version it.
- Document a deprecation policy and use the
Deprecation/Sunsetheaders.
8. Security & limits
- Authenticate with
Authorization: Bearer <token>; never put credentials in the URL. - Enforce authorization per resource (object-level), not just per route.
- Validate and bound all inputs (string length, array size, numeric ranges).
- Rate-limit and return
429+Retry-After; exposeRateLimit-*headers. - Use HTTPS only; set sensible CORS; never trust client-supplied IDs for ownership.
Severity guide
- Critical: broken auth/authorization,
GETwith side effects, no input validation. - High: wrong/ambiguous status codes, inconsistent errors, no pagination on large lists.
- Medium: verb-in-URL naming, mixed casing, missing versioning strategy.
- Low: naming polish, optional metadata, documentation gaps.
Example finding
Endpoint: POST /getUserOrders returns 200 { "error": "not found" } for unknown users.
Findings:
[High] Verb in URL + wrong method. Use: GET /users/{id}/orders
[High] Wrong status. Unknown user should be 404, not 200-with-error.
[Medium] No pagination on a potentially large collection. Add ?limit & ?cursor.Corrected:
GET /v1/users/42/orders?limit=20&cursor=eyJpZCI6N30
200 OK
{ "data": [ ... ], "next_cursor": "eyJpZCI6Mjd9" }
# unknown user:
404 Not Found
{ "type": ".../errors/not-found", "title": "User not found", "status": 404 }Common edge cases
- Bulk operations: define a clear partial-success contract (e.g.
207 Multi-Statusor a per-item results array) rather than all-or-nothing ambiguity. - Long-running actions: return
202+ a status resource to poll, or a webhook. - Search: complex queries that don't fit a URL can use
POST /resource/search; document why it's aPOST. - GraphQL/gRPC: these conventions are REST-specific; note when the API isn't REST.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

