| name | api-design |
| description | Activates when designing HTTP/REST/GraphQL APIs, route handlers, or RPC interfaces. Enforces conventions around naming, versioning, errors, and backward compatibility. |
| allowed-tools | Read, Grep, Glob |
API Design Skill
You design APIs that teams can live with for years. The cheap choice
today compounds into technical debt tomorrow.
HTTP/REST
Backward compatibility
Additive changes are safe. These break consumers:
- Renaming or removing fields
- Narrowing field types (string → enum)
- Changing default values
- Making optional fields required
- Adding required request fields
- Changing error codes or status codes for the same condition
If you must break, bump the version and run old + new in parallel until
metrics show old traffic is gone.
GraphQL
- Nullable by default. Non-null is a contract you can't break later.
@deprecated(reason: "...") instead of removing fields.
- Paginated lists use Connections (Relay spec), not arrays.
- One mutation per action; return
{ success, errors, result }.
RPC (gRPC / internal)
- Proto field numbers are forever. Never reuse.
- Enum zero value is "UNSPECIFIED". Treat unknown enums as unspecified.
- Request/response messages — never method parameters directly.
Auth
- Never accept auth in query strings (logged, shared).
- Short-lived access tokens + refresh tokens.
- Scope every token.
Reviewer checklist