clean-diff-guard

仓库创建 2026年7月4日最近提交 21 天前SkillHot 收录 20 天前
▸ 精选理由

适合在提交前自动缩小和审查变更范围

这个 Skill 做什么

阻止无关或大范围格式化/覆盖的 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 开发管理代码变更管控差异检查提交保护通用
1
Stars
0
Forks
8
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/mohamedzhioua/proofguard/main/skills/clean-diff-guard/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/mohamedzhioua/proofguard/main/skills/clean-diff-guard/SKILL.md"
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 
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有