Claude Diff Viewer
Review Claude Code file changes with per-hunk Accept/Reject actions in VSCode.
Features
File List Panel
- Activity Bar sidebar showing all files with pending changes
- Click any file to open its diff view
- Each file displays change count and review status
- Per-file Accept / Reject / Dismiss buttons
Per-Hunk Review
- Files expand to show individual change blocks (hunks)
- Accept or reject each hunk independently
- Diff view auto-refreshes after each action
- Precise change tracking with line numbers and +/- counts
Batch Operations
- Accept All - accept all changes across all files
- Reject All - revert all changes across all files
- Clear All - dismiss all files from the review list
Smart Status Tracking
- Reviewed files stay in list with checkmark status
- Click reviewed files to open for direct editing
- Auto-detects when reviewed files are edited again
- Status bar shows file count and pending change count
How It Works
- Claude Code (or any tool) writes a signal file to
/tmp/.claude-diff-signals/:
{
"filePath": "/path/to/modified/file.ts",
"backupPath": "/tmp/.claude-diff-backups/file.ts.backup",
"timestamp": 1234567890000
}
- The extension detects the signal, parses the diff between backup and current file
- The sidebar shows all changed files with expandable hunk details
- Review each change individually or batch accept/reject
Signal Protocol
Before modifying a file:
- Copy the original file to a backup location
- Make your changes to the original file
- Write a JSON signal file to
/tmp/.claude-diff-signals/
The extension watches this directory and automatically picks up new signals.
Commands
| Command |
Description |
Claude Diff: Accept All Changes |
Accept all pending changes |
Claude Diff: Reject All Changes |
Revert all pending changes |
Claude Diff: Clear All |
Remove all files from review list |
Claude Diff: Accept File |
Accept all changes in a file |
Claude Diff: Reject File |
Revert all changes in a file |
Requirements
| |