documenting-apis
Generate API specification documentation from codebase analysis. Detects REST endpoints, function signatures, type definitions, and schemas. Triggers: API specification, endpoints, REST API, type definitions, OpenAPI, Swagger, API documentation.
When & Why to Use This Skill
This Claude skill automates the generation of comprehensive API specification documentation by performing deep codebase analysis. It intelligently detects REST endpoints, function signatures, type definitions, and data schemas across popular frameworks like Express, Next.js, and FastAPI, ensuring your OpenAPI or Swagger documentation remains perfectly synchronized with your source code.
Use Cases
- Automated Specification Generation: Instantly create OpenAPI (Swagger) documentation from an existing codebase to save hours of manual writing.
- Real-time Documentation Updates: Keep API docs in sync with code changes by re-analyzing endpoints and type definitions during the development lifecycle.
- Legacy Code Discovery: Map out and document undocumented endpoints and data structures in legacy projects to improve system maintainability.
- Type-Safe API Mapping: Extract TypeScript interfaces, Zod schemas, or Pydantic models to ensure request/response structures are accurately documented.
- Developer Onboarding: Provide new team members with an immediate, structured overview of a project's API surface area and authentication patterns.
| name | documenting-apis |
|---|---|
| description | > |
| allowed-tools | [Read, Write, Grep, Glob, Bash, Task] |
| context | fork |
| user-invocable | false |
API Specification Generation
Detection
| Category | Pattern |
|---|---|
| Endpoints | Express, Fastify, Next.js, Flask, etc. |
| Functions | tree-sitter, TypeScript, JSDoc |
| Types | interface, type, Zod, Pydantic |
| OpenAPI | openapi.yaml, swagger.yaml |
| Authentication | Auth middleware, JWT, OAuth patterns |
Framework Patterns
| Framework | Pattern |
|---|---|
| Express | app.get(), router.post() |
| Next.js | app/api/**/route.ts |
| Flask | @app.route() |
| FastAPI | @app.get(), @app.post() |