agentleFS
binay-pybinay-py/claude-skills/skills/lean/SKILL.md

lean

Skill2 starsChanged 15 days agoMITView on GitHub

Token-lean mode. Use when the user says lean, save tokens, cheap mode, low token, hitting limits, or asks to get max result for min tokens. Also audits setup overhead.

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ship, tdd and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 3 projects that use this

  • GoogleSkill

    tdd

    Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

    Also in 3 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never re-read a file you already read or just edited.

    line 12
  2. Very specific:

    Use output_mode: "files_with_matches" or head_limit on Grep before asking for content.

    line 13
  3. Distinctive:

    Don't open lockfiles, build output, minified, generated or vendored files.

    line 14
  4. Very specific:

    Never dump logs, JSON blobs or ls -R.

    line 18
  5. Distinctive:

    Don't spawn agents for things doable in 1–3 tool calls.

    line 23
  6. Distinctive:

    No narration between tool calls.

    line 27
  7. Distinctive:

    If the task is ambiguous in a way that would waste a lot of work, ask one short question instead of guessing.

    line 33
  8. Distinctive:

    When asked to check the setup, or the user keeps hitting limits, run:

    line 41

“Common” is measured: kept by at least 6 in 10 of the 10 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

Lean mode

Goal: same quality result, fewest tokens. Context is re-sent every turn, so every byte you pull in is paid for again and again. Follow these rules for the rest of the session.

Reading

  • Grep/Glob first, then Read only the file you need, with offset/limit around the hit. Never Read a whole large file to find one function.
  • Never re-read a file you already read or just edited. Edit fails loudly if it didn't apply.
  • Use output_mode: "files_with_matches" or head_limit on Grep before asking for content.
  • Don't open lockfiles, build output, minified, generated or vendored files.

Commands

  • Cap output: | tail -n 40, | head -n 40, grep -m 20, --quiet, -q, --silent. Tests: show failures only (pytest -q --tb=short, npm test 2>&1 | tail -n 40).
  • Never dump logs, JSON blobs or ls -R. Filter with grep/jq/python first, print only what matters.
  • Chain related shell steps into one call; run independent tool calls in parallel in one message.

Delegation

  • Broad search over many files: one Explore agent with model: "haiku", ask for a conclusion of under 150 words. Don't also search yourself.
  • Don't spawn agents for things doable in 1–3 tool calls. Never fan out multiple agents unless the work is truly parallel.

Writing

  • Edit with small, exact old_string hunks. Never rewrite a whole file to change a few lines.
  • No narration between tool calls. No restating the plan or the user's request.
  • Final answer: result first, short. Bullets over paragraphs. Show code only when it's new for the user. No summary of what you just did unless asked.

Thinking

  • Act as soon as there's enough info. Don't re-derive facts already in the conversation.
  • Pick one approach and go; don't survey options.
  • If the task is ambiguous in a way that would waste a lot of work, ask one short question instead of guessing.

Tell the user (once, briefly) when it helps

  • Switching to unrelated work → /clear (free) beats /compact (costs a full read).
  • Simple task on Opus → /model sonnet or /effort low.
  • Session idle a long time → cache is cold; a fresh /clear + short brief is cheaper than continuing.

Setup audit

When asked to check the setup, or the user keeps hitting limits, run:

python scripts/lean_check.py [project_dir]

(Run from this skill's folder; needs Python 3.8+, no packages.) It prints the fixed per-session overhead (model, CLAUDE.md, MEMORY.md, MCP servers, plugins, skill descriptions, prompt hooks) with fixes. Show the user its output and offer to apply the fixes. Never edit settings without approval. For a deep log analysis, use the claude-token-audit skill if installed.

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.