← ClaudeAtlas

api-docslisted

Write reference documentation or an OpenAPI spec for a REST/HTTP API by reading its source code. Use when the user says "document the API", "write endpoint docs", "generate an OpenAPI/Swagger spec", "what endpoints do we have", or "document this route".
Kuan-AI-com/agent-skills · ★ 0 · API & Backend · score 72
Install: claude install-skill Kuan-AI-com/agent-skills
# API documentation Document what the code does, not what the endpoint name suggests. Anything you could not confirm is marked as such. ## 1. Check for existing specs or generators Look for `openapi.*`, `swagger.*`, FastAPI (serves `/openapi.json`), NestJS `@nestjs/swagger`, `drf-spectacular`, `springdoc`, tRPC/GraphQL schemas, or zod-to-openapi. If the framework can generate the spec, prefer configuring that over writing one by hand, and say so. ## 2. Find every route Use the framework's convention, then confirm by searching: - Express/Fastify/Koa: `app.get(`, `router.post(`, mounted prefixes from `app.use('/prefix', router)`. - Next.js: `app/**/route.ts` (exported `GET`, `POST`...) and `pages/api/**`. - FastAPI/Flask/Django: `@app.get`, `@router.post`, `@bp.route`, `urls.py`. - Rails `config/routes.rb`, Laravel `routes/*.php`, Go `HandleFunc`/router groups, Spring `@GetMapping`. Build the full path including prefixes and versioning. List the endpoints first and ask if internal or admin ones should be included. ## 3. For each endpoint, trace the handler - **Auth**: follow the middleware chain, decorators or guards. Note the mechanism (bearer token, session cookie, API key header) and any role or ownership check. - **Input**: path params, query params, headers and body from the validator (zod, joi, pydantic, class-validator, serializers). Copy exact types, required/optional, defaults, enums, min/max, formats. - **Responses**: every status the handler returns or throws,