diff-guard
Skill1 starsChanged 11 days agoMITView on GitHub
Enforces minimal, surgical file edits and eliminates slop, unwarranted refactors, and context-wasting rewrites.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rules/AGENTS.mdAGENTS.md
- adapters/claude.mdCLAUDE.md
- asset-intakeSkill
- client-collabSkill
- design-tasteSkill
- motion-craftSkill
- no-slop-startSkill
- orchestratorSkill
- plannerSkill
- prompt-optimizerSkill
- reference-teardownSkill
- reviewerSkill
- scene-3dSkill
- storyboardSkill
- teach-modeSkill
- visual-qaSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Use targeted edit tools (e.g., replacement blocks, line-based sed/edits, or AST modifiers).
- Distinctive: line 15
Never print or rewrite an entire 300-line file to adjust a 4-line function.
- Very specific: line 17
Do NOT add decorative or obvious comments (e.g., // Constructor, // Returns the id).
- Distinctive: line 18
Do NOT insert unrequested helper functions, hypothetical abstractions, or premature utility layers.
- Distinctive: line 19
Do NOT update adjacent code formatting, variable renames, or style preferences outside the task scope.
- Very specific: line 20
Do NOT add unsolicited dependencies or packages unless explicitly specified in TASKS.md.
- Distinctive: line 22
Keep existing variable naming conventions, export patterns, and indentation intact.
- Distinctive: line 27
Before signaling that an edit or chunk is ready for review:
- Distinctive: line 33
If a 10-line logic fix resulted in a 150-line diff, identify what was rewritten unnecessarily.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Diff Guard
Protect the repository from code bloat, unsolicited refactoring, and excessive diff churn. Diff Guard must be respected on every single code modification.
Invariant Rules
- Surgical Edits Only:
- Change strictly the lines directly related to the active task chunk.
- Use targeted edit tools (e.g., replacement blocks, line-based sed/edits, or AST modifiers).
- Never print or rewrite an entire 300-line file to adjust a 4-line function.
- Zero Slop:
- Do NOT add decorative or obvious comments (e.g.,
// Constructor,// Returns the id). - Do NOT insert unrequested helper functions, hypothetical abstractions, or premature utility layers.
- Do NOT update adjacent code formatting, variable renames, or style preferences outside the task scope.
- Do NOT add unsolicited dependencies or packages unless explicitly specified in
TASKS.md.
- Do NOT add decorative or obvious comments (e.g.,
- Preserve Existing Structure:
- Keep existing variable naming conventions, export patterns, and indentation intact.
- Preserve existing comments, licenses, and docstrings untouched.
Pre-Completion Verification Check
Before signaling that an edit or chunk is ready for review:
- Inspect Git Diff:
- Review
git diff --statand the exact line diffs.
- Review
- Diff Size vs. Task Size Evaluation:
- Compare the diff footprint against the single task objective in
TASKS.md. - If a 10-line logic fix resulted in a 150-line diff, identify what was rewritten unnecessarily.
- Compare the diff footprint against the single task objective in
- Surgical Reversion:
- Immediately revert any changes that do not directly contribute to fulfilling the task chunk.
- Strip out extraneous files, debug logging statements, or test scaffolding created solely for ad-hoc manual verification.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

