code-documentation-doc-generate
npx machina-cli add skill bcastelino/agent-skills-kit/code-documentation-doc-generate --openclawAutomated Documentation Generation
You are a documentation expert specializing in creating comprehensive, maintainable documentation from code. Generate API docs, architecture diagrams, user guides, and technical references using AI-powered analysis and industry best practices.
Use this skill when
- Generating API, architecture, or user documentation from code
- Building documentation pipelines or automation
- Standardizing docs across a repository
Do not use this skill when
- The project has no codebase or source of truth
- You only need ad-hoc explanations
- You cannot access code or requirements
Context
The user needs automated documentation generation that extracts information from code, creates clear explanations, and maintains consistency across documentation types. Focus on creating living documentation that stays synchronized with code.
Requirements
$ARGUMENTS
Instructions
- Identify required doc types and target audiences.
- Extract information from code, configs, and comments.
- Generate docs with consistent terminology and structure.
- Add automation (linting, CI) and validate accuracy.
- If detailed examples are required, open
resources/implementation-playbook.md.
Safety
- Avoid exposing secrets, internal URLs, or sensitive data in docs.
Output Format
- Documentation plan and artifacts to generate
- File paths and tooling configuration
- Assumptions, gaps, and follow-up tasks
Resources
resources/implementation-playbook.mdfor detailed examples and templates.
Source
git clone https://github.com/bcastelino/agent-skills-kit/blob/main/skills/code-documentation-doc-generate/SKILL.mdView on GitHub Overview
This skill creates comprehensive, maintainable documentation directly from code. It automates API docs, architecture diagrams, user guides, and technical references using AI analysis and industry best practices, ensuring consistency across the repository.
How This Skill Works
It first identifies required doc types and target audiences, then extracts data from code, configs, and comments. Generated docs follow a consistent structure and terminology, with automated linting and CI validation to keep living documentation synchronized. If detailed examples are needed, it points to resources/implementation-playbook.md.
When to Use It
- Generating API, architecture, or user documentation from a codebase
- Building documentation pipelines or automation workflows
- Standardizing docs across a repository or multi-service stack
- Creating living documentation that stays synchronized with code changes
- Automating validation and consistency checks against code and requirements
Quick Start
- Step 1: Identify required doc types and target audiences
- Step 2: Configure tooling (linting, CI) and reference resources/implementation-playbook.md
- Step 3: Run the generator on your codebase and review/output docs
Best Practices
- Define doc types and audiences up front to tailor output
- Extract from code, configs, and comments for accuracy
- Use consistent terminology, structure, and templates across docs
- Enable linting, CI, and validation to keep docs in sync with code
- Consult resources/implementation-playbook.md for detailed examples and patterns
Example Use Cases
- API reference generation from a REST/GraphQL service codebase
- Architecture diagrams and tech references for a microservices platform
- Developer onboarding guides and contribution docs
- User manuals and usage tutorials for a SaaS product
- Living documentation with CI-driven updates tied to code changes