No. 104 Write it down
Update Documentation
Use when someone who was not in the session has to understand the result
- Claude Code
- Codex
- Cursor
- Write it down
# Update Documentation Please update the project documentation to reflect recent changes: 1. **Identify recent changes** - Review git history and modified files to understand what has changed 2. **Update README.md** - Ensure the main README reflects: - Any new features or capabilities - Updated setup instructions if needed - New environment variables - Changed ports or services 3. **Update CLAUDE.md** - Add any new: - Architectural decisions - Development patterns discovered - Common issues and solutions - Testing insights 4. **Check component docs** - Update documentation for: - New APIs or endpoints - Modified workflows - Changed data schemas - New integrations 5. **Update inline documentation**: - JSDoc/TSDoc comments for new functions - Configuration file comments - Environment variable descriptions 6. **Verify accuracy** - Ensure all: - Code examples still work - Commands are up to date - Links are not broken - Version numbers are current Focus on clarity and helping future developers (including yourself) understand the system quickly.
When to use
“Update Documentation” fits when someone who was not in the session has to understand the result, because it says “Update Documentation”, and its first written step is “Identify recent changes - Review git history and modified files to understand what has changed”.
For “Update Documentation”, the extra line you type is the requirement those steps ask for, for example “make src/cart.js return 0 on an empty cart and skip a line with no price”, and the file then starts at “Identify recent changes - Review git history and modified files to understand what has changed”.
When not to use
Leave “Update Documentation” unused when the file's behavior is wrong and a paragraph would hide that, because “Update Documentation” points the other way
How to run it
Claude Code
Claude Code stores “Update Documentation” as a Claude command and runs it with that command, putting the requirement in the argument, and CLAUDE.md should not also carry “Update Documentation”.
Codex
Codex takes “Update Documentation” as a paste above the task. Leave AGENTS.md unchanged so the next thread does not inherit “Update Documentation”.
Cursor
Cursor should see “Update Documentation” only as a chat paste of “Update Documentation” for this turn. A file at .cursor/rules would keep applying after the turn ends.
Comparison
对比待补
This before-and-after was not run on this machine.
Related
- Stage: Write it down
- Same stage: Write READMEs like landing pages, not API docs. The reader…
来源:Darin Cassler · https://github.com/cassler/awesome-claude-code-setup/blob/main/commands/update-docs.md · MIT · Copyright (c) 2025 Darin Cassler · 2026-12-01