api-design
REST and API design principles — resource naming, HTTP methods, status codes, pagination, versioning, and error responses. Reference when designing or reviewing APIs.
npx skills add majiayu000/claude-skill-registry --skill api-design-claude-code-communit-claude-code-resource --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.
# API Design ## RESTful Resource Naming ### Conventions | Rule | Good | Bad | |-----------------------------|-----------------------------------|--------------------------------------| | Use plural nouns | `/users` | `/user`, `/getUsers` | | Use nouns, not verbs | `POST /orders` | `POST /createOrder` | | Nest for relationships | `/users/123/orders` | `/getUserOrders?userId=123` | | Use kebab-case | `/user-profiles` | `/userProfiles`, `/user_profiles` | | Keep URLs shallow (max 3) | `/users/123/orders` | `/users/123/orders/456/items/789` | | Use query params for filters| `/orders?status=pending` | `/orders/pending` | | Collection + resource IDs | `/users/123` | `/user?id=123` | ### URL Structure ``` https://api.example.com/v1/users # Collection https://api.example.com/v1/users/123 # Single resource https://api.example.com/v1/users/123/orders # Nested collection https://api.example.com/v1/users/123/orders/456 # Nested resource https://api.example.com/v1/orders?status=pending # Filtered collection ``` ### Actions That Do Not Map to CRUD For operations that are not simple CRUD, use a sub-resource or action noun: ``` POST /users/123/activate # State transition POST /orders/456/refund #
- RESTful Resource Naming
- Conventions
- URL Structure
- Actions That Do Not Map to CRUD
- HTTP Method Semantics
- Method Usage Rules
- Examples
- Status Code Guide
- Success Codes
- Client Error Codes
- Server Error Codes
- Decision Tree
- Structured Error Response Format
- Error Response Rules
What does the api-design skill do?
REST and API design principles — resource naming, HTTP methods, status codes, pagination, versioning, and error responses. Reference when designing or reviewing APIs.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-design-claude-code-communit-claude-code-resource --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.
