Skip to content
Back to skills

Diff Guard

ASecurity

Enforces minimal, surgical file edits and eliminates slop, unwarranted refactors, and context-wasting rewrites.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 21, 2026
ai-agentsrefactoringgit

Security analysis

A100/100

Scanned November 21, 2026

npx -y skills add VinayKhandia/no-slop --skill diff-guard --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Diff Guard?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Diff Guard
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vinaykhandia-diff-guard/badge)](https://www.skillsdirectory.com/skills/vinaykhandia-diff-guard)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: diff-guard
description: Enforces minimal, surgical file edits and eliminates slop, unwarranted refactors, and context-wasting rewrites.
---

# 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

1. **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.
2. **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`.
3. **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:

1. **Inspect Git Diff**:
   - Review `git diff --stat` and the exact line diffs.
2. **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.
3. **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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.