api-design
REST API design best practices for consistent, intuitive APIs
npx skills add majiayu000/claude-skill-registry --skill api-design-aiskillstore-marketplace --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 Principles Design APIs that are intuitive, consistent, and a joy to use. ## URL Structure ### Resources as Nouns ``` # GOOD - nouns GET /users GET /users/123 GET /users/123/orders # BAD - verbs GET /getUsers GET /fetchUserById/123 POST /createNewUser ``` ### Plural Resource Names ``` # GOOD - plural GET /users GET /orders GET /products # BAD - singular GET /user GET /order ``` ### Hierarchical Relationships ``` # Parent-child relationships GET /users/123/orders # Orders for user 123 GET /orders/456/items # Items in order 456 # Avoid deep nesting (max 2 levels) # BAD GET /users/123/orders/456/items/789/reviews # GOOD - flatten when needed GET /order-items/789/reviews ``` ## HTTP Methods | Method | Usage | Idempotent | Safe | |--------|-------|------------|------| | GET | Read resource | Yes | Yes | | POST | Create resource | No | No | | PUT | Replace resource | Yes | No | | PATCH | Partial update | Yes | No | | DELETE | Remove resource | Yes | No | ``` GET /users # List users POST /users # Create user GET /users/123 # Get user 123 PUT /users/123 # Replace user 123 PATCH /users/123 # Update user 123 DELETE /users/123 # Delete user 123 ``` ## Request/Response Format ### C
- URL Structure
- Resources as Nouns
- Plural Resource Names
- Hierarchical Relationships
- HTTP Methods
- Request/Response Format
- Consistent JSON Structure
- Use camelCase
- Status Codes
- Success (2xx)
- Client Errors (4xx)
- Server Errors (5xx)
- Pagination
- Offset-based (simple)
What does the api-design skill do?
REST API design best practices for consistent, intuitive APIs
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-design-aiskillstore-marketplace --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.
