Agent skill · writing content · aiskillstore

api-documentation-generator

Generates OpenAPI/Swagger documentation from API route files. Use when working with REST APIs, Express routes, FastAPI endpoints, or when user requests API documentation.

Why this skill is useful

Generates OpenAPI documentation from API routes, providing specific patterns and templates that the AI wouldn't reliably generate on its own.

What it needs

About 2k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

API Documentation Generator This skill automatically generates OpenAPI 3.0 (Swagger) documentation from API route files in your codebase. When to Use This Skill User asks to generate API documentation Working with REST API endpoints Need to create or update OpenAPI/Swagger specs Setting up API documentation for Express, FastAPI, Flask, NestJS, or similar frameworks Instructions 1. Discover API Routes Search the codebase for API route definitions: Express/Node.js: Look for app.get(), app.post(), router.get(), etc. FastAPI/Python: Look for @app.get(), @router.post(), decorators Flask: Look for @app.route() decorators NestJS: Look for @Get(), @Post(), @Controller() decorators Rails: Look for routes in config/routes.rb Use Glob to find route files (e.g., /routes.{js,ts,py}, /controllers//.{js,ts}) 2. Analyze Route Patterns For each discovered route, extract: HTTP Method: GET, POST, PUT, PATCH, DELETE Path: The endpoint URL (e.g., /api/users/:id) Parameters: Path params, query params, request body Response: Expected response structure Authentication: Whether auth is required Description: Comments or docstrings near the route 3. Generate OpenAPI Specification Create or update an OpenAPI 3.0 specification file (typically openapi.yaml or swagger.json): Start with the template from templates/openapi-3.0.yaml Map each route to an OpenAPI path object Define request/response schemas using JSON Schema Include parameter definitions (path, query, body) Add authentication schemes if detected (Bearer, API Key, OAuth2) Group endpoints by tags (e.g., "Users", "Products", "Auth") 4. Validate Completeness Check that the generated documentation includes: All discovered endpoints Accurate HTTP methods and paths Request/response examples where possible Error responses (400, 401, 404, 500, etc.) Security requirements 5. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/api-documentation-generator

View the source on GitHub

Browse the @skills marketplace