🎁 Get the FREE AI Skills Starter GuideSubscribe →
BytesAgainBytesAgain
🦀 ClawHub

OpenClaw Doc Generator

by @michealxie001

Generates documentation from code. Creates API docs, README updates, architecture diagrams, and keeps documentation in sync with code changes.

Versionv1.0.0
💡 Examples

场景 1:新项目初始化文档

# 1. 生成 API 文档
python3 main.py api --source src/ --output docs/api.md

2. 更新 README 目录

python3 main.py readme --update-toc

3. 生成架构图

python3 main.py diagram --output docs/architecture.md

场景 2:保持文档同步

# 每次提交前检查
python3 main.py check

如果发现过期,自动修复

python3 main.py check --fix

场景 3:发布前生成完整文档

# 生成所有文档
python3 main.py api --source src/ --output docs/api.md
python3 main.py readme --update-toc --generate-features
python3 main.py diagram --format mermaid --output docs/arch.md

打包文档

zip -r docs.zip docs/


⚙️ Configuration

.doc-gen.json:

{
  "source_dir": "src",
  "output_dir": "docs",
  "readme": "README.md",
  "formats": ["markdown", "html"],
  "include_private": false,
  "include_examples": true,
  "toc_depth": 3,
  "exclude": [
    "tests/**",
    "vendor/**"
  ]
}


View on ClawHub
TERMINAL
clawhub install openclaw-doc-gen

🧪 Use this skill with your agent

Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

🔍 Can't find the right skill?

Search 60,000+ AI agent skills — free, no login needed.

Search Skills →