git-hunk
CommunityStage exact diff hunks without -p.
Software Engineering#git#CLI automation#agent workflow#atomic commits#hunk staging#diff inspection#change selectors
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-runpreviews to reduce mistakes. - Agent-safe selectors: Prefer stable
change_keyselectors over snapshot-boundchange_id, withvalidateto recover when snapshots go stale. - Resolve file+line hints: Use
resolveto map a file and line range to the recommended selectors, then apply them viastage,unstage, orcommit.
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 requiredComponents
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.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.