staging-git-hunks

List and stage git hunks by ID without interactive input.

1|Updated Apr 13, 2015
One-click install
npx skills add https://github.com/tyler-dot-earth/.dotfiles --skill staging-git-hunks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: staging-git-hunks
Source: https://github.com/tyler-dot-earth/.dotfiles/tree/main/agents/skills/staging-git-hunks
Command: npx skills add https://github.com/tyler-dot-earth/.dotfiles --skill staging-git-hunks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Non-interactive selective hunk staging for git. Lists and stages individual diff hunks by ID. Use when an LLM or script needs to programmatically stage specific code changes without interactive input. Requires the git-hunks command to be installed and available on PATH.

Core Features & Use Cases

  • List unstaged hunks with IDs and diffs for review.
  • Stage specific hunks by ID to create precise commits without interactive patching.
  • Guidance on hunk ID volatility and re-listing after changes.

Quick Start

List unstaged hunks and selectively stage them by their IDs.

Frequently Asked Questions about staging-git-hunks

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

FAQPage Schema
How do I stage individual git hunks non-interactively for automation scripts?

Stage individual git hunks by ID without prompting using a deterministic list-and-stage workflow, enabling scripts and LLMs to create precise commits across multiple files without interactive patching.

What's the best way to programmatically stage specific code changes across multiple files in git?

List unstaged hunks with IDs and diffs for review, then stage specific hunks by their IDs to create precise, reproducible commits without manual patching.

Do I need git-hunks installed to stage diff hunks by ID?

Yes, staging git hunks by ID requires the git-hunks command to be installed and available on PATH, along with a POSIX shell with awk for the non-interactive staging workflow.

Why do hunk IDs change after staging, and when should I re-list them?

Hunk IDs are volatile and shift after each staging operation, so you must re-list unstaged hunks to get fresh IDs before staging the next change to avoid targeting incorrect hunks.

Can I use non-interactive hunk staging with LLM-driven git workflows?

Yes, the non-interactive hunk staging workflow is designed for LLMs and automation scripts that need precise, reproducible selective staging without interactive input or manual patching.