commit-snipe

Stage and commit only the current task's hunks from a mixed working tree.

4|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/laicluse/agent-fieldkit --skill commit-snipe-laicluse
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: commit-snipe
Source: https://github.com/laicluse/agent-fieldkit/tree/main/.agents/plugins/generated/git-discipline/skills/commit-snipe
Command: npx skills add https://github.com/laicluse/agent-fieldkit --skill commit-snipe-laicluse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a working tree contains changes from multiple unrelated tasks, a blanket commit mixes unrelated work into one commit. This Skill stages only the files and hunks belonging to the current task, leaving everything else untouched. ## Core Features & Use Cases - Selective staging: Uses explicit file paths or git add -p to stage only the hunks that belong to the current work, never git add . or git add -A. - Staged-diff verification: Runs git diff --cached --stat before committing to confirm exactly what will be committed. - Logical commit splitting: Splits independent units of work into separate commits, including pre-existing uncommitted changes when the user asks to clean up. - Use Case: You fixed a bug and updated docs in the same session, but the tree also contains a teammate's half-finished refactor. Invoke the skill and only your bug fix lands in a clean, scoped commit. ## Quick Start Ask the agent to commit only the changes from the current task while leaving unrelated working-tree changes unstaged.

Frequently Asked Questions about commit-snipe

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

FAQPage Schema
How do I commit only some changes in a dirty git working tree?▼

Stage only the files belonging to the current task using explicit paths with git add, or use git add -p to stage individual hunks. Verify with git diff --cached --stat before committing so unrelated changes stay unstaged.

How to stage specific hunks instead of whole files in git?▼

Use git add -p to interactively select individual hunks within a file. This lets you commit two lines out of forty changed lines when only part of the file belongs to the current work.

Why should I avoid git add -A when committing task work?▼

git add -A stages every modification in the tree, including unrelated or unfinished changes from other tasks. Explicit paths keep commits scoped to one logical unit and prevent accidental inclusion of foreign work.

Can one session's work be split into multiple commits?▼

Yes. When the current work contains logically independent steps, each step is staged and committed separately. Pre-existing uncommitted changes can also be grouped into logical commits when the user asks to clean up the tree.

What happens to generated files during a selective commit?▼

Generated and derived files, such as PNGs produced from an edited SVG, are counted as part of the current work and staged alongside their sources so the commit stays complete and reproducible.