Claude-code Diff Visualizer/Analyzer for VS Code
A powerful VS Code extension that uses Claude AI to analyze your git changes and provide intelligent insights about code modifications, potential issues, and suggestions for improvement.

✨ Features
- 🔍 AI-Powered Analysis: Leverages Claude's advanced AI capabilities to understand your code changes
- 📊 Comprehensive Insights: Get summaries, impact assessments, and issue detection for your git diffs
- 🎯 Multiple Analysis Modes: Analyze all changes, staged changes only, or individual files
- 🌐 Rich Web View: Beautiful, interactive display of analysis results
- ⚡ Real-time Feedback: Instant analysis with progress indicators
- 🔍 Issue Detection: Automatically identifies security, integration, testing, and quality issues
- 📋 Raw Output Mode: View Claude's complete analysis response for maximum detail
- ✏️ Custom Prompts: Customize the analysis prompt to match your specific needs
📋 Prerequisites
Before using this extension, you need to have Claude Code installed on your system:
- Install Claude Code from the official website: https://docs.anthropic.com/en/docs/claude-code/overview
- Verify installation by running in your terminal:
claude --version
- Git must be installed and accessible in your PATH
- Your workspace must be a git repository
📦 Installation
From VSIX File
- Download the latest
.vsix
file from the Releases page
- In VS Code:
- Open Command Palette (
Cmd/Ctrl+Shift+P
)
- Run "Extensions: Install from VSIX..."
- Select the downloaded
.vsix
file
From Source
- Clone this repository:
git clone https://github.com/yourusername/claude-code-git-diff-visualizer.git
cd claude-code-git-diff-visualizer
- Install dependencies:
npm install
- Build the extension:
npm run compile
- Package the extension:
npm install -g vsce
vsce package
- Install the generated
.vsix
file using the steps above
For Development
- Clone and install dependencies as above
- Open the project in VS Code
- Press
F5
to run the extension in a new Extension Development Host window
🚀 Usage
Quick Start
- Open a git repository in VS Code
- Make some changes to your code
- Click the "Git Diff" button in the status bar
- Wait for analysis while Claude reviews your changes
- Review results in the interactive webview panel
Available Commands
Access these commands through the Command Palette (Cmd/Ctrl+Shift+P
):
Git Diff: Analyze All Changes
- Analyzes all uncommitted changes
Git Diff: Analyze Staged Changes
- Analyzes only staged changes
Git Diff: Show Last Analysis
- Displays the most recent analysis results
- Right-click a file in the Source Control view and select "Analyze This File" to analyze individual files
Understanding the Results
The analysis results show:
- 📝 Summary: Overall description of your changes
- 🎯 Impact Level: Assessment of change significance (High/Medium/Low)
- 📁 File Changes: Detailed breakdown for each modified file
- 🔍 Key Changes: Specific modifications highlighted
- ⚠️ Issues Detected:
- 🔒 Security concerns
- 🔌 Integration issues
- 🧪 Testing gaps
- 💡 Code quality suggestions
- 💭 AI Recommendations: Intelligent suggestions for improvement
⚙️ Configuration
Customize the extension through VS Code settings:
{
"gitDiff.autoAnalyze": false, // Auto-analyze when opening repository
"gitDiff.includeUntrackedFiles": false, // Include untracked files in analysis
"gitDiff.customPrompt": "" // Custom prompt for analysis (empty = use default)
}
Access settings via:
- Command Palette → "Preferences: Open Settings (UI)"
- Search for "Git Diff"
Custom Prompts
You can customize the analysis prompt to focus on specific aspects:
- Edit Prompt: Configure the prompt through settings (
gitDiff.customPrompt
)
- Use Placeholder: Include
{DIFF_PLACEHOLDER}
in your prompt where the git diff should be inserted
- Save Options: Choose to save globally (all projects) or per workspace
Example custom prompts:
- Security Focus: Focus on security vulnerabilities, authentication issues, and data exposure
- Performance Review: Analyze for performance bottlenecks, memory leaks, and optimization opportunities
- Best Practices: Check for code style, design patterns, and architectural consistency
🛠️ Development
Building from Source
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes during development
npm run watch
# Package extension
vsce package
Contributing
We welcome contributions! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
)
- Commit your changes (
git commit -m 'Add amazing feature'
)
- Push to the branch (
git push origin feature/amazing-feature
)
- Open a Pull Request
For major changes, please open an issue first to discuss your ideas.
🔧 Troubleshooting
"Claude CLI is not installed or not in PATH"
- Ensure Claude Code is installed: Installation Guide
- Verify installation:
claude --version
- Restart VS Code after installation
"No changes to analyze"
- Ensure you have uncommitted changes in your git repository
- Check that you're in a git repository (
.git
folder exists)
- For staged analysis, ensure files are staged with
git add
Webview shows loading indefinitely
- Check VS Code Developer Console: Help → Toggle Developer Tools
- Look for error messages in the console
- Try refreshing with the "Refresh Analysis" button
Analysis takes too long
- Large diffs may take more time to analyze
- Try analyzing specific files or staged changes only
- Check your internet connection (Claude requires connectivity)
📄 License
This project is licensed under the MIT License - see the LICENSE.md file for details.
🙏 Acknowledgments
- Thanks to all contributors and users
📞 Support
Note: This extension requires an active Claude Code installation. Claude Code is a separate product from Anthropic and requires its own setup.