REST API design best practices, versioning strategies, error handling, pagination, and OpenAPI documentation. Use when designing or implementing REST APIs, HTTP endpoints, or API documentation.
Provides REST API design guidance covering resource naming, HTTP methods, status codes, error handling, pagination, versioning, and OpenAPI documentation. Activates when designing or implementing HTTP endpoints and APIs.
/plugin marketplace add akaszubski/autonomous-dev/plugin install autonomous-dev@autonomous-devThis skill is limited to using the following tools:
docs/advanced-features.mddocs/authentication.mddocs/documentation.mddocs/error-handling.mddocs/http-status-codes.mddocs/idempotency-content-negotiation.mddocs/pagination.mddocs/patterns-checklist.mddocs/rate-limiting.mddocs/request-response-format.mddocs/rest-principles.mddocs/versioning.mdREST API design best practices, HTTP conventions, versioning, error handling, and documentation standards.
RESTful resource design using nouns (not verbs), proper HTTP methods, and hierarchical URL structure.
Key Principles:
/users, /posts (not /getUsers, /createPost)/users/123/posts for related resourcesSee: docs/rest-principles.md for detailed examples and patterns
Proper status code usage for success (2xx), client errors (4xx), and server errors (5xx).
Common Codes:
See: docs/http-status-codes.md for complete reference and examples
RFC 7807 Problem Details format for consistent, structured error responses.
Standard Format:
{
"type": "https://example.com/errors/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "Email address is invalid",
"instance": "/users",
"errors": {
"email": ["Must be a valid email address"]
}
}
See: docs/error-handling.md for implementation patterns and best practices
JSON structure conventions for request bodies and response payloads.
Best Practices:
snake_case for JSON keysSee: docs/request-response-format.md for detailed examples
Offset-based and cursor-based pagination strategies for large datasets.
Offset-Based (simple, good for small datasets):
GET /users?page=2&limit=20
Cursor-Based (scalable, handles real-time updates):
GET /users?cursor=abc123&limit=20
See: docs/pagination.md for implementation details and trade-offs
URL path versioning (recommended) and header-based versioning strategies.
URL Path Versioning:
/v1/users
/v2/users
When to Version:
See: docs/versioning.md for migration strategies and deprecation policies
API key and JWT authentication patterns for securing endpoints.
API Key (simple, good for service-to-service):
Authorization: Bearer sk_live_abc123...
JWT (stateless, good for user authentication):
Authorization: Bearer eyJhbGc...
See: docs/authentication.md for implementation patterns
Rate limit headers and strategies to prevent abuse.
Standard Headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200
See: docs/rate-limiting.md for implementation strategies
CORS configuration, filtering, sorting, and search patterns.
Topics:
See: docs/advanced-features.md for detailed patterns
OpenAPI/Swagger documentation for API discoverability.
Auto-Generated (FastAPI):
@app.get("/users/{user_id}", response_model=User)
def get_user(user_id: int):
"""Get user by ID"""
return db.get_user(user_id)
See: docs/documentation.md for OpenAPI specifications
Idempotency, content negotiation, HATEOAS, bulk operations, and webhooks.
Topics:
See: docs/idempotency-content-negotiation.md and docs/patterns-checklist.md
| Pattern | Use Case | Details |
|---|---|---|
| REST Principles | Resource-based URLs | docs/rest-principles.md |
| Status Codes | HTTP response codes | docs/http-status-codes.md |
| Error Handling | RFC 7807 errors | docs/error-handling.md |
| Pagination | Large datasets | docs/pagination.md |
| Versioning | Breaking changes | docs/versioning.md |
| Authentication | API security | docs/authentication.md |
| Rate Limiting | Abuse prevention | docs/rate-limiting.md |
| Documentation | OpenAPI/Swagger | docs/documentation.md |
Before Launch:
See: docs/patterns-checklist.md for complete checklist
This skill uses progressive disclosure to prevent context bloat:
docs/*.md files with implementation details (loaded on-demand)Available Documentation:
docs/rest-principles.md - RESTful design patternsdocs/http-status-codes.md - Complete status code referencedocs/error-handling.md - Error response patternsdocs/request-response-format.md - JSON structure conventionsdocs/pagination.md - Pagination strategiesdocs/versioning.md - API versioning patternsdocs/authentication.md - Authentication methodsdocs/rate-limiting.md - Rate limiting implementationdocs/advanced-features.md - CORS, filtering, sortingdocs/documentation.md - OpenAPI/Swaggerdocs/idempotency-content-negotiation.md - Advanced patternsdocs/patterns-checklist.md - Design checklist and common patternsRelated Skills:
Related Libraries:
/users, not /getUsers/v1/users)This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.