generate-apilisted
Install: claude install-skill AVA-2568/MY_SKILL
# Generate-API (API 实现生成)
Generate API implementations (route handlers, schemas, errors) from a pre-existing contract.
## When to Use
- "Generate an Express.js endpoint for creating a user"
- "Implement the API from the OpenAPI spec"
- "Create route handlers for the user service"
- "Build a RESTful API from the api-design contract"
## When Not to Use
- Designing the API contract (endpoints, methods, data model) → route to api-design first
- Designing the database schema behind the API → route to database-design
- Full-stack scaffolding without a contract → route to api-design first, then return here
## Procedure
0. **Prerequisite check** — verify an API contract exists (from api-design skill output). If not, route to api-design first and stop. Do not generate implementation without a contract.
1. **Parse the contract** — extract endpoints, HTTP methods, path parameters, request/response schemas from the api-design output or OpenAPI spec.
2. **Generate route definitions** — map each endpoint to a route registration file (e.g., `routes/users.ts`).
3. **Generate handler skeletons** — create handler functions for each route, with typed parameters.
4. **Generate schema types** — create request/response TypeScript interfaces or type definitions, derived from the contract.
5. **Generate error types** — create custom error classes or error response types for documented error codes.
## Pitfalls
- **Skipping prerequisite check**: Generating implementation without a contract pr