DEV Community

AI Operator
AI Operator

Posted on

CommitCraft: I built a VS Code extension that writes git commit messages with Claude

Every developer has been there: you finish a fix, stage your files, then stare at the commit box for 30 seconds before typing something useless like fix stuff.

I built CommitCraft to solve this. It is a VS Code extension that reads your staged diff and generates a proper conventional commit message in 1-2 seconds using Claude Haiku.

How it works

  1. git add your files
  2. Press Ctrl+Shift+Alt+C
  3. Claude reads the full staged diff and your last 5 commits for style context
  4. A pre-filled editable input box appears with the generated message
  5. Press Enter to apply it in the Source Control panel

No copy-pasting. No switching windows. The message lands directly in VS Code's SCM input.

What the output looks like

CommitCraft reads your recent commits to match your project's style:

feat(auth): add OAuth2 Google login with token refresh
fix(api): handle null response from payment gateway  
refactor: extract validation logic into shared utility
docs(readme): update setup and installation steps
chore: bump dependencies to latest versions
Enter fullscreen mode Exit fullscreen mode

If you use freeform messages instead of conventional commits, switch commitcraft.format to freeform and it adapts.

Install

Option 1: From VSIX (works now)

Download commitcraft-1.0.0.vsix from the GitHub Releases page, then in VS Code: Ctrl+Shift+P > Extensions: Install from VSIX...

Option 2: VS Code Marketplace (pending publisher approval, should be up in 1-2 days)

Setup

Add your Claude API key to VS Code settings (settings.json):

{
  "commitcraft.apiKey": "sk-ant-your-key-here"
}
Enter fullscreen mode Exit fullscreen mode

Get a free key at console.anthropic.com. Claude Haiku costs about $0.0001 per commit message. Running it 1000 times costs $0.10.

Privacy

Your staged diff goes to Anthropic's API only. No CommitCraft server exists. No tracking, no analytics, no sign-up.

Source

GitHub: Android-Tipster/commitcraft

MIT license. If you try it, let me know how it handles large multi-file refactors -- that's the case I want to improve next.

Top comments (0)