CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/api-design-patterns

REST API design patterns — response envelopes, pagination, filtering, status codes, and resource naming

87

1.78x
Quality

83%

Does it follow best practices?

Impact

98%

1.78x

Average score across 4 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

response-envelope.jsonverifiers/

{
  "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"
    }
  ]
}

tile.json