What problem does it solve?
This Skill ensures that all REST APIs designed and implemented follow a consistent set of best practices for resource naming, HTTP methods, status codes, and error response formats, leading to more predictable and maintainable APIs.
Core Features & Use Cases
- Consistent Resource Naming: Enforces the use of plural nouns for collections and standard ID patterns for resources.
- Standardized HTTP Methods: Guides the correct usage of GET, POST, PUT, PATCH, and DELETE.
- Predictable Pagination & Filtering: Defines standard query parameters for efficient data retrieval.
- Uniform Error Handling: Mandates the use of RFC 7807 Problem Details for all API error responses, ensuring a consistent structure for
type, title, status, detail, and instance.
- Use Case: When building a new microservice or adding endpoints to an existing one, this Skill ensures that its API contract aligns with all other services in the ecosystem, simplifying integration and client development.
Quick Start
Use the rest-api-design-and-errors skill to design a new endpoint for retrieving user tasks, ensuring it follows the standard /api/v1/users/{user_id}/tasks pattern and uses Problem Details for errors.