api-design-restful
RESTful API design patterns, error handling, and documentation
npx skills add majiayu000/claude-skill-registry --skill api-design-restful-autohandai-community-skills-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.
# RESTful API Design ## Core Principles 1. **Resource-Oriented** - URLs represent nouns, not verbs 2. **Stateless** - Each request contains all necessary information 3. **Consistent** - Use standard HTTP methods and status codes 4. **Versioned** - Support API evolution without breaking clients ## URL Structure ``` # Collection resources GET /api/v1/users # List users POST /api/v1/users # Create user # Individual resources GET /api/v1/users/:id # Get user PUT /api/v1/users/:id # Replace user PATCH /api/v1/users/:id # Update user DELETE /api/v1/users/:id # Delete user # Nested resources GET /api/v1/users/:id/posts # User's posts POST /api/v1/users/:id/posts # Create post for user # Filtering, sorting, pagination GET /api/v1/users?status=active&sort=-createdAt&page=2&limit=20 ``` ## Response Structure ### Success Response ```typescript interface SuccessResponse<T> { success: true; data: T; meta?: { page?: number; limit?: number; total?: number; totalPages?: number; }; } // Example { "success": true, "data": { "id": "123", "name": "John" }, "meta": { "requestId": "abc-123" } } ``` ### Error Response ```typescript interface ErrorResponse { success: false; error: { code: string; // Machi
- Core Principles
- URL Structure
- Response Structure
- Success Response
- Error Response
- HTTP Status Codes
- Express.js Implementation
- Validation with Zod
- Authentication
- Rate Limiting
- Best Practices
What does the api-design-restful skill do?
RESTful API design patterns, error handling, and documentation
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-design-restful-autohandai-community-skills-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.
