agentleFS
LetermeFlorentLetermeFlorent/claude-skills/least-code/SKILL.md

least-code

Skill0 starsChanged 17 days agoMITView on GitHub

Use when writing, fixing, refactoring or reviewing code, choosing a dependency, planning a task or deciding how far to search before acting, when a change grows wrappers, options or config nobody asked for, when a search keeps reading after the answer is found, or when the user says "simplest", "yagni", "lazy", "over-engineered" or complains about bloat or overthinking.

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:

    Read task and code it touches.

    line 14
  2. Distinctive:

    Not needed? Skip it, name it in one line.

    line 22
  3. Distinctive:

    Every caller, test and fixture change breaks gets fixed in same change.

    line 33
  4. Distinctive:

    No abstraction, wrapper, option, config, type conversion or "for later" code nobody asked for.

    line 34

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Doing the least that fully works

Best code is code never written; best search stops once answer is in hand. Smallest complete change, to code and to work around it: reading, thinking, tool calls, words. Lazy about solution, never about the change: every part task needs gets done. Hooks load this skill into every session and every subagent.

Before writing

Read task and code it touches. List every place change must reach: callers, tests, fixtures, config, exports, docs naming it. That is scope; extras are not. Check what change could break for users: data lost or exposed, callers that stop working.

Ladder

First rung that fully works wins.

  1. Not needed? Skip it, name it in one line. Vague request ("build me X"): smallest version doing core job.
  2. Already in codebase (helper, component, service, pattern)? Use it as surrounding code does.
  3. Standard library or platform feature? Use it, unless project has its own.
  4. Installed dependency? Use it. Never a new dependency for a few lines.
  5. One line a reader gets at a glance? One line.
  6. Else minimum code that works.

Code

These hold for every change, whatever its size.

  • Every caller, test and fixture change breaks gets fixed in same change.
  • No abstraction, wrapper, option, config, type conversion or "for later" code nobody asked for. Values stay in form platform gives. Structure, layers and conventions stay. Deleting beats adding.
  • Bug: grep every caller of touched function first, fix root cause once in shared code.
  • Moved or merged code keeps its validation and error handling.
  • Two options of equal size: take one right on edge cases.
  • New non-trivial logic (branch, loop, parser, money, security, a new script) leaves one small test.
  • Shortcut with known limit: named in reply or report with when to upgrade, never as code comment.

Never cut

Validation at trust boundaries, error handling preventing data loss, security, accessibility, calibration real hardware needs, anything user asked for, task's own test and proof.

Thinking and work

Same rule for effort spent around code.

  • One targeted search beats broad read: grep, then read lines found. Stop once answer is in hand. File already read this session: not read again.
  • First plan that fully works. Choice between options: one recommendation, no survey of paths not taken.
  • Narrowest check proving change: test touching it, not whole suite, unless change touches build or test setup.
  • Question code, repo or sensible default answers = work, not question.
  • Part of request need does not justify: say so before building it.

Closing line

Something skipped or unchecked that carries risk: one last line saying it. Nothing: no line.

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.