Skip to main content
command CX Codex

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

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/update-docs.md
Open on GitHub

What 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.example and 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-docs and rebuild docs/CONTRIB.md from the current package.json.
  • Refresh docs/RUNBOOK.md with the new variables from .env.example and show me the diff summary.
  • Use /update-docs to list stale files in docs that need a review.

How to install update-docs

Manually: put the files in place

.claude/commands/update-docs.md

Call it with /update-docs. For all projects use ~/.claude/commands/

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.

update-docs davila7 update-docs — a slash command that walks specs/, CLAUDE.md and README.md, marks finished work and refreshes phase completion percentages. CX Codex +1 3,861installs update-project-docs hoangsonww update-project-docs keeps documentation in sync after changes to code, config, APIs, DB schema or interfaces. The agent runs it automatically when it modifies env vars, hooks, events, WebSocket messages or CLI commands. CX Codex +1 ★ 1,198repo stars gsd-docs-update open-gsd gsd-docs-update is a Claude Code skill that creates or revises project docs against the codebase. It can audit existing files or run a full documentation pass. CX Codex +1 576installs dev-docs-update diet103 The dev-docs-update command records active work before a context reset, covering task files, project memory, unfinished work, and handoff notes. CX Codex +1 ★ 10,055repo stars update-docs-on-code-change official github update-docs-on-code-change — a GitHub Copilot rule that updates README.md and other docs when code changes require it. It activates on new features, API changes, dependency updates, or config modifications. CX Codex +1 ★ 41,430repo stars skillshare-update-docs runkids skillshare-update-docs syncs skillshare website documentation with recent Go code changes and validates every CLI flag against source files. Useful right after shipping new flags. CX Codex +1 ★ 3,269repo stars load_ai_docs disler load_ai_docs — a command that downloads documentation from AI platforms and saves it as markdown files for agents to reference locally. Use it when you want your sub-agents to have current docs without needing web access. CX Codex +1 ★ 1,573repo stars

From the same set44

The whole set →

Project sponsors

Companies that keep this analytics open