git-hunk
Installation
SKILL.md
/git-hunk - split changes into focused commits
Requires: uv tool install git-hunk (or pip install git-hunk)
Workflow
git-hunk list— see all hunks (file, id, +/- stats). No diffs.git-hunk show [<id>...]when headers aren't clear enough (no args shows all).- Plan commits before staging. For each planned commit, list the hunk IDs (and
-lline ranges for partial hunks). A single hunk may need to be split across commits. Ask the user if grouping is ambiguous. - Stage and commit each group:
git-hunk stage <id1> <id2> ... git commit -m "<type>: <description>" git-hunk listagain to check nothing got left behind.
Partial hunks
Line selection (-l) works with stage, unstage, and discard (requires single id):