skill
claude-lean
Three composable Claude Code skills that make long sessions cheaper by cutting re-sent context at phase boundaries.
Set up
Skills are installed by placing their folder where your agent loads skills.
The download comes from github.com/arshitP/claude-lean itself, not from our server, so what you get is exactly what its author published.
Install instructions come from the README
README
synced Oct 23, 2026claude-lean
Three composable Claude Code skills that make long sessions cheaper by attacking the thing that actually costs tokens: re-sending context every turn.
Why
Measured across a large sample of real Claude Code sessions, 92.6% of all raw tokens were context re-sent from earlier turns — actual generated output was 1.2%. The median turn re-sent ~108K tokens of context to produce ~1.4K tokens of work. Because the whole conversation is re-transmitted each turn, session cost grows with the square of session length: a 500-turn session costs ~25x a 100-turn one for the same work.
The fix isn't a faster model. It's structure: plan the work into phases, run each phase in a fresh context, and cut the accumulated context at every phase boundary. Full measurements: docs/evidence.md.
The three skills
| Skill | Does | Use it |
|---|---|---|
| project-brief | A cheap subagent reads a repo and returns a one-page, file-path-cited brief; the main session never loads the codebase. | Before planning, or standalone to understand a repo cheaply. |
| model-picker | Splits a project into phases, routes each to the cheapest capable model (via subagents), surfaces missing skills without installing them, and checkpoints between phases. | To plan + build a project with per-phase model choice. |
| phase-checkpoint | At each phase boundary, writes HANDOFF.md (+ a rolling PROJECT_MEMORY.md) and recommends a fresh session. | Between phases, or whenever a session is getting long. |
They compose: project-brief → model-picker → [cold subagent per phase] → phase-checkpoint → repeat. Each also works alone.
What these skills honestly cannot do
Stated plainly because the skills state it too:
- They cannot clear your context — only you can, with
/clear.phase-checkpointwrites the handoff and recommends the reset; it never claims to have done it. - They cannot switch your session's model — only you can, with
/model. Per-phase model choice works by running each phase as a subagent. - They cannot measure your context size — so the reset is recommended at phase boundaries, the part that's actually detectable.
How we know it works
The suite's two core rules are guarded by RED/GREEN behavioral baselines run
against a real repo — an agent dispatched once without the skill (to prove the
failure mode is real) and once with it (to prove the skill fixes it). Without
project-brief, the baseline agent burned 129K tokens and couldn't finish
understanding a 20-file repo; with it, a disposable scanner finished for 73K
tokens that the session never had to carry. Details: tests/README.md.
Install
Copy the skill folders into your Claude Code skills directory:
# personal (all projects):
cp -r skills/* ~/.claude/skills/
Then invoke by name (e.g. "use the project-brief skill") or with
/project-brief, /model-picker, /phase-checkpoint if your setup exposes
skills as commands.
Worked example
The suite's first live run was self-hosted: model-picker planned and executed
the completion of this very repository.
| # | Phase | Model | Outcome |
|---|---|---|---|
| 1 | phase-checkpoint skill | opus | Written by a cold subagent; orchestrator grep-verified no self-reset claims |
| 2 | Sanitized evidence doc | opus | Written in parallel; sanitization sweep passed with zero hits |
| 3 | README | opus | Completed after a session-limit cut — resumed entirely from the handoff file |
| — | LICENSE | inline | Recorded deviation: one-correct-content file, pasted by the orchestrator |
A hard session cut mid-run lost nothing, because the state lived in the handoff file, not the conversation. Full run, numbers, and recorded deviations: examples/worked-example.md.
Related
These skills act on the same finding a companion usage-tracker project measures: the tracker checkpoints sessions at a usage limit (involuntary, late); claude-lean checkpoints at task boundaries (deliberate, early) — which is what keeps the cost from building in the first place.
License
CC BY 4.0 — Arshit Dobariya. Share and adapt with attribution. See LICENSE.