用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/laicluse/agent-fieldkit --skill commit-snipe命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Use when corrective work, migrations, living docs, or temporary diagnostic tests leave superseded residue, or before handoff.
Use when corrective work, migrations, living docs, or temporary diagnostic tests leave superseded residue, or before handoff.
Reference for git-discipline commit bodies, trailers, hook denials, examples, and escape hatches.
正在显示 SKILL.md
| name | commit-snipe |
| description | Stage and commit only the current task's hunks when the worktree contains unrelated changes. |
Precision commits from a working tree with mixed changes. Stage only what belongs to the current task, leave the rest untouched.
git status shows changes that are NOT from the current workdigraph snipe {
"User says commit" [shape=doublecircle];
"git status" [shape=box];
"Which files belong to\nTHIS conversation?" [shape=diamond];
"Stage only those files\n(explicit paths)" [shape=box];
"git diff --cached\nverification" [shape=box];
"Commit" [shape=doublecircle];
"User says commit" -> "git status";
"git status" -> "Which files belong to\nTHIS conversation?";
"Which files belong to\nTHIS conversation?" -> "Stage only those files\n(explicit paths)";
"Stage only those files\n(explicit paths)" -> "git diff --cached\nverification";
"git diff --cached\nverification" -> "Commit";
}
git status review all changes in the working treegit add with explicit file namesgit diff --cached --stat to check that only the right files are staged/git-discipline:commit-snipe means "commit now". Do not ask for confirmation. The user has already given their intent by invoking the skill.git add . or git add -A. Always explicit paths or hunks.git add -p
to stage only the hunks that belong to the current work. It is about
the functionality, not the file.| Wrong | Correct |
|---|---|
| Stage everything because the user said "commit" | Only files from the current work |
| Ask "which files do you want to commit?" | Determine yourself from conversation context |
| Forget files you generated indirectly | Include all output: generated, compiled, derived files |
git add -A and then unstage what does not belong | git add with explicit paths |
| Bring along unmodified files "by accident" | git diff --cached --stat verifies what is actually staged |