
Api Documentation Generator
Generate clear REST, GraphQL, or WebSocket API docs—with examples, auth, and errors—from an existing codebase when onboarding or publishing specs.
Overview
API Documentation Generator is an agent skill most often used in Build (also Ship review, Launch distribution) that turns codebase routes into developer-friendly API documentation with examples and OpenAPI-oriented specs
Install
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill api-documentation-generatorWhat is this skill?
- Two-step flow: analyze API structure (routes, methods, bodies, status codes, auth, errors) then emit per-endpoint docume
- Covers REST, GraphQL, and WebSocket APIs with request/response examples and usage guidelines
- Supports creating or refreshing OpenAPI/Swagger-style specifications alongside human-readable docs
- Use cases include new API documentation, updates, developer onboarding, and external consumer guides
- Documented flow with Step 1 (analyze API structure) and Step 2 (generate endpoint documentation)
Adoption & trust: 1.7k installs on skills.sh; 40.1k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your API works in code but new users and future-you cannot discover endpoints, auth, or error shapes from scattered comments.
Who is it for?
Indie developers documenting REST, GraphQL, or WebSocket APIs before sharing with partners, open-sourcing, or onboarding a contractor.
Skip if: Greenfield projects with no routes yet, or teams that only need internal architecture decision records without HTTP reference.
When should I use this skill?
Use when you need to document a new API, update existing API documentation, onboard developers, or create OpenAPI/Swagger specifications.
What do I get? / Deliverables
You get comprehensive endpoint documentation with examples, auth details, error handling guidance, and optional OpenAPI/Swagger specifications aligned to the analyzed code.
- Per-endpoint API reference with examples
- Authentication and error-handling sections
- OpenAPI/Swagger specification when requested
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Documentation is authored while the API exists; canonical shelf is Build/docs even when you refresh docs before Ship or external Launch. The skill’s steps analyze routes and emit endpoint reference material—not frontend UI, tests, or deploy configs.
Where it fits
Document every route and auth rule right after finishing the first working API slice.
Regenerate endpoint tables to match code before tagging a public release.
Publish integration-ready docs and OpenAPI for partners launching on your API.
How it compares
Generator skill from live API code—not a static OpenAPI linter that assumes you already hand-authored a complete spec file.
Common Questions / FAQ
Who is api-documentation-generator for?
Solo builders and small teams maintaining APIs in Claude Code, Cursor, or Codex who need structured reference docs and examples without a separate doc portal project.
When should I use api-documentation-generator?
Use it in Build/docs when creating or updating API reference; in Ship/review before external release; in Launch/distribution when publishing integration guides for customers.
Is api-documentation-generator safe to install?
It reads your repository to infer endpoints—review the Security Audits panel on this page and avoid pointing it at trees with embedded secrets in sample code.
SKILL.md
READMESKILL.md - Api Documentation Generator
# API Documentation Generator ## Overview Automatically generate clear, comprehensive API documentation from your codebase. This skill helps you create professional documentation that includes endpoint descriptions, request/response examples, authentication details, error handling, and usage guidelines. Perfect for REST APIs, GraphQL APIs, and WebSocket APIs. ## When to Use This Skill - Use when you need to document a new API - Use when updating existing API documentation - Use when your API lacks clear documentation - Use when onboarding new developers to your API - Use when preparing API documentation for external users - Use when creating OpenAPI/Swagger specifications ## How It Works ### Step 1: Analyze the API Structure First, I'll examine your API codebase to understand: - Available endpoints and routes - HTTP methods (GET, POST, PUT, DELETE, etc.) - Request parameters and body structure - Response formats and status codes - Authentication and authorization requirements - Error handling patterns ### Step 2: Generate Endpoint Documentation For each endpoint, I'll create documentation including: **Endpoint Details:** - HTTP method and URL path - Brief description of what it does - Authentication requirements - Rate limiting information (if applicable) **Request Specification:** - Path parameters - Query parameters - Request headers - Request body schema (with types and validation rules) **Response Specification:** - Success response (status code + body structure) - Error responses (all possible error codes) - Response headers **Code Examples:** - cURL command - JavaScript/TypeScript (fetch/axios) - Python (requests) - Other languages as needed ### Step 3: Add Usage Guidelines I'll include: - Getting started guide - Authentication setup - Common use cases - Best practices - Rate limiting details - Pagination patterns - Filtering and sorting options ### Step 4: Document Error Handling Clear error documentation including: - All possible error codes - Error message formats - Troubleshooting guide - Common error scenarios and solutions ### Step 5: Create Interactive Examples Where possible, I'll provide: - Postman collection - OpenAPI/Swagger specification - Interactive code examples - Sample responses ## Examples ### Example 1: REST API Endpoint Documentation ```markdown ## Create User Creates a new user account. **Endpoint:** `POST /api/v1/users` **Authentication:** Required (Bearer token) **Request Body:** \`\`\`json { "email": "user@example.com", // Required: Valid email address "password": "SecurePass123!", // Required: Min 8 chars, 1 uppercase, 1 number "name": "John Doe", // Required: 2-50 characters "role": "user" // Optional: "user" or "admin" (default: "user") } \`\`\` **Success Response (201 Created):** \`\`\`json { "id": "usr_1234567890", "email": "user@example.com", "name": "John Doe", "role": "user", "createdAt": "2026-01-20T10:30:00Z", "emailVerified": false } \`\`\` **Error Responses:** - `400 Bad Request` - Invalid input data \`\`\`json { "error": "VALIDATION_ERROR", "message": "Invalid email format", "field": "email" } \`\`\` - `409 Conflict` - Email already exists \`\`\`json { "error": "EMAIL_EXISTS", "message": "An account with this email already exists" } \`\`\` - `401 Unauthorized` - Missing or invalid authentication token **Example Request (cURL):** \`\`\`bash curl -X POST https://api.example.com/api/v1/users \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com", "password": "SecurePass123!", "name": "John Doe" }' \`\`\` **Example Request (JavaScript):*