Api design reviewer
Self-hosted AI coding factory — sandboxed agents deliver tickets to merged code, gated by a human in a dashboard. Local-first, cost-transparent, human-in-the-loop.
npx -y skills add tmj-90/gaffer --skill api-design-reviewerAssembled 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.
What its author says it does
Copied from the file, not written here
Use when reviewing a PR that adds or changes API endpoints, auditing an existing API for v2 migration, or establishing REST API standards. Triggers on "API review", "REST design review", "breaking change check", "OpenAPI audit", "endpoint review", or "API consistency".
SKILL.md
3.7 KB, as published. Nobody here has run it
Review APIs before they ship
Catch inconsistent conventions, missing versioning, and design smells before APIs are consumed by clients. Breaking changes are permanent costs — find them in review, not after release.
REST design principles
Resource naming:
- Collections: plural nouns (
/users,/orders) - Instances:
/{id}(singular, no verb) - Actions that don't fit:
POST /users/{id}/activate(notGET /activateUser)
HTTP method semantics:
GET— read; must be idempotent; no side effectsPOST— create or action; not idempotentPUT— replace the whole resource; idempotentPATCH— partial update; idempotentDELETE— remove; idempotent
Status codes — common wrong choices:
| Situation | Wrong | Right |
|---|---|---|
| Resource not found | 200 with {error} body | 404 |
| Validation failure | 500 | 400 with error detail |
| Auth failure | 404 (hiding resource) | 401 (unauthenticated) or 403 (unauthorised) |
| Created resource | 200 | 201 with Location header |
| Async accepted | 200 | 202 |
Breaking change detection
These changes break existing clients and require a version bump:
- Remove an endpoint
- Remove or rename a required field
- Change a field's type
- Add a required field to a request body
- Change a status code a client depends on
- Change pagination semantics
These are safe (backward-compatible):
- Add a new optional field to a response
- Add a new endpoint
- Add a new optional query parameter
Steps
- Read the OpenAPI spec or code diff. If no spec exists, note the missing spec as a CONCERN and continue reviewing the code that exists — don't block the review on a spec that isn't there.
- Check resource naming. Plural nouns, no verbs in paths (except for actions), consistent casing.
- Check HTTP method usage. Every
GETmust be safe and idempotent.POSTfor creates and non-idempotent actions only. - Check status codes. Map every response to the correct 2xx/4xx/5xx. 200 for errors is an automatic BLOCK.
- Check for breaking changes. Diff against the previous spec/version. List every breaking change and verify it's covered by a version bump.
- Check error format. Consistent envelope:
{ "error": { "code": "...", "message": "...", "details": [...] } }— not ad-hoc per endpoint. - Check versioning. Is the versioning strategy documented — a version prefix (
/v1/), header-based versioning, or a deliberate no-version choice? A documented no-version API is fine; only an undocumented or contradictory strategy is a finding. - Emit verdict. BLOCK / CONCERNS / CLEAN with file/line evidence for each finding.
Review checklist
- Resource naming consistent — plural nouns, no verbs in paths.
- HTTP methods correct — no side-effecting
GET;PUTis idempotent;PATCHis partial. - Status codes correct — no 200 for errors; 201 for created resources.
- Error format consistent — same envelope shape across all endpoints.
- No undocumented breaking changes — every breaking change has a version bump.
- Authentication documented — every endpoint states its auth requirement.
- Pagination consistent — same cursor/offset pattern across all list endpoints.
Rules
- 200 for errors is a BLOCK finding, always.
- Breaking changes without a version bump are a BLOCK finding.
- A missing spec is a CONCERN, not a blocker — record it and review the code that exists.