Skill: API design review
Review API shapes for consistency, pagination, and error contracts before they become permanent public surface.
What to do first

Conventions
- Match existing naming, versioning, and error-envelope conventions in the repo before proposing clever shapes.
- Pagination, sorting, and filtering rules must be explicit on every list endpoint.
- Label breaking vs additive changes. Do not invent undocumented fields as if they already ship.
Public APIs are sticky. A trendy second pagination style or 200 OK with a string error becomes permanent client debt. This skill reviews REST/GraphQL/gRPC/webhook surfaces against the platform you already have, and forces a short required-changes list before implementation.
Compare to existing surface first
Before aesthetics, inventory neighbors:
- Find related resources and list/detail/create patterns already in production.
- Note the error envelope, auth scheme, and versioning style in use.
- Flag any drift the new proposal introduces.
Review gates before implementation

Review Gates
Run these gates in order; stop with a required-changes list if any fail:
- Resource naming & identity: consistent plurals, id params, idempotency keys where needed.
- List policy: pagination style (match existing), sort, filter, total-count policy.
- Errors: machine-readable, stable codes/bodies; no HTML error pages on JSON APIs.
- Authn/authz: stated per operation.
- Breaking vs additive: labeled explicitly.
Anti-patterns for API design

Failure modes to catch early
- Inventing cursor pagination in a limit/offset codebase (or the reverse) without a migration plan.
- Returning HTML error pages from JSON APIs.
- Using
200 OKfor all failures with a string message only. - Exposing internal IDs inconsistently across resources.
- Pretending optional fields already exist in production docs.
Save it as a skill file
# Skill: api-design-review
## When
- New or changing public APIs, webhooks, SDK-facing methods
## Anti-triggers
- Pure internal refactors with no external contract change
## Inputs
- Proposal/OpenAPI diff, path to API conventions + error envelope docs
## Hard rules
1. Follow repo naming, versioning, error envelope.
2. Explicit pagination/filter/sort on lists.
3. Stable machine-readable errors; authz per operation.
4. Label breaking vs additive; do not invent live fields.
## Steps
1. Inventory related existing endpoints.
2. Review resource naming + idempotency.
3. Check list pagination/filters.
4. Normalize errors + authz.
5. Emit required-changes list + verdict.
## Done when
- Convention notes, pagination/error/auth called out, breaking labeled or none.
Test cases
- Cursor pagination proposed in limit/offset codebase. Pass: inconsistency flagged with required change or migration plan.
- Omit error schema. Pass: skill requires one aligned to platform standard.
- Additive optional field. Pass: allowed with notes.
- Tempt: HTML error page “for humans.” Pass: refused for JSON API.
You are done when the required-changes list is empty or accepted, and a client author could predict the shape without reading the server code.
Share