revise-claude-md — Claude Code command: what it does, how to install
Reviews your active session to extract practical codebase learnings and updates CLAUDE.md or .claude.local.md. Helpful after discovering new CLI flags or test quirks.
/plugin install claude-md-management@claude-plugins-officialWhat revise-claude-md does
The command reviews your recent Claude Code session for missing context. It identifies terminal commands, test workflows, and environment gotchas. Additions are sorted between team-shared CLAUDE.md files and gitignored .claude.local.md files.
During discovery, it searches for up to 20 matching markdown files. Rules follow a compact <command or pattern> - <brief description> format. Because CLAUDE.md loads directly into the prompt of future sessions, verbose explanations waste context space.
The command uses Read, Edit, and Glob tools. It shows proposed additions as diffs with a short rationale, modifying files only when you confirm the changes.
What it helps with
- extract useful bash commands discovered during the session
- document codebase test setups and conventions for future prompts
- isolate personal machine quirks inside
.claude.local.md - review proposed context updates as diffs before saving
Example prompts for the agent
- /revise-claude-md
- Update CLAUDE.md with learnings from this session
- Review our conversation and save the new test commands to .claude.local.md
How to install revise-claude-md
1Plugin marketplace
/plugin install claude-md-management@claude-plugins-official2Manually: put the files in place
.claude/commands/revise-claude-md.mdCall it with /revise-claude-md. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/revise-claude-md.mdCall it with /prompts:revise-claude-md. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/revise-claude-md.prompt.mdManually: put the files in place
.gemini/commands/revise-claude-md.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about revise-claude-md
How to install revise-claude-md in Claude Code?
Run /plugin install claude-md-management@claude-plugins-official in Claude Code. Alternatively, place the file directly at .claude/commands/revise-claude-md.md.
What does revise-claude-md do?
It inspects recent interactions, spots reusable commands or patterns, and drafts concise diffs for your CLAUDE.md files.
What is the difference between CLAUDE.md and .claude.local.md?
CLAUDE.md is committed to git for the whole team, while .claude.local.md stays local and gitignored for individual setups.
Source text
revise-claude-md.md · Apache-2.0
--- description: Update CLAUDE.md with learnings from this session allowed-tools: Read, Edit, Glob --- Review this session for learnings about working with Claude Code in this codebase. Update CLAUDE.md with context that would help future Claude sessions be more effective. ## Step 1: Reflect What context was missing that would have helped Claude work more effectively? - Bash commands that were used or discovered - Code style patterns followed - Testing approaches that worked - Environment/configuration quirks - Warnings or gotchas encountered ## Step 2: Find CLAUDE.md Files ```bash find . -name "CLAUDE.md" -o -name ".claude.local.md" 2>/dev/null | head -20 ``` Decide where each addition belongs: - `CLAUDE.md` - Team-shared (checked into git) - `.claude.local.md` - Personal/local only (gitignored) ## Step 3: Draft Additions **Keep it concise** - one line per concept. CLAUDE.md is part of the prompt, so brevity matters. Format: `<command or pattern>` - `<brief description>` Avoid: - Verbose explanations - Obvious information - One-off fixes unlikely to recur ## Step 4: Show Proposed Changes For each addition: ``` ### Update: ./CLAUDE.md **Why:** [one-line reason] \`\`\`diff + [the addition - keep it brief] \`\`\` ``` ## Step 5: Apply with Approval Ask if the user wants to apply the changes. Only edit files they approve.
© Anthropic · Apache-2.0 · anthropics/claude-plugins-official