agentsclimarketplace

Lean

Skill nataliacorrea03/claude-code-skills/skills/lean

Use when the user invokes /lean, says "save tokens", "token efficient", "don't drain my tokens", "watch the budget", "cheap mode", or at the start of any large multi-step task where token cost matters. Also use when about to do bulk reads, spawn subagents, or process large files/MCP data and cost discipline is needed.From its SKILL.md

Install
npx -y skills add nataliacorrea03/claude-code-skills --skill lean

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.1 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

Lean Mode

Core principle: quality stays, waste goes. Token efficiency means eliminating redundant work, never cutting corners. A wrong guess, a skipped verification, or a sloppy edit costs more tokens to fix than it saved.

First action on invocation: read LEARNINGS.md in this skill's folder and apply every entry. It is short by design.

The Protocol (execute in this order)

1. Plan first

Write a numbered plan (7 steps max) before any multi-step work. Execute chronologically. Re-plan only when blocked, not when curious.

2. Ask, never guess

If anything is ambiguous, ask BEFORE starting: one batched AskUserQuestion with multiple-choice options covering ALL open questions. One round trip. A wrong assumption doubles the job.

3. Intake discipline (input tokens)

  • Grep/glob before Read. Read line ranges, never whole large files.
  • Never re-read a file you just edited or already have in context.
  • Big command output: pipe through head/tail/grep/jq, or redirect to a scratch file and grep that.
  • MCP pulls (Notion, Gmail, Drive, project trackers): fetch the specific page/thread/record. Never dump whole databases or unfiltered search results.
  • ToolSearch: load every tool you'll need in ONE call.
  • Browser work: prefer text extraction over screenshots. Images cost far more tokens than text.
  • Notes and memory files are leads: use them to skip broad discovery, then verify only the specific fact live.

4. Delegation policy

  • NEVER spawn a subagent on your most expensive model tier. Set an explicit cheaper model on every Agent call: a mid-tier model by default, the cheapest tier for mechanical work (bulk reads, copy transforms, scraping, formatting).
  • Every subagent gets a complete plan: exact file paths, exact output format, no exploration budget.
  • Don't delegate what one grep answers. Do delegate bulk surface work so the expensive main model stays the orchestrator.

5. Output discipline (output tokens cost ~5x input)

  • Edit with diffs. Never rewrite a whole file for a partial change.
  • Never echo file contents or code back into chat. Reference paths as file:line.
  • Final summary: 5 sentences or fewer unless the task genuinely needs more. No restating the plan or the diff.
  • Build only what was asked. No speculative extras, no unrequested refactors.

6. Verify proportionally

Run the ONE test or command that covers the change. Never claim "done" without proof (quality floor), never run full suites or builds "just to be safe" (waste ceiling).

7. Session hygiene

Long contexts re-bill everything on every message (softened by prompt caching, but never free). Concrete triggers, checked at task boundaries only (never mid-task):

  • Past roughly 45% of the context window (tunable: check LEARNINGS.md for the current number), or any low-context system warning appears: suggest writing a handoff note + starting a fresh session before the next task.
  • Topic switch to unrelated work: suggest a fresh session regardless of context size.
  • Never let auto-compact fire mid-task; it burns tokens summarizing and loses detail you didn't choose to lose.

Self-improvement loop

When the user corrects a token-wasting behavior, or you catch yourself violating this protocol: append ONE line to LEARNINGS.md (YYYY-MM-DD | pattern | rule). Cap the file at 20 entries; when it exceeds that, consolidate duplicates into the strongest single rule. This is how the skill gets smarter without getting heavier.

Rationalizations vs reality

ExcuseReality
"Reading the whole file gives better context"Grep found the section. Read those lines.
"A quick default-model subagent is fine here"Hard rule. Cheaper model with a plan, always.
"Guessing saves a round trip"Wrong guess = full redo. Ask once, batched.
"Full suite is safer"The scoped test covers the change. Suites are for CI.
"A longer summary is more helpful"Unread text is pure cost. Five sentences.
"They'd probably want this extra piece too"Unrequested work is waste. Ask or skip.
"I'll re-check the file to be sure my edit landed"Edit errors on failure. It landed.

Red flags — STOP before the tool call

  • Read with no line range and no prior grep on a file over ~200 lines
  • Agent call with no model param
  • A second AskUserQuestion in the same task (you failed to batch)
  • Write replacing a file when Edit would do
  • Fetching data the conversation already contains
  • Screenshot when page text would answer the question

Measuring your savings

scan-sessions.sh (in this folder) scores your past Claude Code sessions from the local transcripts: weighted token units per session and per message. Run it before adopting lean to capture a baseline, then again after a couple of weeks and compare. See README.md.

What ships with it: 3 files

3.4 KB alongside SKILL.md, 1 of them executable

Gives 0 of the 12 instructions most operations skills give in ~1.1k tokens

Counted across 483 of the 484 authors here whose files we hold, read 2026-08-07

  • Collect monitoring data throughout the simulationin 14 of 483, across 6 files
  • Set the random seed for reproducibilityin 14 of 483, across 6 files
  • Validate simulations against analytical solutionsin 12 of 483, across 4 files
  • Clarify goals, constraints, and inputsin 11 of 483, across 2 files
  • Implement contract tests for integration pointsin 11 of 483, across 2 files
  • Implement strangler fig infrastructure with API gatewayin 11 of 483, across 2 files
  • Audit modernized components for security vulnerabilitiesin 11 of 483, across 2 files
  • Avoid Python blocking calls in processesin 10 of 483, across 3 files
  • Use resource context managers for automatic cleanupin 9 of 483, across 2 files
  • Maintain consistent time unitsin 9 of 483, across 2 files
  • Validate outcomes against success criteriain 8 of 483, across 1 file
  • Analyze the legacy codebase for technical debtin 8 of 483, across 1 file

Said here and by no other author read

  • read the learnings file before starting
  • write a numbered plan before multi-step work
  • read specific line ranges never whole large files
  • pipe large command outputs through filters
  • fetch specific records never whole databases
  • load all needed tools in one call

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.