TsukiNi22/ai-utils / skills/git/git-commit
git-commit
UnverifiedCommit the current diff (local)
The request to run this skill is the explicit request to commit (the global "never commit unprompted" rule is satisfied); it is not a request to push, tag, release or open a PR.
Load git-conventions first (message format, types, scopes, CI keywords): it is the source of truth, and /git
routes here.
1. Look at the diff
\git status --short
\git diff --stat # unstaged
\git diff --cached --stat # already staged
\git log --oneline -10 # the style of the repository, scopes already used
- Read the real diff (
\git diff,\git diff --cached) of what is not obvious; untracked files are read too. - Never stage what must not be versioned: build trees, logs, caches,
.env/ keys / tokens, big binaries, scratch folders (ex:.claude-cluster*). If it looks like noise and is not in.gitignore, ask (or leave it out and say so); never add it to.gitignoreon your own. - Nothing to commit -> say it and stop.
2. Group
- One logical change per commit (
git-conventions): split by purpose, not by file count - a fix, a feature, its docs, the tests, a pure rename / reformat are separate commits when they can stand alone. - The CHANGELOG update is its own commit (
docs(CHANGELOG): ...) and comes last. - A change that only makes sense together stays together. When a file mixes two purposes, split it with
git add -ponly if the hunks are clean; otherwise commit it with the dominant purpose. - Order the commits so each one builds (dependencies first, docs / changelog last).
- A very large or ambiguous diff: show the planned commits (title + files) in one short list and go on unless the split is really ambiguous (then ask once).
3. Commit
For each group, stage by path (never git add -A / .), check what is staged, commit:
\git add -- <paths>
\git diff --cached --stat
\git commit -m "<type>(<scope>): <message>"
- Message = the title only: one short line in English, the global recap of the group, in the style of the
recent log. No body, no description, no bullet list, no second
-m. - No
Co-Authored-By, no "Generated with", no AI mention. Only exception: a repository whose own instructions require the trailer (theai-utilsrepository, per itsCLAUDE.md): then exactly that trailer, nothing else. - A CI keyword (
[build]/[release]/[ignore]) only when the repository's workflows use them and the user asked for it. - A hook that fails (xstyle pre-commit, formatter): fix the cause, restage, commit again (a new commit, no
--amendof a commit that failed). Never--no-verify. - Never amend, rebase, reset or rewrite an existing commit unless asked.
4. Report
\git log --oneline -<n> of the new commits and \git status --short (what is left uncommitted and why). Then
the push command as a suggestion only (\git push), never run.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |