agentleFS
5uck1ess5uck1ess/devkit/skills/yagni/SKILL.md

yagni

Skill4 starsChanged 4 months agoMITView on GitHub

You Aren't Gonna Need It — build only what's needed now, no speculative features or premature abstractions.

7 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

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

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 3

    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:

    Every line of speculative code has a cost: it must be understood, tested, maintained, and debugged.

    line 12
  2. Distinctive:

    Before building something, ask:

    line 38
  3. Distinctive:

    Do I need this to ship the current feature?: If no, don't build it.

    line 40

“Common” is measured: kept by at least 6 in 10 of the 7 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 (You Aren't Gonna Need It)

The Principle

Build the thing you need today. Not the thing you might need tomorrow.

Every line of speculative code has a cost: it must be understood, tested, maintained, and debugged. Code you don't write has zero bugs.

Common Violations

"Just in case" abstractions

"Let's make this a plugin system in case we need to swap implementations."

You don't have a second implementation. Build for the one you have. Refactoring later is almost always cheaper than maintaining an abstraction you don't need yet.

Premature configurability

"Let's make the retry count configurable."

Hardcode it. If someone actually needs to change it, you'll make it configurable then — in 5 minutes. Until then, a config option is a decision you're forcing on every deployer.

Speculative generalization

"This handles orders, but let's make it handle any entity."

You have orders. Build for orders. When you get a second entity type, you'll understand the actual commonalities (not the ones you imagined).

Premature optimization

"Let's add caching in case this is slow."

Measure first. Most performance intuitions are wrong. Optimize when you have evidence, not anxiety.

How to Apply

Before building something, ask:

  1. Do I need this to ship the current feature? If no, don't build it.
  2. Am I solving a real problem or an imagined one? Real problems have evidence.
  3. What's the cost of adding this later vs now? Usually negligible. The code will be better because you'll understand the actual requirements.

YAGNI Is Not "Never Refactor"

YAGNI says don't build features you don't need. It does not say write sloppy code. Clean code, good names, small functions, and tests are always needed — they serve today's requirements.

The goal: code that does exactly what's needed, no more, no less, and is easy to change when actual new requirements arrive.

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.