api-design
REST API design best practices. Use when designing APIs, choosing status codes, or creating endpoints.
npx skills add majiayu000/claude-skill-registry --skill api-design-tibsfox-gsd-skill-creator-3 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# REST API Design ## Endpoint Rules - **Nouns, not verbs:** `/users` not `/getUsers` — HTTP method is the verb - **Plural nouns:** `/users`, `/orders` — consistent collections - **Kebab-case:** `/user-profiles` not `/user_profiles` - **Max 2 levels nesting:** `/users/{id}/orders` — deeper use query params - **No trailing slashes, no extensions** ## HTTP Methods | Method | Purpose | Idempotent | |--------|---------|------------| | GET | Retrieve | Yes | | POST | Create | No | | PUT | Replace entire resource | Yes | | PATCH | Partial update | No | | DELETE | Remove | Yes | ## Status Codes | Code | Use When | |------|----------| | 200 | Success with body | | 201 | Resource created (+ Location header) | | 204 | Success, no body (DELETE) | | 400 | Malformed request | | 401 | Not authenticated | | 403 | Authenticated but forbidden | | 404 | Not found | | 409 | Conflict (duplicate) | | 422 | Valid syntax, invalid semantics | | 429 | Rate limited | ## Error Format ```json {"error": {"code": "VALIDATION_ERROR", "message": "...", "details": [], "request_id": "req_..."}} ``` ## Key Rules - Always paginate lists (cursor-based preferred, max page size enforced) - Never expose sequential IDs — u
- Endpoint Rules
- HTTP Methods
- Status Codes
- Error Format
- Key Rules
What does the api-design skill do?
REST API design best practices. Use when designing APIs, choosing status codes, or creating endpoints.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-design-tibsfox-gsd-skill-creator-3 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
