From git-toolkit
Analyzes all changes in the working tree (staged, unstaged, and untracked), intelligently groups them into semantic commit units at hunk-level granularity, and commits them sequentially after user approval. Use when asked to "auto-commit", "group and commit", "split changes into commits", "organize my changes into commits", "batch commit", "smart commit", or "split my work into commits".
How this skill is triggered — by the user, by Claude, or both
Slash command
/git-toolkit:auto-group-commitThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Analyze all working tree changes, group them into meaningful semantic commit units at hunk-level granularity, and commit them sequentially after user approval.
Analyze all working tree changes, group them into meaningful semantic commit units at hunk-level granularity, and commit them sequentially after user approval.
If $ARGUMENTS is provided, write all commit messages in that language (e.g., "japanese", "ja", "english", "en"). Default to English.
Ensure all changes are in an unstaged state for uniform analysis.
git diff --cached --quiet to check for staged changesgit reset HEAD to unstage them (this is non-destructive — no work is lost)This normalization is necessary because mixed staged/unstaged states complicate diff analysis and patch application.
Run the following commands in parallel:
git diff — full unified diff of all modificationsgit diff --stat — change statistics summarygit status --short — list of all changed and untracked filesFor each untracked file shown by git status (lines starting with ??), read its content. git diff does not include untracked files, so treat each untracked file as a "new file" addition.
If there are no changes at all (no modified, staged, or untracked files), notify the user and stop.
Analyze all diffs and untracked file contents, then group them into logical commit units. Each group represents one commit.
Display all groups in order using this format:
=== Commit 1/N ===
Message: <proposed commit message>
Changes:
- <file path> (<brief description of included hunks>)
- <file path> (new file)
...
=== Commit 2/N ===
Message: <proposed commit message>
Changes:
- <file path> (<brief description of included hunks>)
...
Ask the user to approve the plan. If the user requests adjustments (reordering, merging groups, splitting further, changing messages), revise and re-present.
Do NOT proceed to Step 5 without explicit user approval.
For each group in order:
Important: After each commit, HEAD changes and line numbers in the remaining diff may shift. Always work with the current diff state, not the original analysis. Re-read
git diff <file>for each file to extract the correct hunks.
For each item in the group:
git add <file>git add <file>git diff <file> to get the current diff for the filediff --git a/<file> b/<file> header--- a/<file> and +++ b/<file> lines@@ ... @@ hunk header with correct line numbers from the current diffreferences/patch-format-example.md for a concrete example of a correctly constructed patch/tmp/auto-group-commit-N.patch)git apply --cached /tmp/auto-group-commit-N.patchgit diff --cached --stat to verify the staged content matches expectationsgit commit -m "$(cat <<'EOF'
<commit message>
EOF
)"
git log -1 --onelinerm -f /tmp/auto-group-commit-N.patchAfter all groups are committed:
git log --oneline -N (where N is the number of commit groups) to display all created commitsgit status --short to confirm no unexpected changes remainReport the results to the user.
git apply --cached fails:
git reset HEAD to clear the staging areaCommit fails (e.g., pre-commit hook):
git reset HEAD to unstageMid-sequence abort:
cat <<'EOF' (single-quoted) for HEREDOC commit messages to prevent variable expansiongit add <file> rather than attempting patch constructionnpx claudepluginhub thinceller/claude-plugins --plugin git-toolkitGroups uncommitted git changes (staged/unstaged/untracked) into atomic commits by logical purpose and generates conventional commit messages with bodies. Use for splitting multiple changes or 'smart commit' requests.
Groups unstaged git changes into atomic commits by logical concern, one per type (feature, test, config, formatting, docs), then pushes.
Analyzes Git changes, groups staged/unstaged files into logical commits by feature/type/scope, and executes them one-by-one using conventional commit format.