Skip to main content
Community resource — not affiliated with Anthropic. Learn more

Smart Git Commit

Claude Code Plugin · Git & Version Control

Auto-generates semantic commit messages from your staged diff. Follows Conventional Commits spec with breaking change detection, scope inference, and multi-language support.

4.9 rating 9,200+ installs Free · Open source
Featured Community Conventional Commits Git

Install Plugin

npx plugins add smart-git-commit
Install Plugin →

Free · Open source · MIT license

9.2kInstalls
4.9Rating

What it does

Smart Git Commit reads your staged diff and produces a properly formatted commit message that follows the Conventional Commits specification. It analyses changed file paths to infer the correct scope, scans for API removals and breaking interface changes, and even detects JIRA or GitHub issue references already present in your branch name.

The result is a ready-to-use commit message — or a short list of candidates when the diff spans multiple concerns — that you can apply with a single keystroke or refine before committing.

  • Conventional Commits spec: feat, fix, chore, docs, refactor, perf, test, and more
  • Breaking change detection — adds BREAKING CHANGE footer automatically
  • Scope inference from file paths (e.g. src/auth/ becomes auth)
  • JIRA ticket ID extraction from branch names
  • Multi-language diff support: TypeScript, Python, Go, Rust, Java, and more
  • Subject length enforcement — configurable max characters
  • Optional emoji prefix mode (off by default)

How to install

Run the command below inside your project or globally. The plugin registers itself with Claude Code automatically on first use.

terminal
npx plugins add smart-git-commit

Configuration

Add a smart-git-commit key to your .claude/plugins.json to customise behaviour per project.

.claude/plugins.json
{
  "smart-git-commit": {
    "convention": "conventional",
    "scope": "auto",
    "emoji": false,
    "max-subject-length": 72
  }
}

Example output

Stage your changes and ask Claude to generate a commit message. The plugin analyses the diff and returns a formatted result:

example prompt
# User prompt
Generate a commit message for my staged changes
plugin output
feat(auth): add JWT refresh token rotation

Implements sliding-window refresh token rotation to reduce
the attack surface of long-lived sessions. Tokens are
invalidated server-side on reuse detection.

BREAKING CHANGE: /auth/refresh now returns a new pair of
access + refresh tokens. Clients must store and rotate both.

Pro tip: Stage commits atomically — one logical change per commit — so the plugin can produce a single, focused message. Mixing unrelated changes in one diff leads to multi-scope messages that are harder to read in a changelog.