/git-commit:git-commitfrom git-commit
Writes and creates Git commits in the repository's own message convention (Conventional Commits, release-please, commitlint) and names new branches to match it. Use when asked to commit, "write a commit message", split changes into several commits, fix a commit message, or name a branch.
Ships in git-commit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Build commits from the actual diff, in the repository's own convention. A request to commit authorizes creating commits. It does not authorize pushing (use ship, or forgejo-ship on Forgejo, for push, PR or merge requests if installed), amending, rebasing, resetting, stashing, force-pushing, skipping hooks, or changing Git config. History rewriting belongs to git-history.
.env files, private keys, caches, editor artifacts, or unrelated local work. If a sensitive or ambiguous file seems meant for the commit, ask with AskUserQuestion.Run these together:
git status --short --branch
git diff --staged
git diff
git log --oneline -15
Read untracked files that may belong in the commit. Never infer a commit's purpose from filenames alone.
Determine the message convention in this order:
git config commit.template).commitlint.config.*, .commitlintrc*, release-please-config.json, .release-please-manifest.json, release-please in .github/workflows/, semantic-release config. When any of these exist, read references/release-tooling.md.When evidence is mixed or absent, say so and use Conventional Commits. Don't copy isolated historical exceptions.
git add -A or git add . only when the user asked for all changes and you reviewed the full list.Use this structure when no other convention exists:
<type>[optional scope][!]: <description>
[optional body]
[optional footer(s)]
! right before the colon, one space after it. The header must parse on its own, so put no emoji, ticket number, or bullet in front of it.fix: for a backward-compatible bug fix, feat: for backward-compatible functionality, <type>!: for a breaking change (use the truthful type, usually feat!: or fix!:).docs, refactor, test, build, ci, perf, style, chore, or revert only when accurate. Never label a feature or fix chore to dodge a release.misc or repo.! and a final BREAKING CHANGE: <impact and migration> footer.revert: commit, keep the This reverts commit <hash>. line that git revert generates, and add why.Closes #42 closes the issue when the commit reaches the default branch; use one keyword per issue (close, fix, resolve and their -s/-d forms). Use Refs #42 when the commit shouldn't close it.fix(parser): preserve escaped delimiters
feat(api)!: require explicit tenant IDs
BREAKING CHANGE: callers must pass tenant_id when creating a client.
Common mistakes:
| Written | Fix |
|---|---|
feat: Added login page. | feat: add login page: imperative, lowercase, no period |
feat(adding-auth): ... | feat(auth): ...: a scope is a noun naming the area |
fix: handle empty list, closes #42 | Move Closes #42 to the footer |
| Breaking change described only in the body | Add ! and a BREAKING CHANGE: footer, since tools read only those |
For each planned commit:
git diff --staged to confirm it holds exactly the intended change.git status --short before starting the next commit.When asked to name or create a branch, or when committing would land topic work on the default branch and the user wants a branch first, detect the naming convention in this order:
branches: filters.git branch --all --sort=-committerdate | head -30), when one pattern clearly dominates.<type>/<description>, or <type>/<issue>-<description> when an issue exists (feat/user-authentication, fix/87-login-race-condition).feat/ branch carries feat: commits. Where the repo uses feature/ and bugfix/, follow it.a-z, 0-9, - and /; a dot only for versioned release branches (release/v1.2.0). No author names, dates, or the word worktree, and never a trunk name (main, master, develop).git check-ref-format --branch <name>; it catches illegal names, not convention breaks.git fetch origin <base> then git switch -c <name> --no-track origin/<base>. Find <base> with git symbolic-ref --short refs/remotes/origin/HEAD (or git ls-remote --symref origin HEAD). Uncommitted changes carry across git switch -c; if they don't belong on the new branch, ask before stashing or committing them.Give each commit's short hash and subject, the convention evidence used, and files deliberately left uncommitted. For a non-mutating request, give the proposed file groups and messages instead.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin git-commit