claude-diff-review

Review Claude Code edits as consolidated diffs instead of approving them one-by-one.
Claude Code's default flow interrupts you for every file edit. claude-diff-review flips the model: auto-approve edits, capture originals in the background, then show you a clean diff per file in VS Code when Claude finishes. Accept what you like, restore what you don't.
How it works
You ask Claude to refactor something
│
▼
┌─ PreToolUse hook ──────────────────┐
│ Copies original to shadow/ │
│ Returns "allow" → edit proceeds │
│ (file scope: opens prev diffs) │
└────────────────────────────────────┘
│
▼ (Claude edits 1–N files)
│
┌─ PostToolUse hook ─────────────────┐
│ Tracks: which files, edit count │
└────────────────────────────────────┘
│
▼ (Claude finishes responding)
│
┌─ Stop hook ────────────────────────┐
│ For each edited file: │
│ Opens VS Code diff view │
│ Prints summary with +/- stats │
└────────────────────────────────────┘
│
▼
You review in VS Code's diff view
Then: claude-diff accept
or: claude-diff restore
Features
- Zero interruptions — edits auto-approved while originals are preserved
- Consolidated review — one clean diff per file instead of piecemeal approvals
- Two review scopes — batch all diffs at end (
session) or open progressively as Claude works (file)
- Three diff modes — VS Code side-by-side, colored terminal output, or summary only
- Per-file restore — reject one file without affecting others
- Session isolation — concurrent Claude sessions don't interfere
- Binary-safe — binary files are tracked but skipped from diffing
Installation
Via plugin marketplace (recommended)
claude plugin marketplace add https://github.com/Gorluxor/Claude-Code-Diff-Review
Then open /plugins inside Claude Code and install claude-diff-review. Restart Claude Code when prompted.
Test locally without installing
git clone https://github.com/Gorluxor/Claude-Code-Diff-Review.git
claude --plugin-dir ./Claude-Code-Diff-Review
Standalone install (no plugin system)
git clone https://github.com/Gorluxor/Claude-Code-Diff-Review.git
cd Claude-Code-Diff-Review
bash install.sh
Then restart Claude Code.
<details>
<summary>Manual standalone installation</summary>
# Copy files
mkdir -p ~/.claude-diff-review/app
cp -r hooks lib bin ~/.claude-diff-review/app/
# Link CLI
ln -sf ~/.claude-diff-review/app/bin/claude-diff ~/.local/bin/claude-diff
# Install hooks into Claude Code
claude-diff install
</details>
Usage
Just use Claude Code normally. When it edits files, you'll see:
[diff-review] Captured original: app.py
[diff-review] Tracked edit #1 to app.py
[diff-review] Tracked edit #2 to app.py
When Claude finishes its response:
────────────────────────────────────────────────────────────
◆ claude-diff-review
3 files changed, 7 edits total
────────────────────────────────────────────────────────────
src/app.py +24 -8 (3 edits)
src/utils.py +12 -3 (2 edits)
tests/test_app.py +45 -0 (2 edits)
────────────────────────────────────────────────────────────
Diffs opened in VS Code.
To reject all changes: claude-diff restore
To accept and clean up: claude-diff accept
To reject one file: claude-diff restore <path>
────────────────────────────────────────────────────────────
CLI reference
| Command | Description |
|---|
claude-diff status | Show tracked files and diff stats |
claude-diff accept | Accept all changes, clean up shadows |
claude-diff restore | Reject ALL changes, restore originals |
claude-diff restore src/app.py | Reject changes to one file |
claude-diff diff | Re-open all diffs in VS Code |
claude-diff diff src/app.py | Open diff for one file |
claude-diff diff --mode terminal | Print diffs to terminal instead |
claude-diff config | Show current configuration |
claude-diff config <key> <value> | Set a config value |
claude-diff cleanup | Remove all session data |
claude-diff install | Install/reinstall hooks |
claude-diff uninstall | Remove hooks from Claude Code |
Configuration
Config lives at ~/.claude-diff-review/config.json: