Stage Hunk

Stage or unstage specific hunks, or individual lines within a hunk, from a changed file in a git repo without interactive prompts. Use this skill whenever you need to partially stage or unstage changes: committing only the bug fix hunk but not the refactor, taking one line out of a block of added lines, or unstaging something that was staged by mistake. Common phrases: 'commit only the X changes', 'stage that hunk', 'stage just that line', 'only the second of those lines', 'don't include the Y part', 'unstage the refactor'. Pass args as: first line = file path, remaining lines = plain-language description of which changes to (un)stage. Example args: "src/foo.ts\nstage only the import changes, leave the function rename".

block65 Updated

File contents

block65/agent-standards/tree/main/skills/stage-hunk commit 537bd27e5f

Frequently asked questions

npx skillmds@latest add block65/stage-hunk