skills/api-design/SKILL.md
REST API design conventions and contract standards. Use when: designing API endpoints, defining request/response schemas, implementing pagination, versioning APIs, creating OpenAPI specs, adding rate limiting, designing error responses, auditing existing APIs for REST convention compliance, or improving API consistency and documentation.
npx skillsauth add michaelsvanbeek/personal-agent-skills 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.
/projects, /users, /orders./projects/{id}/members./build-logs, not /buildLogs.| Method | Purpose | Idempotent | Response |
|--------|---------|------------|----------|
| GET | Read resource(s) | Yes | 200 with body |
| POST | Create resource | No | 201 with created resource |
| PUT | Replace resource entirely | Yes | 200 with updated resource |
| PATCH | Partial update | No* | 200 with updated resource |
| DELETE | Remove resource | Yes | 204 no body |
*PATCH can be made idempotent with proper design.
Use the correct status code. Don't return 200 for everything.
| Code | When | |------|------| | 200 | Successful read or update | | 201 | Resource created | | 204 | Successful delete (no body) | | 400 | Invalid request (validation error, malformed body) | | 401 | Authentication required or invalid | | 403 | Authenticated but not authorized | | 404 | Resource not found | | 409 | Conflict (duplicate, state mismatch) | | 422 | Semantically invalid (well-formed but logically wrong) | | 429 | Rate limited | | 500 | Server error (never expose internals) |
All errors return a consistent shape:
{
"error": "validation_error",
"message": "Name is required and must be between 1-100 characters",
"status": 400,
"details": [
{ "field": "name", "issue": "required" }
],
"request_id": "abc-123"
}
error: Machine-readable error code (snake_case).message: Human-readable explanation.status: HTTP status code (duplicated for convenience).details: Optional array of field-level errors.request_id: Correlation ID for debugging.Never expose stack traces, internal paths, or database errors.
Prefer cursor-based pagination over offset-based. Offset pagination breaks when data changes between pages.
GET /projects?limit=25&cursor=eyJpZCI6MTIzfQ
limit: Page size (default: 25, max: 100).cursor: Opaque string encoding the position. Base64-encoded JSON is common.{
"data": [...],
"pagination": {
"next_cursor": "eyJpZCI6MTQ4fQ",
"has_more": true,
"total": 247
}
}
total is optional — include if cheaply available, omit if it requires a full count query.cursor.GET /projects?status=active&owner=usr_42&sort=-updated_at&fields=id,name,status
sort param. Prefix with - for descending.fields param to reduce payload size.status=active,archived (comma-separated)./v1/projects.Sunset and Deprecation headers on the old version.For non-idempotent operations (POST), support an Idempotency-Key header:
POST /orders
Idempotency-Key: unique-client-generated-uuid
409 Conflict if the key was used with different request body.Return rate limit info in response headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 42
X-RateLimit-Reset: 1711000800
429 Too Many Requests when limit is exceeded.Retry-After header with seconds until reset.camelCase for JSON APIs consumed by JavaScript clients, snake_case for Python-to-Python APIs. Pick one and be consistent.2026-03-20T12:00:00Z.prj_123, usr_456."field": null.{ "data": [...] }. Single resources can be returned directly or wrapped consistently.For FastAPI web server implementation patterns, see the python-web-server skill. For database design and query patterns backing API endpoints, see the database skill. For input validation and security hardening, see the security skill.
development
TypeScript coding standards and type safety conventions. Use when: creating TypeScript files, defining interfaces and types, writing type-safe code, reviewing TypeScript for type correctness, auditing a codebase for type safety gaps, eliminating any or ts-ignore usage, or improving strict-mode compliance. Covers strict typing, avoiding any and ts-ignore, discriminated unions, Zod runtime validation, immutability patterns, and proper type definitions.
testing
Writing clear, actionable tickets in any issue tracker (Jira, Linear, GitHub Issues, ServiceNow, etc.). Use when: creating epics, stories, tasks, bugs, or spikes; writing acceptance criteria; decomposing work for a sprint; linking dependencies between tickets; auditing backlog items for clarity; or coaching a team on ticket quality. Covers title conventions, description templates, acceptance criteria, decomposition rules, dependency linking, and org-specific pluggable configuration.
development
Testing strategy, patterns, and evaluation for software and LLM/AI systems. Use when: writing tests, choosing test boundaries, designing test data, structuring test suites, evaluating LLM outputs, building evaluation pipelines, setting coverage thresholds, auditing test coverage gaps in existing projects, or improving test quality and structure.
development
Writing effective status updates for different audiences and cadences. Use when: writing a weekly status update, preparing a monthly summary, drafting a quarterly review, sending updates to leadership, sharing progress with stakeholders, or improving the clarity and impact of team communications. Covers weekly, monthly, and quarterly formats tailored for upward, lateral, and downward communication.