DEV Community

Tom Yahav
Tom Yahav

Posted on

Stop Writing Commit Messages: Let Claude Do It in VS Code

Writing commit messages sounds trivial—until you're doing it dozens of times a day.

You've just finished implementing a feature or fixing a bug, your context is fresh, but summarizing it cleanly? That's friction. Most developers either rush it ("fix stuff") or pause their flow to craft something meaningful.

This tool removes that friction.

It reads your staged changes and uses Anthropic's Claude model to generate a clear, structured commit message—right inside your workflow.


Why This Matters

Commit messages are more than just logs—they're communication.

Good commit messages help:

  • Teammates understand changes quickly
  • Reviewers move faster
  • Future-you debug issues without digging through diffs

But writing them consistently is tedious.

Tools like GitHub Copilot try to help, but their commit suggestions are often generic or disconnected from your intent.

This tool improves that by:

  • Using your actual staged diff
  • Letting you define custom formats
  • Integrating directly into Visual Studio Code

How It Works

At a high level:

  1. You stage your changes
  2. The tool reads the diff
  3. It sends the diff to Claude (Haiku model)
  4. Claude generates a structured commit message
  5. You review and commit

No context switching. No manual prompting.


Installation Options

You've got two ways to use it depending on your workflow.


Option 1 — VS Code Extension

Best if you live inside VS Code.

Install

bash install-claude-commit.sh
Enter fullscreen mode Exit fullscreen mode

Then reload VS Code:

Cmd + Shift + P → Developer: Reload Window
Enter fullscreen mode Exit fullscreen mode

Usage

  • Press Cmd + Shift + G
  • Or open Source Control → ... → Generate Commit Message (Claude)

That's it—the message appears in your commit box.


Option 2 — Claude Skill

Best if you work across multiple editors or prefer CLI-driven workflows.

Install

  • Double-click commit-message-skill.skill
  • Then ask Claude:
generate a commit message
Enter fullscreen mode Exit fullscreen mode

Claude will read your staged changes and generate the message.

Team Setup (Zero Friction)

Drop this into your repo:

.claude/skills/commit-message/SKILL.md
Enter fullscreen mode Exit fullscreen mode

Now the entire team gets it automatically—no setup required.


Customizing Commit Style

This is where the tool becomes genuinely powerful.

You can enforce team-wide conventions like:

  • Jira ticket prefixes
  • Conventional commits
  • Custom phrasing rules

Example

{
  "claude-commit.commitFormat": "Always prefix with Jira ticket. Format: TICKET-123: description."
}
Enter fullscreen mode Exit fullscreen mode

Place this in:

  • VS Code settings, or
  • .vscode/settings.json for shared config

Why Claude Haiku?

The tool uses Claude Haiku for a reason:

  • ⚡ Fast response time
  • 💰 Low cost per request
  • 🧠 Good enough quality for structured summaries

You don't need a heavyweight model for commit messages—Haiku hits the sweet spot.


Under the Hood (Simplified)

Conceptually, it's doing something like this:

const diff = getStagedDiff();
const prompt = `
Summarize the following git diff into a concise commit message.
Follow this format:
- Short title
- Optional bullet points
Diff:
${diff}
`;
const message = await claude.generate(prompt);
insertIntoCommitBox(message);
Enter fullscreen mode Exit fullscreen mode

The real value isn't the code—it's the workflow integration.


When This Tool Shines

This is especially useful when:

  • You're making frequent small commits
  • You're working on multi-file changes
  • You want consistent commit formatting across a team
  • You're tired of breaking flow for something mechanical

Tradeoffs

No tool is perfect.

Be aware of:

  • You still need to review the message
  • AI can miss intent or nuance
  • Requires Claude CLI setup

But compared to manual effort, the tradeoff is heavily in your favor.


Final Thoughts

This isn't about replacing developer judgment—it's about removing repetitive friction.

You stay in flow.
Your commits stay clean.
Your team benefits.

If commit messages are a small annoyance in your day, this is a clean, practical fix.


Try It Out

You can explore the project here:
👉 yahav10/vscode-claude-commit


If you're building internal dev tools or optimizing team workflows, this is a great example of applying AI where it actually matters: small, high-frequency tasks that add up.

Top comments (0)