home / skills / xfstudio / skills / documentation-generation-doc-generate

documentation-generation-doc-generate skill

/documentation-generation-doc-generate

This skill generates living API docs, architecture diagrams, and guides directly from code, ensuring consistent, up-to-date documentation across projects.

npx playbooks add skill xfstudio/skills --skill documentation-generation-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: documentation-generation-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 turns codebases into clear, maintainable documentation by extracting structure, APIs, and architecture details and producing user guides, technical references, and diagrams. It uses AI-powered analysis plus documentation best practices to create living docs that stay synchronized with source code. The output includes a documentation plan, file paths, automation scripts, and follow-up tasks to close gaps.

How this skill works

I scan source code, configuration, and inline comments to identify public APIs, data models, modules, and runtime behavior. I map components to audiences (developers, operators, product) and generate API docs, architecture diagrams, usage guides, and troubleshooting references with consistent terminology. The skill also produces CI checks, linting rules, and automation to validate doc accuracy and flag drift.

When to use it

  • Generating or refreshing API reference and SDK docs from code
  • Creating architecture diagrams and component overviews for stakeholders
  • Building documentation pipelines and CI validation for docs
  • Standardizing docs across multiple repositories or microservices
  • Converting inline comments and types into user guides and examples

Best practices

  • Start by identifying doc types and target audiences before extraction
  • Keep terminology consistent; provide a glossary and naming map
  • Automate generation and CI checks so docs remain living artifacts
  • Strip or redact secrets and internal URLs during extraction
  • Include example requests, responses, and minimal reproducible examples

Example use cases

  • Auto-generate OpenAPI-style API reference and code snippets from Python annotations
  • Produce architecture diagrams (component, data flow, deployment) from repository topology
  • Create an operator runbook and troubleshooting guide from runtime logs and configs
  • Add doc-lint and CI pipeline that fails when public API changes lack doc updates
  • Standardize README and contributor guides across multiple microservices

FAQ

What inputs do you need?

Provide the codebase, configuration files, and any existing docs or comment conventions. Access to example runtime configs helps generate accurate operational docs.

How do you keep docs in sync with code?

I produce automation: generation scripts, doc-lint rules, and CI jobs that regenerate or validate docs on changes and flag documentation drift.