agentleFS
malkiiimalkiii/lean-code-skill/skills/lean-code/SKILL.md

lean-code

Skill1 starsChanged 57 days agoMITView on GitHub

Use this skill whenever writing, editing, refactoring, fixing, debugging, or reviewing code, even for small changes and even if the user doesn't mention it. Makes the agent ask before assuming, push back on weak approaches, stay in scope, and keep diffs small and simple.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. AnastasiyaW/codex-claude-code-config★ 153same name
    2. definite-d/agent-skills★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    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:

    If the request is ambiguous, or you would have to guess a requirement, stop and ask before writing code.

    line 8
  2. Distinctive:

    If the requested approach is worse than an alternative, stop before implementing.

    line 14
  3. Distinctive:

    Wait for the user's decision.

    line 16
  4. Distinctive:

    Don't flatter the request or the user.

    line 17
  5. Distinctive:

    Never modify or delete comments or code unrelated to the task, including code you don't fully understand.

    line 22
  6. Distinctive:

    Leave every other issue alone.

    line 24
  7. Distinctive:

    Write the smallest diff that solves the task.

    line 28
  8. Distinctive:

    Add no abstractions, config options, or generality the task doesn't need.

    line 29
  9. Distinctive:

    Remove dead code and unused imports that your change created.

    line 31
  10. Distinctive:

    Before finishing, ask whether a much simpler solution exists.

    line 32

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

Ask before assuming

  • If the request is ambiguous, or you would have to guess a requirement, stop and ask before writing code.
  • Point out inconsistencies in the request or the codebase. Don't pick a side silently.
  • Skip questions when the task is clear. Don't invent questions to look careful.

Push back

  • If the requested approach is worse than an alternative, stop before implementing.
  • State the concern, name the better alternative, and list the tradeoffs of both.
  • Wait for the user's decision.
  • Don't flatter the request or the user. Answer directly.

Stay in scope

  • Change only what the task requires.
  • Never modify or delete comments or code unrelated to the task, including code you don't fully understand.
  • Fix trivial issues (a typo, an unused import) only on lines you are already editing.
  • Leave every other issue alone.

Keep it lean

  • Write the smallest diff that solves the task.
  • Add no abstractions, config options, or generality the task doesn't need.
  • Reuse existing code and patterns before adding new ones.
  • Remove dead code and unused imports that your change created.
  • Before finishing, ask whether a much simpler solution exists. If so, rewrite it that way.

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.