Generate Conventional Commit messages with a single click using Claude AI, directly from the VS Code Source Control panel.
- One-click commit message generation from the Source Control title bar.
- Reads your staged diff via the built-in VS Code Git API.
- Output strictly follows Conventional Commits:
type(scope): description. - Powered by Claude Haiku 4.5 for fast responses.
- VS Code
>= 1.80.0. - A Git repository open in your workspace.
- A Claude Code OAuth token (see below).
The extension authenticates against the Anthropic API using a Claude Code OAuth token.
- Install the Claude Code CLI:
npm install -g @anthropic-ai/claude-code
- Generate the token:
claude setup-token
- Sign in with your Anthropic account in the browser window that opens (requires a Pro, Max, or Team plan).
- Copy the token printed by the CLI. It starts with
sk-ant-oat01-....
Provide the token using any of these methods (resolved in this order):
- VS Code setting (recommended). Open Settings, search Claude Commit, and paste the token. Or in
settings.json:{ "claudeCommit.oauthToken": "sk-ant-oat01-..." } - Environment variable
CLAUDE_CODE_OAUTH_TOKEN, set before launching VS Code. - First-run prompt. If neither is set, the extension prompts you on first use and stores the value for next time.
- Stage your changes:
git add <files>. - Open the Source Control panel (
Ctrl+Shift+G). - Click the ✨ sparkle icon in the title bar.
- The commit input box is filled with a Conventional Commit message.
| Setting | Type | Default | Description |
|---|---|---|---|
claudeCommit.oauthToken |
string | "" |
Claude Code OAuth token. Falls back to CLAUDE_CODE_OAUTH_TOKEN env var when empty. |
| Command | Title |
|---|---|
claudeCommit.generate |
Generate Commit Message (Claude) |
Format: type(scope): description. Supported types: feat, fix, chore, docs, refactor, test, style, ci, perf, build, revert.
| Symptom | Fix |
|---|---|
No git repository found. |
Open a folder that contains a .git directory. |
No staged changes. |
Run git add first. The extension only reads staged changes. |
Expected an OAuth token starting with sk-ant-oat... |
Re-run claude setup-token and paste the full token. |
401 / 403 from the API |
Token expired or revoked. Regenerate with claude setup-token. |
| Empty or truncated message | Stage smaller chunks of changes. |
