Documentation Generator for Openclaw

An automated tool designed to generate API documentation, architecture diagrams, and README updates directly from source code.

michealxie001
v1.1.0
Apr 2, 2026
0
745
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install oc-docgen

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install oc-docgen using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Documentation Generator?

The Documentation Generator is a specialized component within the Openclaw Skills library that bridges the gap between source code and technical documentation. It eliminates manual documentation debt by automatically extracting docstrings, function signatures, and structural metadata to create polished API references and README files. By integrating directly into the development workflow, it ensures that as the code evolves, the documentation follows suit without human intervention.

This skill supports multiple programming languages including Python, JavaScript, and TypeScript, offering a unified CLI to manage the entire documentation lifecycle. Whether you need to visualize system architecture via Mermaid diagrams or enforce documentation consistency in a CI/CD pipeline, this tool provides a robust framework for maintaining high-quality technical assets.

Documentation Generator Use Cases

  • Generating comprehensive API reference documentation for Python, JavaScript, and TypeScript projects.
  • Keeping README tables of contents and feature lists synchronized with the latest code changes.
  • Visualizing complex system architectures through automated Mermaid or DOT diagram generation.
  • Identifying and fixing outdated or missing documentation during the development process.
  • Automating documentation deployments within GitHub Actions or other CI/CD workflows.

How Documentation Generator Works

  1. The user invokes the command-line interface pointing to a specific source directory or module.
  2. The skill parses the source files to identify public functions, classes, and their associated docstrings or comments.
  3. Extracted metadata is processed and formatted according to the requested output (Markdown, HTML, or Diagrams).
  4. A synchronization check compares file modification timestamps to determine if the documentation reflects the current state of the code.
  5. If the --fix flag is used, the system regenerates any stale files to restore parity between code and docs.

Documentation Generator Setup

To begin using this tool from the Openclaw Skills collection, navigate to the skill directory and use the following commands:

# Generate API documentation for your source folder
python3 scripts/main.py api --source src/ --output docs/api.md

# Update the Table of Contents in your README
python3 scripts/main.py readme --update-toc

# Check if documentation is out of sync with code
python3 scripts/main.py check

Documentation Generator Data Schema & Taxonomy

The skill manages documentation through a central configuration file and structured output paths:

Component Format Description
.doc-gen.json JSON Configuration for source/output directories, exclusions, and formatting options.
API Reference Markdown Documentation generated from docstrings including args, returns, and examples.
Architecture Mermaid/DOT Visual representations of system modules and dependencies.
Sync Metadata Timestamp Comparison data used to identify documentation rot.

Documentation Generator Advanced Features

  • CI/CD Integration: Seamlessly update documentation on every push using pre-configured GitHub Actions.
  • Automated Sync Fixes: Use the --fix flag to automatically regenerate any documentation identified as out-of-sync.
  • Multi-Language Support: Native parsing for Python and TypeScript with growing support for C/C++ and Go.
  • Architecture Visualization: Generate dynamic diagrams in Mermaid or DOT formats to represent system logic visually.
  • Customizable Exclusions: Fine-tune documentation generation by excluding tests or vendor directories via .doc-gen.json.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*