api-patterns
REST API and GraphQL design patterns, authentication, error handling, and best practices. Use when building APIs, designing endpoints, or implementing backend services.
npx skills add majiayu000/claude-skill-registry --skill api-patterns-wania-kazmi-claude-code-autonomo-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.
# API Design Patterns & Best Practices ## REST API Principles ### 1. Resource-Based URLs ``` # GOOD: Resource-oriented GET /users # List users GET /users/123 # Get specific user POST /users # Create user PUT /users/123 # Update user (full) PATCH /users/123 # Update user (partial) DELETE /users/123 # Delete user # BAD: Action-oriented GET /getUsers POST /createUser POST /updateUser/123 ``` ### 2. Use Proper HTTP Methods - **GET**: Read (idempotent, cacheable) - **POST**: Create (not idempotent) - **PUT**: Replace (idempotent) - **PATCH**: Partial update (not idempotent) - **DELETE**: Remove (idempotent) ### 3. Use Proper HTTP Status Codes ```typescript // Success 200 OK // General success 201 Created // Resource created (POST) 204 No Content // Success with no body (DELETE) // Client Errors 400 Bad Request // Invalid input 401 Unauthorized // No/invalid auth 403 Forbidden // Auth valid but not allowed 404 Not Found // Resource doesn't exist 409 Conflict // Resource state conflict 422 Unprocessable // Validation failed // Server Errors 500 Internal // Unexpected error 503 Unavailable // Service temporarily down ``` ## Response Format ### Standard Response Structure ```typescript inte
- REST API Principles
- 1. Resource-Based URLs
- 2. Use Proper HTTP Methods
- 3. Use Proper HTTP Status Codes
- Response Format
- Standard Response Structure
- Request Validation
- Zod Schema Validation
- Error Handling
- Custom Error Classes
- Global Error Handler
- Authentication Patterns
- JWT Authentication
- API Key Authentication
What does the api-patterns skill do?
REST API and GraphQL design patterns, authentication, error handling, and best practices. Use when building APIs, designing endpoints, or implementing backend services.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-patterns-wania-kazmi-claude-code-autonomo-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.
