skills/en/tao-api-design/SKILL.md
RESTful API design conventions including endpoint naming, HTTP methods, status codes, pagination, error handling, and versioning patterns. Use when designing APIs, creating endpoints, or reviewing API contracts.
npx skillsauth add andretauan/tao tao-api-designInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use when designing REST APIs, defining endpoint contracts, or reviewing API consistency.
GET /api/v1/users # List (collection)
POST /api/v1/users # Create
GET /api/v1/users/:id # Read (single)
PUT /api/v1/users/:id # Full update
PATCH /api/v1/users/:id # Partial update
DELETE /api/v1/users/:id # Delete
GET /api/v1/users/:id/orders # Nested resource
Rules:
/users, NOT /getUsers/order-items, NOT /orderItems| Code | When | |------|------| | 200 | Success (GET, PUT, PATCH) | | 201 | Created (POST) | | 204 | No Content (DELETE) | | 400 | Bad request (validation error) | | 401 | Unauthorized (no/invalid auth) | | 403 | Forbidden (auth OK, no permission) | | 404 | Not found | | 409 | Conflict (duplicate) | | 422 | Unprocessable entity (semantic error) | | 429 | Too many requests (rate limit) | | 500 | Internal server error |
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Email is required",
"details": [
{ "field": "email", "issue": "required" }
]
}
}
GET /api/v1/users?page=2&per_page=20
Response headers:
X-Total-Count: 150
Link: <...?page=3>; rel="next", <...?page=1>; rel="prev"
Response body:
{
"data": [...],
"meta": { "page": 2, "per_page": 20, "total": 150, "pages": 8 }
}
GET /api/v1/users?status=active&role=admin # Filter
GET /api/v1/users?sort=-created_at,name # Sort (- = desc)
GET /api/v1/users?q=john # Search
/api/v1/users (recommended)Accept: application/vnd.api+json;version=1testing
Estratégia de pirâmide de testes com análise de cobertura, identificação de edge cases e planejamento de testes. Use ao planejar testes, melhorar cobertura, identificar edge cases ou escrever especificações de teste.
development
Auditoria de segurança alinhada ao OWASP Top 10 com checklist para injection, XSS, autenticação, autorização, gestão de secrets e vulnerabilidades comuns. Use ao auditar segurança, revisar código de auth ou hardening de aplicação.
development
Metodologia de refatoração segura com detecção de code smells, transformação passo-a-passo e prevenção de regressão. Use ao refatorar código, reduzir dívida técnica ou melhorar estrutura.
testing
Decomposição expert de tarefas para criar PLAN.md no TAO. Quebra features em fases e tarefas com critérios de aceite, estimativas e dependências. Use ao planejar trabalho, criar fases ou decompor features.