code-documentation-doc-generate

Generate API docs, architecture diagrams, and user guides from source code.

2|Updated Jun 16, 2026
One-click install
npx skills add https://github.com/monang404/lunawave --skill code-documentation-doc-generate-monang404
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: code-documentation-doc-generate
Source: https://github.com/monang404/lunawave/tree/main/.agent/skills/code-documentation-doc-generate
Command: npx skills add https://github.com/monang404/lunawave --skill code-documentation-doc-generate-monang404

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping documentation accurate and synchronized with a changing codebase is tedious, so this Skill automates the extraction of information from code to produce consistent, maintainable documentation. ## Core Features & Use Cases - API Documentation: Extract endpoints, parameters, and schemas from code to generate OpenAPI specifications and interactive Swagger UI pages. - Architecture & Code Docs: Create Mermaid architecture diagrams, README templates, docstrings, and user guides with consistent terminology. - Docs Automation: Set up CI/CD pipelines, documentation coverage checks, and linting to keep docs synchronized with code. - Use Case: Point the Skill at a FastAPI service to produce an OpenAPI spec, a component architecture diagram, and a getting-started README in one pass. ## Quick Start Generate API documentation and an architecture diagram from the source code in this repository.

Frequently Asked Questions about code-documentation-doc-generate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate API documentation from Python code?▼

Parse the source with the ast module to extract route decorators, function signatures, and docstrings, then map them into an OpenAPI specification. The extracted spec can be rendered with Swagger UI or Redoc for interactive documentation.

How to create an OpenAPI specification automatically?▼

Extract endpoint paths, HTTP methods, parameters, and Pydantic schemas from the codebase, then populate an OpenAPI 3.0 YAML template. Tools like Redocly can validate and build the final documentation site.

Can documentation generation run in a CI/CD pipeline?▼

Yes, a GitHub Actions workflow can regenerate OpenAPI specs and Sphinx docs on every push to main, then deploy the output to GitHub Pages. This keeps published documentation synchronized with code changes.

How do I check documentation coverage in a Python codebase?▼

Walk the AST of each Python file and count functions and classes that have docstrings versus those that do not. The coverage script reports percentages and lists undocumented items with file and line numbers.

When should I not use automated documentation generation?▼

Avoid it when there is no accessible codebase or source of truth, or when you only need a one-off explanation. Generated docs also require review to avoid exposing secrets, internal URLs, or sensitive data.