A VS Code extension that generates git commit messages using AI. Supports Claude Code CLI or VS Code Language Models (GitHub Copilot, etc.).
Option A: Claude Code (default)
- Claude Code CLI installed and authenticated
Option B: VS Code Language Models
- GitHub Copilot or another VS Code Language Model provider
- VS Code 1.85.0 or higher
- Download the
.vsixfile from releases - In VS Code, open Extensions (Ctrl+Shift+X)
- Click
...> "Install from VSIX..." - Select the downloaded file
git clone https://github.com/neoz/claude-commit.git
cd claude-commit
npm install
npm run compileThen press F5 in VS Code to launch Extension Development Host.
- Stage your changes (
git add) - Click the sparkle icon in the Source Control view
- Wait for AI to generate a commit message
- Review and commit
When the AI detects unrelated changes, it suggests splitting into multiple commits. You can:
- Pick a single commit to stage just that commit's files
- Stage all step by step to walk through each commit sequentially:
- The first commit's files are staged and its message is set
- A status bar item shows your progress (e.g., "Split 1/3 | Next: fix(api)...")
- After you commit, the next commit is automatically staged
- Click the status bar item to skip to the next commit or cancel the session
- Cancel at any point during staging via the progress dialog
- Repeat until all commits are done
If the AI assigns the same file to multiple commits, the extension automatically deduplicates using a first-wins strategy and notifies you.
The extension generates conventional commit messages in the format:
type(scope): description
To use VS Code Language Models instead of Claude:
- Open VS Code Settings
- Search for "claude-commit"
- Set
Providertovscode-lm - Optionally set
Modelto your preferred model family (e.g.,gpt-4o)
- Multi-provider support: Use Claude Code CLI or VS Code Language Models
- Model selection: Choose between Haiku (fast), Sonnet, or Opus for Claude
- Split commit detection: Suggests splitting unrelated changes into atomic commits
- Step-by-step split commits: Walk through all suggested commits sequentially with auto-advance
- File deduplication: Automatically resolves duplicate file assignments across split commits
- Cancellable split workflow: Cancel staging or the entire split session at any point
- Smart staging: Auto-stages only relevant files for selected commit with verification
- Sensitive file filtering: Excludes .env, keys, and credentials from AI
- Customizable prompts: Adjust system/user prompts for your team's conventions
- Progress indicator: Shows generation status with cancel option
- Cross-platform: Works on Windows, macOS, and Linux
| Setting | Description | Default |
|---|---|---|
claude-commit.provider |
AI provider (claude or vscode-lm) |
claude |
claude-commit.model |
Model to use (Claude: haiku/sonnet/opus, VS Code LM: model family) |
haiku |
claude-commit.timeout |
Timeout in milliseconds (5000-120000) | 30000 |
claude-commit.prompt |
Custom system prompt (leave empty for default) | |
claude-commit.userPrompt |
Custom user prompt template with {diff} placeholder |
|
claude-commit.excludePatterns |
Glob patterns for files to exclude from AI | .env*, *.pem, etc. |
- VS Code 1.85.0 or higher
- One of:
- Claude Code CLI in PATH (for
claudeprovider) - GitHub Copilot or other LM provider (for
vscode-lmprovider)
- Claude Code CLI in PATH (for
- Large diffs may be slow to process
- VS Code LM provider requires an active Copilot subscription or compatible extension
MIT