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 a consistent response envelope for all API endpoints",
"relevant_when": "Agent creates or modifies a REST API endpoint",
"context": "Consistent response shapes let clients parse every response the same way. Success responses wrap data in { data: ... }, error responses use { error: { code, message } }.",
"sources": [
{
"type": "file",
"filename": "skills/api-design-patterns/SKILL.md",
"tile": "tessl-labs/api-design-patterns@0.1.0"
}
],
"checklist": [
{
"name": "success-data-envelope",
"rule": "All success responses (200, 201) wrap the resource or resource array in a { data: ... } envelope",
"relevant_when": "Agent builds API endpoints that return JSON responses"
},
{
"name": "error-envelope-structure",
"rule": "All error responses use { error: { code: '...', message: '...' } } with a machine-readable code string and a human-readable message",
"relevant_when": "Agent builds API endpoints that can return errors"
},
{
"name": "no-mixed-data-error",
"rule": "No response contains both a data field and an error field — a response is either success (data) or failure (error), never both",
"relevant_when": "Agent builds API endpoints that return JSON responses"
}
]
}