git-hunk

Community

Stage exact diff hunks without -p.

Authornexxeln
Version1.0.0
Installs0

System Documentation

What problem does it solve?

git-hunk removes the friction of selecting partial changes by letting you inspect and stage precise diff hunks non-interactively, which is especially useful for AI agents and automated workflows.

Core Features & Use Cases

  • Atomic staging & commit previews: Stage or commit exactly selected hunks/changes with --dry-run previews to reduce mistakes.
  • Agent-safe selectors: Prefer stable change_key selectors over snapshot-bound change_id, with validate to recover when snapshots go stale.
  • Resolve file+line hints: Use resolve to map a file and line range to the recommended selectors, then apply them via stage, unstage, or commit.

Quick Start

Tell the AI: "Run git-hunk scan --mode stage --json, then git-hunk resolve --mode stage --snapshot <snapshot-id> --path <file> --start <line> --end <line> and finally git-hunk stage --snapshot <snapshot-id> --change-key <change-key>."

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: git-hunk
Download link: https://github.com/nexxeln/git-hunk/archive/main.zip#git-hunk

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.