API Contract
Define request/response shapes, validation, and client usage for an API endpoint.
When to Use
- •Use this skill when adding or updating an API endpoint.
- •Use this skill when you need typed contracts shared across client and server.
Inputs
- •Endpoint path and method
- •Request body/query params
- •Response shape and error cases
- •Auth requirements
Instructions
- •Define TypeScript types for request and response.
- •Add runtime validation (zod or equivalent).
- •Provide a typed client function signature.
- •Document error cases and status codes.
Output
- •Types, validation schema, and client function stub.