agentleFS
spizganedspizganed/skills/yagni/SKILL.md

yagni

Skill0 starsChanged 21 days agoMITView on GitHub

Build only what the task needs. Use on any coding task: writing, fixing, refactoring, reviewing, or choosing a library.

6 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

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

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 8

    Distinctive

    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:

    Read the task and the code it touches.

    line 11
  2. Distinctive:

    Check if the thing exists already in this codebase.

    line 12
  3. Distinctive:

    Check the standard library, the platform, and the dependencies already installed.

    line 13
  4. Distinctive:

    Write the smallest change that works.

    line 17
  5. Distinctive:

    Do not add error handling for a case that cannot happen.

    line 18
  6. Distinctive:

    Do not refactor code the task does not touch.

    line 19
  7. Distinctive:

    Keep a test or an assertion for logic that can break: a branch, a loop, a parser, a security path.

    line 20
  8. Distinctive:

    If the user asks for the larger version, build it.

    line 25

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “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

YAGNI

Build only what the task needs now. Do not build for a need that is only possible.

Before you write code

  1. Read the task and the code it touches. Trace the real flow.
  2. Check if the thing exists already in this codebase. Reuse it.
  3. Check the standard library, the platform, and the dependencies already installed. Add a new dependency only when a few lines cannot do the job.
  4. Fix the cause, not the symptom. Find every caller of the function you change.

While you write

  • Write the smallest change that works. Do not add an abstraction, option, flag, or config for one use.
  • Do not add error handling for a case that cannot happen. Keep validation at trust boundaries.
  • Do not refactor code the task does not touch.
  • Keep a test or an assertion for logic that can break: a branch, a loop, a parser, a security path.

When you are unsure

  • Pick the simple default and say what you chose. Do not ask a question you can settle.
  • Name what you left out and when it becomes worth adding. One line.
  • If the user asks for the larger version, build it. Do not argue.

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.