Generate git commit messages with Claude AI directly from the VS Code Source Control panel.
Click the Claude button in the Source Control title bar and the extension reads your staged (or unstaged) diff, asks Claude to write a commit message, and drops it into the commit input — ready to commit.
Features
One click — Claude button in the Source Control panel title bar.
Zero auth setup for existing Claude Code users — reuses your current Claude Code CLI login automatically.
Conventional Commits format by default, or plain imperative sentences.
Fallback to Anthropic API — if the CLI is not installed, you are prompted once for an API key which is stored securely in VS Code SecretStorage.
Requirements
One of:
Claude Code CLI installed and logged in (recommended — uses your subscription with no extra setup), or
An Anthropic API key (you will be prompted on first use if no CLI is found).
Usage
Make some changes in a git repository and stage them (or leave them unstaged).
Open the Source Control panel (Ctrl+Shift+G).
Click the Claude logo button in the panel title bar.
The generated commit message appears in the commit input — review it and commit.
Settings
All settings are under the claudeCommit namespace.
Setting
Default
Description
claudeCommit.claudeCliPath
""
Path to the claude binary. Leave empty to auto-detect from PATH.
claudeCommit.model
""
Model to use (e.g. claude-sonnet-4-6). Leave empty to use the CLI/API default.
claudeCommit.commitStyle
conventional
conventional (type: description) or plain (imperative sentence).
claudeCommit.maxDiffBytes
12000
Diffs larger than this are truncated before being sent to Claude.
Commands
Command
Description
Claude Commit: Generate Commit Message with Claude
Generate and insert a commit message (also triggered by the toolbar button).
Claude Commit: Set Anthropic API Key (Fallback)
Store or clear an Anthropic API key used when the CLI is not installed.
Authentication
The extension tries authentication sources in this order:
Claude Code CLI — if claude is on your PATH (or claudeCommit.claudeCliPath is set), the CLI is invoked in print mode. It reuses your existing Claude Code login: subscription OAuth token or API key, whichever is active. No extra setup needed.
Anthropic API key — if no CLI is found, the extension prompts for an API key and stores it in VS Code SecretStorage. Use the Set Anthropic API Key command to update or clear it.
If you have a stray ANTHROPIC_API_KEY environment variable set, the CLI will use that and bill API credits rather than your subscription. Unset it if you want to use your subscription plan.