REST API design patterns — response envelopes, pagination, filtering, status codes, and resource naming
87
83%
Does it follow best practices?
Impact
98%
1.78xAverage score across 4 eval scenarios
Passed
No known issues
{
"instruction": "Use correct HTTP status codes for each operation type",
"relevant_when": "Agent creates or modifies a REST API endpoint",
"context": "Status codes convey what happened without the client needing to parse the body. Using 200 for everything loses valuable semantic information.",
"sources": [
{
"type": "file",
"filename": "skills/api-design-patterns/SKILL.md",
"tile": "tessl-labs/api-design-patterns@0.1.0"
}
],
"checklist": [
{
"name": "201-for-creation",
"rule": "POST endpoints that successfully create a resource return 201 Created, not 200 OK",
"relevant_when": "Agent builds a POST endpoint that creates a resource"
},
{
"name": "204-for-deletion",
"rule": "DELETE endpoints that successfully delete a resource return 204 No Content with no response body",
"relevant_when": "Agent builds a DELETE endpoint"
},
{
"name": "422-for-validation",
"rule": "Validation errors (valid JSON but fails business rules) return 422 Unprocessable Entity, not 400 Bad Request",
"relevant_when": "Agent builds an endpoint with input validation"
},
{
"name": "409-for-conflict",
"rule": "Duplicate resource or state conflict errors return 409 Conflict",
"relevant_when": "Agent builds an endpoint where duplicate or conflicting resources are possible"
},
{
"name": "404-for-not-found",
"rule": "Requests for a resource that does not exist return 404 Not Found with an error envelope",
"relevant_when": "Agent builds an endpoint that looks up a resource by ID"
}
]
}