VS Code Extensions
Claude Diff Viewer

Claude Diff Viewer

by lance0212

VS Code extension for reviewing Claude Code file changes with per-hunk Accept/Reject controls, file-level actions, batch operations, diff tracking, and smart review status.

Downloads

228

Rating

5.0 / 5 (1)

Version

0.0.20

Last updated

Apr 09, 2026

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

  1. 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
}
  1. The extension detects the signal, parses the diff between backup and current file
  2. The sidebar shows all changed files with expandable hunk details
  3. Review each change individually or batch accept/reject

Signal Protocol

Before modifying a file:

  1. Copy the original file to a backup location
  2. Make your changes to the original file
  3. 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

  • VSCode 1.85.0+