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 CHANGEfooter automatically - Scope inference from file paths (e.g.
src/auth/becomesauth) - 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.
npx plugins add smart-git-commit
Configuration
Add a smart-git-commit key to your .claude/plugins.json to customise behaviour per project.
{
"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:
# User prompt
Generate a commit message for my staged changes
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.