A Claude Code command: /commit asks what to do, then splits your changes into Conventional Commits, one per logical group, on the branch you are on. It runs on Haiku 5.5 (claude-haiku-5-5), whatever model the session uses.
❯ /commit
Commit: what to do with these changes?
❯ 1. Commit + push (Recommended)
2. Commit only
3. Commit on a new branch
| Choice | What it does |
|---|---|
| Commit + push (recommended) | Commits on the current branch, main included, and pushes it. |
| Commit only | Commits on the current branch and stops there. |
| Commit on a new branch | Creates a branch named after the changes (feat/side-panel), commits there and pushes it. |
- Reads the branch,
git statusandgit diff HEADbefore Claude starts (the staged diff in a repo with no commits yet, whereHEADdoes not exist). - Never creates or switches branches unless you pick Commit on a new branch.
- Stages only each group's files (unstaging with
git resetfirst if other files are already staged), never.env*or secrets, and commits astype(scope): summary: in the configured language (English by default), imperative, under 72 characters, with a body only when the why is not obvious. - Never adds
Co-Authored-By, Claude Code session links (Claude-Session) or any Claude or Anthropic attribution. - Pushes with
git push -u origin HEAD. With no remote, or a failed push, it reports the error and stops. - Runs
gitand asks its one question, nothing else (allowed-tools: Bash(git *), AskUserQuestion). Where it cannot ask, as inclaude -p "/commit", it commits and pushes.
/plugin marketplace add midudev/better-claude
/plugin install commit@better-claude
One command file (commands/commit.md): its frontmatter picks the model and the allowed tools, and its !`git …` lines put the branch, the status and the diff in the prompt.
claude plugin validate . # from this folder
claude --plugin-dir . # try it from sourceMIT © Miguel Ángel Durán (midudev)