Agent skill · software engineering · erichowens
rest-api-design
Design REST API endpoints with Zod validation and OpenAPI documentation. Use when creating new API routes, validating request/response schemas, or updating API documentation. Activates for
Why this skill is useful
Adds specific Zod validation patterns and OpenAPI documentation practices that the AI wouldn't reliably generate on its own.
What it needs
About 5k tokens when loaded. Last updated 2026-07-14. 180 stars on the source repository.
What this skill does
REST API Design This skill helps you design and implement REST API endpoints following project patterns with Zod validation and OpenAPI documentation. When to Use ✅ USE this skill for: Creating new REST API endpoints with Next.js App Router Designing request/response schemas with Zod Implementing proper error handling and status codes Adding rate limiting and authentication Generating OpenAPI documentation ❌ DO NOT use for: GraphQL APIs → different paradigm entirely Cloudflare Workers → use cloudflare-worker-dev skill Supabase Edge Functions → use Supabase docs WebSocket/real-time APIs → different patterns API Route Structure Standard Route Template Zod Schema Patterns Basic Types Advanced Patterns Query Parameter Validation Error Response Format HTTP Status Codes Code Use Case ------ ---------- 200 Successful GET, PUT, PATCH 201 Successful POST (created) 204 Successful DELETE (no content) 400 Invalid request/validation error 401 Not authenticated 403 Not authorized (authenticated but forbidden) 404 Resource not found 409 Conflict (duplicate, etc.) 429 Rate limit exceeded 500 Server error OpenAPI Documentation Update docs/openapi.yaml when adding endpoints: Route Handler Patterns Dynamic Routes Pagination References Zod Documentation Next.js Route Handlers OpenAPI Specification Dub.co Zod Validation
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills erichowens/rest-api-design