Skip to content
Agentmart
Submit a tool

git-hunks

Selective hunk-level staging and commits with git-hunks.

Skill by seruman

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/seruman-git-hunks

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Selective hunk-level staging and commits with git-hunks. Use when the user asks to split changes into multiple logical commits, stage individual hunks instead of whole files, make surgical commits from a dirty worktree, or review changes at hunk granularity before committing. Also use when the user asks to "commit in hunks," "commit by hunk," or requests fine-grained staging.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/git-hunks

What's inside

Skill name
git-hunks
Description
Selective hunk-level staging and commits with git-hunks. Use when the user asks to split changes into multiple logical commits, stage individual hunks instead of whole files, make surgical commits from a dirty worktree, or review changes at hunk granularity before committing. Also use when the user asks to "commit in hunks," "commit by hunk," or requests fine-grained staging.
License
MIT
Instructions
57 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# git-hunks

Use git-hunks to stage individual hunks instead of whole files. Review at hunk granularity, group related changes, and make focused commits.

## Quick workflow

1. List all unstaged hunks and review their diffs.
2. Group hunks that belong to the same logical change.
3. Stage one group, commit, repeat for remaining groups.

```bash
git hunks list
git hunks add '<hunk-id>' '<hunk-id>'
git commit -m "description of this logical change"
```

Always quote hunk IDs — they contain special characters (e.g., `src/main.c:@-10,6+10,7`).

## Commands

- `git hunks list` — show all unstaged hunks with stable IDs and inline diffs
- `git hunks list --staged` — show staged hunks (use to verify before committing)
- `git hunks add <id> ...` — stage one or more hunks by ID

Hunk IDs are stable: staging one hunk does not change the IDs of other hunks.

## Grouping hunks into commits

Read every hunk diff from `git hunks list` before deciding groups. Group by logical change:

- A new feature: the implementation hunk + its import hunk + its test hunk
- A bug fix: the fix hunk + the regression test hunk
- A refactor: all related rename/move hunks together

Stage and commit one group at a time. Do not mix unrelated changes.

## Verification loop

After staging, always verify before committing:

```bash
git hunks list --staged   # confirm exactly the right hunks are staged
git hunks list            # confirm remaining hunks are still pending
git diff --staged         # review the full staged diff
git commit -m "focused commit message"
```

## When to skip git-hunks

- All changes in a file belong to the same logical commit — use `git add <file>`.
- Changes need manual editing before staging — use `git add -p` interactively.

## Links

- [git-hunks](https://github.com/rockorager/git-hunks)

From seruman/pi-things, MIT.

More from seruman/pi-things

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
May 6, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from seruman

Cite this page

git-hunks skill. Agent Mart. https://agentmart.dev/skills/seruman-git-hunks (last updated 2026-10-24)