| name | git-partial-stage |
| description | Non-interactive partial staging of git hunks (git add -p alternative).
Use when the user wants to stage specific hunks, make partial commits,
split changes across commits, or says "partial stage", "stage hunks",
"split commit", "selective stage", or "commit part of a file".
|
| allowed-tools | ["Bash","Read","Grep","Glob","AskUserQuestion"] |
Partial Stage — non-interactive git add -p
Stage individual change groups (sub-hunk granularity) without interactive prompts.
Tool
The helper script lives at ~/.claude/skills/partial-stage/partial-stage.py.
It parses diffs into individually selectable "change groups" — contiguous
blocks of added/removed lines within a hunk — so you can stage at finer
granularity than whole hunks.
No external dependencies beyond Python 3.10+ and git.
Commands
Show change groups in a file
python3 ~/.claude/skills/partial-stage/partial-stage.py show <file>
python3 ~/.claude/skills/partial-stage/partial-stage.py show <file> --verbose
python3 ~/.claude/skills/partial-stage/partial-stage.py show <file> --grep "pattern"
python3 ~/.claude/skills/partial-stage/partial-stage.py show <file> --group 5
python3 ~/.claude/skills/partial-stage/partial-stage.py show <file> --cached
Stage specific groups
python3 ~/.claude/skills/partial-stage/partial-stage.py stage <file> -- 2,5,7-9
python3 ~/.claude/skills/partial-stage/partial-stage.py stage <file> --grep