api-docs-generator
Installation
SKILL.md
API Docs Generator
Before generating any output, read config/defaults.md and adapt all patterns, imports, and code examples to the user's configured stack.
Process
- Scan the
app/api/directory for allroute.tsfiles. - For each route file, extract: exported HTTP method handlers, URL path (from file path), request/response types, Zod schemas, middleware/auth patterns.
- Generate a valid OpenAPI 3.1 specification.
- Output as YAML (default) or JSON if requested.
Route Scanning
Path Extraction
Convert Next.js App Router file paths to OpenAPI paths: