When creating or extending an HTTP API for client consumption.
Installation
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
["existing API codebase or new service structure"]
output_contract
["lowercase URLs","status codes used semantically","RFC 7807 errors","versioned endpoints"]
failure_conditions
["using verbs in URLs","HTTP 200 for failures","nesting deeper than 2 levels"]
last_updated
"2026-05-15T00:00:00.000Z"
RESTful API Design
Purpose
REST APIs MUST be intuitive, predictable, and semantically correct. This skill ensures APIs use HTTP methods correctly, communicate errors clearly via standard formats, and maintain consistency across resources so clients can interact with them reliably without surprise behavior.
When to use
Building a new backend service exposing resources
Adding a new domain entity to an existing API
Creating integration endpoints for third-party partners
Designing webhooks or callback mechanisms
Standardizing an inconsistent API across a microservices architecture
Agent MUST NEVER: Use verbs in URLs, return 200 for errors, nest beyond 2 levels, mix status code semantics
Agent MUST ASK: Before changing versioning strategy, before modifying existing endpoint contracts
Agent MUST VALIDATE: All status codes correct, no URL verbs, pagination present, RFC 7807 errors
Example
❌ Anti-pattern (Verbs in URL, wrong status codes, deep nesting, no pagination):
GET /api/getUsers HTTP/1.1
HTTP/1.1 200 OK
{
"status": "error",
"message": "User not found"
}
GET /api/companies/123/departments/456/employees/789/tasks/assignToUser HTTP/1.1
GET /v1/users?limit=20&offset=0 HTTP/1.1
HTTP/1.1 200 OK
{
"data": [...],
"pagination": {
"limit": 20,
"offset": 0,
"total": 150
}
}
GET /v1/users/123 HTTP/1.1
HTTP/1.1 404 Not Found
{
"type": "https://api.example.com/errors/resource-not-found",
"title": "Resource Not Found",
"detail": "The requested user does not exist",
"status": 404,
"instance": "/v1/users/123"
}
GET /v1/users/123/orders?limit=10&offset=0 HTTP/1.1