agentleFS
VinayKhandiaVinayKhandia/no-slop/skills/diff-guard/SKILL.md

diff-guard

Skill1 starsChanged 11 days agoMITView on GitHub

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

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
  1. Distinctive:

    Use targeted edit tools (e.g., replacement blocks, line-based sed/edits, or AST modifiers).

    line 14
  2. Distinctive:

    Never print or rewrite an entire 300-line file to adjust a 4-line function.

    line 15
  3. Very specific:

    Do NOT add decorative or obvious comments (e.g., // Constructor, // Returns the id).

    line 17
  4. Distinctive:

    Do NOT insert unrequested helper functions, hypothetical abstractions, or premature utility layers.

    line 18
  5. Distinctive:

    Do NOT update adjacent code formatting, variable renames, or style preferences outside the task scope.

    line 19
  6. Very specific:

    Do NOT add unsolicited dependencies or packages unless explicitly specified in TASKS.md.

    line 20
  7. Distinctive:

    Keep existing variable naming conventions, export patterns, and indentation intact.

    line 22
  8. Distinctive:

    Before signaling that an edit or chunk is ready for review:

    line 27
  9. Distinctive:

    If a 10-line logic fix resulted in a 150-line diff, identify what was rewritten unnecessarily.

    line 33

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.