← ClaudeAtlas

api-designlisted

REST API design best practices covering versioning, error handling, pagination, and OpenAPI documentation. Use when designing or implementing REST APIs or HTTP endpoints. TRIGGER when: API design, REST endpoint, HTTP route, OpenAPI, swagger, pagination. DO NOT TRIGGER when: internal library code, CLI tools, non-HTTP interfaces.
akaszubski/autonomous-dev · ★ 29 · API & Backend · score 68
Install: claude install-skill akaszubski/autonomous-dev
# API Design Skill REST API design best practices, HTTP conventions, versioning, error handling, and documentation standards. ## When This Skill Activates - Designing REST APIs - Creating HTTP endpoints - Writing API documentation - Handling API errors - Implementing pagination - API versioning strategies - Keywords: "api", "rest", "endpoint", "http", "json", "openapi" --- ## Core Concepts ### 1. REST Principles RESTful resource design using nouns (not verbs), proper HTTP methods, and hierarchical URL structure. **Key Principles**: - Resources are nouns: `/users`, `/posts` (not `/getUsers`, `/createPost`) - Use HTTP methods correctly: GET (read), POST (create), PUT (replace), PATCH (update), DELETE (remove) - Hierarchical relationships: `/users/123/posts` for related resources - Keep URLs shallow (max 3 levels) **See**: `docs/rest-principles.md` for detailed examples and patterns --- ### 2. HTTP Status Codes Proper status code usage for success (2xx), client errors (4xx), and server errors (5xx). **Common Codes**: - **200 OK**: Successful GET/PUT/PATCH - **201 Created**: Successful POST (includes Location header) - **204 No Content**: Successful DELETE - **400 Bad Request**: Invalid input - **401 Unauthorized**: Authentication required - **403 Forbidden**: Authenticated but not allowed - **404 Not Found**: Resource doesn't exist - **422 Unprocessable**: Validation error - **429 Too Many Requests**: Rate limit exceeded - **500 Internal Server Error**: Server failu