lean
Skill4 starsChanged 4 months agoMITView on GitHub
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.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- varelaia/claude-skills-publictheir own version, first seen Oct 26, 2026
- FareedKhan-dev/lean-agenttheir own version, first seen Oct 13, 2026
- mattbutlerengineering/skillstheir own version, first seen Oct 11, 2026
- kapadias/nonnatheir own version, first seen Oct 1, 2026
- utk2103/Prompt-Studiotheir own version, first seen Aug 22, 2026
- ousid/leantheir own version, first seen Jul 20, 2026
Used with
Projects with it also use ship.
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.
AWSSkillship
Finalize dev work on an issue branch — update docs, push, and open a PR.
Also in 3 projects that use this
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- utk2103/Prompt-Studio★ 8same name
- ousid/lean★ 4same name
- civillizard/claude-lean-skill★ 2same name
- CrystalPlatforms/ADM-CLI★ 1same name
- FareedKhan-dev/lean-agent★ 1same name
- mattbutlerengineering/skills★ 1same name
- Co4an/claude-auto★ 0same name
- kapadias/nonna★ 0same name
- varelaia/claude-skills-public★ 0same 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.
In this repository17 other files it gives its agents.
- ai-writing-qaSkill
- build-captureSkill
- build-modeSkill
- fitfoSkill
- flow-mapSkill
- generate-system-mapSkill
- imessageSkill
- meta-promptSkill
- no-bullshitSkill
- plain-englishSkill
- pressure-testSkill
- problem-logSkill
- reality-checkSkill
- swipeSkill
- video-breakdownSkill
- viral-hook-creatorSkill
- working-with-claudeSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 10 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
10
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
- Very specific: line 10
First action on invocation: read LEARNINGS.md in this skill's folder and apply every entry.
- Distinctive: line 15
Write a numbered plan (7 steps max) before any multi-step work.
- Distinctive: line 18
If anything is ambiguous, ask BEFORE starting: one batched AskUserQuestion with multiple-choice options covering ALL open questions.
- Distinctive: line 22
Never re-read a file you just edited or already have in context.
- Distinctive: line 30
NEVER spawn a subagent on your most expensive model tier.
- Distinctive: line 31
Every subagent gets a complete plan: exact file paths, exact output format, no exploration budget.
- Distinctive: line 32
Don't delegate what one grep answers.
- Very specific: line 36
Never echo file contents or code back into chat.
- Distinctive: line 41
Run the ONE test or command that covers the change.
- Distinctive: line 47
Never let auto-compact fire mid-task.
- Distinctive: line 65
Read with no line range and no prior grep on a file over ~200 lines
- Distinctive: line 68
Write replacing a file when Edit would do
“Common” is measured: kept by at least 6 in 10 of the 8 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.
Files
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
| Excuse | Reality |
| "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
modelparam - 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.
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
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.

