git-hunk

Stage, unstage, and inspect Git hunks by hash non-interactively.

2|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/joegoldin/agent-skills --skill git-hunk-joegoldin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-hunk
Source: https://github.com/joegoldin/agent-skills/tree/main/skills/git-hunk
Command: npx skills add https://github.com/joegoldin/agent-skills --skill git-hunk-joegoldin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill solves the challenge of interacting with Git hunks in a non-interactive and deterministic manner, reducing the need for manual intervention and streamlining the commit process.

Core Features & Use Cases

  • Hunk List and Preview: View and preview changes made to files in the repository at a granular level.
  • Selective Hunk Staging: Stage and unstage specific hunks by hash without interactive prompts.
  • Committing Changes: Commit only the desired changes with precise control over the staged hunks.
  • Use Case: When you need to split a file's changes into multiple commits while working on a feature branch.

Quick Start

Add the hunk by hash 'abc123' to the staging area.

Frequently Asked Questions about git-hunk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stage individual git hunks non-interactively for precise commit control?

You can stage individual git hunks deterministically by referencing their unique hash, bypassing interactive prompts. This method provides precise commit control for splitting file changes into multiple commits during feature development.

What is the best way to split a file's changes into multiple commits in git?

Splitting a file's changes into multiple commits requires selectively staging individual hunks. You preview changes, stage specific hunks by hash, and commit them separately without manual interactive intervention.

How do you inspect and preview specific git hunks before staging?

You inspect and preview git hunks by viewing granular changes made to files in the repository. This hunk list and preview functionality allows you to identify the exact hunk hashes needed for selective staging.

Can I unstage specific git hunks by hash without using interactive prompts?

Yes, you can unstage specific git hunks by their hash without interactive prompts. This non-interactive approach ensures deterministic commit control when you need to remove particular changes from the staging area.

Does non-interactive git hunk management work for complex code reviews?

Non-interactive git hunk management is designed for complex code reviews and intricate feature development. It provides deterministic staging and precise commit control by automating hunk staging without manual intervention.

When should I use hash-based hunk staging instead of manual git add?

Use hash-based hunk staging when you need deterministic, non-interactive control over individual changes. It replaces manual git add for complex code reviews or splitting file changes into multiple commits.