Skip to main content
command official · Anthropic

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.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin install claude-md-management@claude-plugins-official
Open on GitHub

What 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-official

2Manually: put the files in place

.claude/commands/revise-claude-md.md

Call it with /revise-claude-md. For all projects use ~/.claude/commands/

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

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

From the same set123

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor