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.
- π 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
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
- Download the latest
.vsixfile from the Releases page - In VS Code:
- Open Command Palette (
Cmd/Ctrl+Shift+P) - Run "Extensions: Install from VSIX..."
- Select the downloaded
.vsixfile
- Open Command Palette (
- 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
.vsixfile using the steps above
- Clone and install dependencies as above
- Open the project in VS Code
- Press
F5to run the extension in a new Extension Development Host window
- 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
Access these commands through the Command Palette (Cmd/Ctrl+Shift+P):
Git Diff: Analyze All Changes- Analyzes all uncommitted changesGit Diff: Analyze Staged Changes- Analyzes only staged changesGit 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
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
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"
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
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes during development
npm run watch
# Package extension
vsce packageWe 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.
- Ensure Claude Code is installed: Installation Guide
- Verify installation:
claude --version - Restart VS Code after installation
- Ensure you have uncommitted changes in your git repository
- Check that you're in a git repository (
.gitfolder exists) - For staged analysis, ensure files are staged with
git add
- Check VS Code Developer Console: Help β Toggle Developer Tools
- Look for error messages in the console
- Try refreshing with the "Refresh Analysis" button
- Large diffs may take more time to analyze
- Try analyzing specific files or staged changes only
- Check your internet connection (Claude requires connectivity)
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Thanks to all contributors and users
- Report bugs: GitHub Issues
- Request features: GitHub Discussions
- Get help: Documentation Wiki
Note: This extension requires an active Claude Code installation. Claude Code is a separate product from Anthropic and requires its own setup.