git-hunk

Installation
SKILL.md

/git-hunk - split changes into focused commits

Requires: uv tool install git-hunk (or pip install git-hunk)

Workflow

  1. git-hunk list — see all hunks (file, id, +/- stats). No diffs.
  2. git-hunk show [<id>...] when headers aren't clear enough (no args shows all).
  3. Plan commits before staging. For each planned commit, list the hunk IDs (and -l line ranges for partial hunks). A single hunk may need to be split across commits. Ask the user if grouping is ambiguous.
  4. Stage and commit each group:
    git-hunk stage <id1> <id2> ...
    git commit -m "<type>: <description>"
    
  5. git-hunk list again to check nothing got left behind.

Partial hunks

Line selection (-l) works with stage, unstage, and discard (requires single id):

Installs
55
GitHub Stars
3
First Seen
Apr 8, 2026