doc-gen — Claude Code skill: what it does, how to install
Generates project documentation, detects drift between docs and code, and schedules recurring updates. Helpful when code changes outpace reference files.
npx skills add ruvnet/ruflo --skill doc-gen -a claude-codeWhat doc-gen does
The skill compares existing documentation against current code to detect drift and flag stale sections. It handles scoped generation for API surfaces or the full project using worker dispatch hooks or CLI calls through npx @claude-flow/cli@latest.
Periodic runs rely on CronCreate. The prompt can schedule maintenance every two hours or at any desired cron interval. It also registers documentation decisions via mcp__plugin_ruflo-core_ruflo__memory_store under the patterns namespace.
Worker dispatch commands fail without the ruflo-core MCP plugin or @claude-flow/cli in your environment. You must verify these tools are reachable before dispatching tasks.
What it helps with
- detect drift between existing documentation and current code
- generate targeted API documentation via worker dispatch
- schedule automated documentation maintenance with cron jobs
- store project documentation patterns in agent memory
Example prompts for the agent
- Check for doc drift against current code with --target src/api
- Generate API documentation using the worker dispatch hook
- Schedule doc maintenance to run every two hours
How to install doc-gen
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill doc-gen -a claude-code2Manually: put the files in place
~/.claude/skills/doc-gen/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/doc-gen/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill doc-gen -a codex2Manually: put the files in place
.agents/skills/doc-gen/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill doc-gen -a cursor2Manually: put the files in place
.cursor/skills/doc-gen/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ruvnet/ruflo doc-gen2Manually: put the files in place
.github/skills/doc-gen/SKILL.md1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill doc-gen -a gemini-cli2Platform CLI
gemini skills install https://github.com/ruvnet/ruflo --path plugins/ruflo-docs/skills/doc-genManually: put the files in place
.devin/skills/doc-gen/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill doc-gen -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set104
The whole set →Similar
Questions about doc-gen
How to install doc-gen in Claude Code?
Run npx skills add ruvnet/ruflo --skill doc-gen -a claude-code. You can also place the configuration file manually at ~/.claude/skills/doc-gen/SKILL.md.
What does doc-gen do?
It creates and updates project documentation while spotting inconsistencies against the actual code. The skill supports both API-level and full-project scopes alongside scheduled runs.
How does scheduled documentation maintenance work?
It uses the CronCreate tool to set an execution schedule like 0 */2 * * *. This trigger periodically calls the document worker to refresh stale pages.
Source text
SKILL.md · MIT
---
name: doc-gen
description: Generate and maintain documentation with drift detection. Use when the user asks to write/update/refresh docs, detect doc drift against code, or schedule recurring documentation maintenance.
argument-hint: "[--target PATH]"
allowed-tools: Bash(npx *) mcp__plugin_ruflo-core_ruflo__hooks_worker-dispatch mcp__plugin_ruflo-core_ruflo__memory_store CronCreate Read Write
---
Generate docs via MCP worker dispatch:
`mcp__plugin_ruflo-core_ruflo__hooks_worker-dispatch({ trigger: "document" })`
For continuous doc maintenance via CronCreate:
`CronCreate({ schedule: "0 */2 * * *", prompt: "Run document worker" })`
Detect drift by comparing current code against existing docs and flagging inconsistencies.
Scoped generation:
- API docs: `npx @claude-flow/cli@latest hooks worker dispatch --trigger document --context api`
- Full project: `npx @claude-flow/cli@latest hooks worker dispatch --trigger document --context full`
Store the approach: `mcp__plugin_ruflo-core_ruflo__memory_store({ key: "doc-pattern", value: "APPROACH", namespace: "patterns" })`
© ruvnet · MIT · ruvnet/ruflo