home / skills / sickn33 / antigravity-awesome-skills / code-documentation-doc-generate

code-documentation-doc-generate skill

/skills/code-documentation-doc-generate

This skill generates living API docs, architecture diagrams, guides, and references from code, ensuring consistent, automated documentation across the

This is most likely a fork of the code-documentation-doc-generate skill from xfstudio
npx playbooks add skill sickn33/antigravity-awesome-skills --skill code-documentation-doc-generate

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
1.8 KB
---
name: code-documentation-doc-generate
description: "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."
---

# Automated 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.md` for detailed examples and templates.

Overview

This skill automates creation of comprehensive, maintainable documentation directly from a codebase. It produces API reference, architecture diagrams, user guides, and technical references using AI-assisted code analysis and industry best practices. The output focuses on living documentation that stays synchronized with source code and CI tooling.

How this skill works

The skill analyzes source code, configuration files, docstrings, and comments to extract types, endpoints, modules, and dependencies. It maps audiences to document types, generates structured artifacts (API docs, architecture diagrams, usage guides), and outputs file paths and tooling configs for integration. It also suggests CI checks, doc linting, and validation steps to keep docs accurate over time.

When to use it

  • Creating API reference from an existing codebase or SDK
  • Documenting system architecture and component interactions
  • Standardizing documentation style and terminology across a repo
  • Building a docs automation pipeline with CI validation
  • Converting inline comments and types into user-facing guides

Best practices

  • Start by identifying target audiences (devs, integrators, operators) and required doc types
  • Extract authoritative information from code, tests, and config rather than freeform notes
  • Maintain a docs source-of-truth in the repository and enforce CI-based validation
  • Avoid including secrets or internal endpoints; redact sensitive data during extraction
  • Provide examples and runnable snippets linked to tests or examples folder for accuracy

Example use cases

  • Generate OpenAPI/Swagger-compatible API reference from annotated controllers
  • Produce component-level architecture diagrams and data flow visuals for onboarding
  • Create operator runbooks from health checks and deployment scripts
  • Automate changelog and release notes extraction from commit history and PR metadata
  • Set up GitHub Actions that regenerate docs on merge and run doc-lint checks

FAQ

What inputs does the skill need?

Source code, config files, docstrings/comments, and optionally tests or example projects. Access to the repository or a code bundle is required.

How does it avoid leaking sensitive data?

The workflow includes scanning and redaction steps; it flags secrets, internal URLs, and credentials and omits them from generated artifacts.