agentleFS
markoblogomarkoblogo/abvx-agent-skills/skills/minimal-diff-builder/SKILL.md

minimal-diff-builder

Skill16 starsChanged 5 months agoMITView on GitHub

Build the smallest correct code diff without overengineering, broad refactors, unnecessary dependencies, or speculative abstractions. Use when the user wants a minimal patch, small reviewable diff, stdlib-first implementation, or shortest-path fix that still preserves security, accessibility, trust-boundary validation, and data safety.

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 15 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default to the smallest correct change, not the most expandable design.

    line 13
  2. Very specific:

    Use delivery-preflight-gate first when the task is long, autonomous, or the repo baseline may already be broken.

    line 24
  3. Very specific:

    Use test-driven-execution alongside this skill when the main risk is behavior drift rather than overbuilding.

    line 25
  4. Very specific:

    Use overengineering-review after implementation when the user wants a separate simplification pass on the resulting diff.

    line 26
  5. Distinctive:

    Stop at the first rung that fully solves the task:

    line 30
  6. Distinctive:

    Only then write new custom code, still at the smallest useful scope.

    line 37
  7. Distinctive:

    Prefer deletion, inlining, and reuse over new layers.

    line 41
  8. Distinctive:

    Do not add a dependency for a small utility problem unless the user explicitly wants it.

    line 42
  9. Distinctive:

    Do not introduce interfaces, factories, configs, or extension points without a real second use.

    line 43
  10. Distinctive:

    Prefer one-file or one-surface changes when they remain readable.

    line 44
  11. Distinctive:

    If two options are similarly small, pick the more edge-case-correct one.

    line 46
  12. Distinctive:

    Do not simplify away:

    line 50
  13. Distinctive:

    Check the ladder from top to bottom before writing code.

    line 61
  14. Distinctive:

    Keep the diff local:

    line 63
  15. Distinctive:

    avoid broad renames or structural churn.

    line 64
  16. Distinctive:

    avoid adding files unless they clearly improve correctness or verification.

    line 65
  17. Distinctive:

    If you intentionally leave out a heavier design, say what was skipped and the threshold that would justify adding it later.

    line 67
  18. Distinctive:

    Run the narrowest meaningful verification first, then broader relevant checks.

    line 71

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

Default to the smallest correct change, not the most expandable design.

Use When

  • the user asks for the simplest implementation, shortest path, or least code;
  • the task is local and well scoped;
  • dependency avoidance matters;
  • the repo already risks overbuilding or abstraction creep.

Pair With

  • Use delivery-preflight-gate first when the task is long, autonomous, or the repo baseline may already be broken.
  • Use test-driven-execution alongside this skill when the main risk is behavior drift rather than overbuilding.
  • Use overengineering-review after implementation when the user wants a separate simplification pass on the resulting diff.

Ladder

Stop at the first rung that fully solves the task:

  1. Does this need to exist at all, or can the requirement be narrowed?
  2. Does the standard library already solve it?
  3. Does the native platform already solve it?
  4. Does an existing repo dependency already solve it?
  5. Can the solution stay as a tiny local change?
  6. Only then write new custom code, still at the smallest useful scope.

Core Rules

  • Prefer deletion, inlining, and reuse over new layers.
  • Do not add a dependency for a small utility problem unless the user explicitly wants it.
  • Do not introduce interfaces, factories, configs, or extension points without a real second use.
  • Prefer one-file or one-surface changes when they remain readable.
  • Preserve existing repo patterns when they are already simple enough.
  • If two options are similarly small, pick the more edge-case-correct one.

Hard Exceptions

Do not simplify away:

  • trust-boundary validation;
  • error handling that prevents data loss;
  • security-sensitive checks or secret handling;
  • accessibility basics on user-facing surfaces;
  • anything the user explicitly asked to retain.

Workflow

  1. Restate the narrow task in one sentence.
  2. Check the ladder from top to bottom before writing code.
  3. Choose the smallest implementation that fully meets the task.
  4. Keep the diff local:
    • avoid broad renames or structural churn;
    • avoid adding files unless they clearly improve correctness or verification;
    • avoid speculative "future-proofing".
  5. If you intentionally leave out a heavier design, say what was skipped and the threshold that would justify adding it later.
  6. For non-trivial logic, leave behind one small runnable check:
    • one focused test, or
    • one assert-based demo/self-check if that fits the repo better.
  7. Run the narrowest meaningful verification first, then broader relevant checks.

Anti-Patterns

  • building a reusable framework for a one-off task;
  • adding configuration for a value that does not vary;
  • wrapping stdlib or platform behavior in a thin custom abstraction;
  • adding a new helper file when a local function would do;
  • inflating the explanation after keeping the code small.

Final Report

Include:

  • what path on the ladder was used;
  • what heavier options were intentionally skipped;
  • verification run;
  • residual threshold for when a bigger design would become justified.

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.