update-docs · sangrokjung — Claude Code command: what it does, how to install
update-docs rebuilds docs/CONTRIB.md and docs/RUNBOOK.md from package.json and .env.example, then reports which docs have gone stale.
MIT ★ 880 updated 2026-09-03
.claude/commands/update-docs.mdWhat update-docs does
The command reads two files that already carry most of a project's operational detail: package.json and .env.example. From the first it pulls the scripts section, builds a reference table and keeps whatever descriptions sit in comments. From the second it takes every environment variable, then writes down what each one is for and what format it expects.
Output is two documents. docs/CONTRIB.md covers the development side: workflow, scripts, environment setup, testing steps. docs/RUNBOOK.md covers operations: deploys, monitoring and alerts, common failures with fixes, rollback. A separate pass scans docs for files untouched for 90+ days and lists them for a human to review. Nothing gets deleted automatically. The run ends with a diff summary.
package.json and .env.example are the only sources here. Variables kept somewhere else will not turn up in the generated pages. Tool access is limited to Read, Write, Glob and Bash.
What it helps with
- build a scripts reference straight from
package.json - document each variable in
.env.exampleand its format - give a new contributor a page to start from
- keep rollback steps written down instead of memorised
- spot docs nobody has touched in 90 days
Example prompts for the agent
- Run
/update-docsand rebuilddocs/CONTRIB.mdfrom the currentpackage.json. - Refresh
docs/RUNBOOK.mdwith the new variables from.env.exampleand show me the diff summary. - Use
/update-docsto list stale files indocsthat need a review.
How to install update-docs
Manually: put the files in place
.claude/commands/update-docs.mdCall it with /update-docs. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/update-docs.mdCall it with /prompts:update-docs. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/update-docs.prompt.mdManually: put the files in place
.gemini/commands/update-docs.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about update-docs
How do I install update-docs in Claude Code?
Copy the command file to .claude/commands/update-docs.md. It is then available as /update-docs.
What does update-docs do?
It builds docs/CONTRIB.md and docs/RUNBOOK.md from package.json and .env.example, then reports what changed and which docs look stale.
Which tools can the command use?
Read, Write, Glob and Bash, as listed in its allowed-tools.
Source text
update-docs.md · MIT
--- description: Sync documentation from source-of-truth (package.json, .env.example) allowed-tools: Read, Write, Glob, Bash --- # Update Documentation Sync documentation from source-of-truth: 1. Read package.json scripts section - Generate scripts reference table - Include descriptions from comments 2. Read .env.example - Extract all environment variables - Document purpose and format 3. Generate docs/CONTRIB.md with: - Development workflow - Available scripts - Environment setup - Testing procedures 4. Generate docs/RUNBOOK.md with: - Deployment procedures - Monitoring and alerts - Common issues and fixes - Rollback procedures 5. Identify obsolete documentation: - Find docs not modified in 90+ days - List for manual review 6. Show diff summary Single source of truth: package.json and .env.example
© sangrokjung · MIT · sangrokjung/claude-forge
Similar slash commands
All slash commands for Agent setup: memory, context, orchestration →update-docs by other authors comes first.