selmakcby/api-design
Backend API design specialist. Use when building REST/GraphQL APIs, designing endpoints, data models, or backend architecture. Covers RESTful principles, HTTP semantics, error handling, versioning, and OWASP-aligned security.
npx skills add https://github.com/selmakcby/claude-agents-skills --skill api-design
<!--
Source: wshobson/agents (backend-development plugin)
File: https://github.com/wshobson/agents/tree/main/plugins/backend-development/skills/api-design-principles
Used by: builder agent (backend)
-->
/users/123, not /getUser?id=123/orders, not /order/users/:id/orders| Method | Use for | Idempotent | Safe |
|--------|---------|------------|------|
| GET | Read | Yes | Yes |
| POST | Create | No | No |
| PUT | Replace (full update) | Yes | No |
| PATCH | Partial update | No* | No |
| DELETE | Remove | Yes | No |
\* PATCH can be idempotent depending on semantics.
Consistent shape for all responses:
{
success: boolean
data: T | null
error: string | null
metadata?: { total, page, limit }
}
?cursor=abc&limit=20?page=1&limit=20limit server-side (max 100)?status=active&created_after=2024-01-01?sort=-created_at (minus prefix = descending)/v1/users, /v2/users (easiest to deprecate)*{ code: "INVALID_INPUT", message: "...", field: "email" }## API Design Summary
### Endpoint
`<METHOD> /path/to/resource`
### Purpose
<what it does, who uses it>
### Request
- **Auth:** <required | optional>
- **Body schema:** Zod
- **Query params:** ...
### Response
- **200:** <shape>
- **Error cases:** 400, 401, 403, 404, 422, 429, 500
### Security checks
- [ ] Auth verified
- [ ] Authorization verified (row-level)
- [ ] Input validated (Zod)
- [ ] Rate limit applied
- [ ] PII not leaked in errors
### Dependencies
- Database tables: <list>
- External services: <list>
Take selmakcby/api-design from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.