agentleFS
poorvith-mppoorvith-mp/skills-developer/skills/minimal-diff/SKILL.md

minimal-diff

Skill0 starsChanged 3 months agoMITView on GitHub

Make the smallest correct change that fixes the problem, resisting every incidental refactor. Use when fixing bugs with the smallest surgical change, avoiding refactors.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Leave the smallest check that would fail: if the logic breaks — usually one test, not a suite.

    line 19
  2. Distinctive:

    NEVER weaken or skip a failing test to make a change land.

    line 36
  3. Distinctive:

    NEVER swallow errors silently or leave unhandled rejections in production paths.

    line 37
  4. Distinctive:

    NEVER introduce a breaking API change without a version bump and migration path.

    line 38

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

Minimal Diff

Make the smallest correct change, and resist everything else.

Process

  1. Find the root cause before editing. The lazy fix and the correct fix are the same fix when you know where the problem actually is — a guard in the shared function beats a guard in every caller.
  2. Grep every caller of anything you are about to change. A change that fixes the reported path and leaves three sibling paths broken is not minimal, it is incomplete.
  3. Change only what the fix requires. Reformatting, renaming and reordering in the same diff hide the actual change from review.
  4. Do not add abstraction for a single case. One implementation does not need an interface.
  5. Leave the smallest check that would fail if the logic breaks — usually one test, not a suite.
  6. Note deliberate shortcuts with the ceiling and the upgrade path, so a knowing trade-off is not mistaken later for an oversight.

Deliverables

  • Root cause statement, not a symptom description
  • The diff, with unrelated changes excluded
  • One test that fails without the fix

Verification & Quality Checklist

  • Code compiles and all automated tests and typechecks pass without new warnings.
  • Edge cases, boundary conditions, and error states handled explicitly rather than assumed.
  • No hardcoded secrets, credentials, or insecure defaults introduced.
  • Changes are covered by a test that fails without them.

Anti-Patterns & Constraints

  • NEVER weaken or skip a failing test to make a change land.
  • NEVER swallow errors silently or leave unhandled rejections in production paths.
  • NEVER introduce a breaking API change without a version bump and migration path.

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.