~/.claude/skills/api-docs-generator/SKILL.mdAPI Docs Generator
Documents API endpoints by reading route files, extracting params/responses, and generating structured API documentation.
--- name: api-docs-generator description: | Documents API endpoints by reading route files and generating structured docs. IMPORTANT: Activate this skill whenever the user asks to "document the API", "API documentation", "generate API docs", or "document endpoints". This skill MUST be used for all API documentation requests. --- # API Docs Generator Reads your API route files and generates structured documentation for every endpoint. Extracts path parameters, query parameters, request
Reads your API route files and generates structured documentation for every endpoint. Extracts path parameters, query parameters, request bodies, response shapes, and error codes.
Say any of these to activate this skill: - "document the API" - "generate API docs" - "document the endpoints" - "Use skill: api docs generator"
1. Scan the API route directory to find all endpoint files 2. For each endpoint, extract: HTTP method, path, parameters, request body shape, response shape 3. Read validation schemas (zod, joi) to document expected input formats 4. Read error handling to document possible error responses and status codes 5. Check for authentication requirements (middleware, guards) 6. Generate documentation grouped by resource (users, posts, payments, etc.) 7. Include example requests and responses for each endpoint
- Group endpoints by resource, not by HTTP method
- Include the full request/response shape with types, not just field names
- Document error responses as thoroughly as success responses
- Mark required vs optional fields clearly
- Include authentication requirements for each endpoint
- Best with: Claude Code CLI (can read all route files automatically)
- Also works: Cursor, Windsurf
- Expects: A project with API routes in a standard framework
- Markdown documentation file with: endpoint list, grouped by resource
- For each endpoint: method, path, auth, parameters, request body, response, errors
- Example request/response for each endpoint