clean-diff-guard
适合在提交前自动缩小和审查变更范围
阻止无关或大范围格式化/覆盖的 diff,保持提交精简。
保证提交的 diff 精简且有针对性,阻止无关文件改动、整仓格式化、残留调试代码或把别人的未提交工作覆盖掉。在要提交、构建变更或代码代理刚改完文件时用,它会在展示或提交前把噪音和越界改动挡下来。核心是把“干净的 diff”变成可检验的规则(范围、大小、噪声),不靠风格判断。
▸ 展开 SKILL.md 英文原文
Keeps a diff surgical and scoped — blocks unrelated file edits, whole-file/whole-repo formatter sweeps, over-engineered abstractions for a small ask, leftover debug/dead code, and overwriting the user's uncommitted work. Best used reactively before presenting or committing a code change, when files were edited, generated, moved, deleted, or reformatted. Use when the user says "make the change", "fix this", "refactor", "commit", or after a coding agent edits files. DO NOT USE for test-code quality (out of proofguard's scope; a test-quality-guard is in `deferred/`, not yet shipped), doc sync (docs-drift-guard), or the final done-claim (evidence-before-done); this guard keeps the DIFF surgical and scoped.
帮我安装这个 skill:https://raw.githubusercontent.com/mohamedzhioua/proofguard/main/skills/clean-diff-guard/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/mohamedzhioua/proofguard/main/skills/clean-diff-guard/SKILL.md"# clean-diff-guard A generic "write clean code" review skill has been shown NOT to change agent behavior in kill-tests — it's too vague to act on. This guard replaces that with mechanically checkable imperatives about diff SCOPE, SIZE, and NOISE, not style taste. It exists because of a well-documented 2026 failure pattern: agents turning a 30-line task into 300 lines, touching files the task never mentioned, or sweeping a whole file/repo through a formatter because the diff was already open. ## When to use — three modes - **Guard-pass (default).** Right before presenting a diff or running `git add`/`git commit`: compute the task's actual file scope, diff it against the files actually