{"id":"20295259-32f5-462c-95c4-94b0d1c4bc90","slug":"claude-lean","kind":"skill","name":"claude-lean","summary":"Three composable Claude Code skills that make long sessions cheaper by cutting re-sent context at phase boundaries.","owner":"arshitP","repoUrl":"https://github.com/arshitP/claude-lean","license":"CC-BY-4.0","licenseTier":"permissive","trust":"community","stars":0,"match":null,"fewStars":true,"format":"skill","createdAt":"2026-07-18T06:06:51.000Z","addedAt":"2026-10-22T03:17:14.787Z","logoUrl":"https://avatars.githubusercontent.com/u/71076536?u=2a0806be54494897a3df5f3b6bfb171369302325&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["developer-tools","memory-knowledge"],"tags":[],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-23T23:29:12.255Z","sample":false,"url":"https://conduits.dev/tools/claude-lean","language":"","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# claude-lean\n\nThree composable Claude Code skills that make long sessions cheaper by attacking\nthe thing that actually costs tokens: **re-sending context every turn.**\n\n## Why\n\nMeasured across a large sample of real Claude Code sessions, **92.6% of all raw\ntokens were context re-sent from earlier turns** — actual generated output was\n1.2%. The median turn re-sent ~108K tokens of context to produce ~1.4K tokens of\nwork. Because the whole conversation is re-transmitted each turn, **session cost\ngrows with the square of session length: a 500-turn session costs ~25x a\n100-turn one for the same work.**\n\nThe fix isn't a faster model. It's structure: plan the work into phases, run\neach phase in a fresh context, and cut the accumulated context at every phase\nboundary. Full measurements: [docs/evidence.md](docs/evidence.md).\n\n## The three skills\n\n| Skill | Does | Use it |\n|---|---|---|\n| **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. |\n| **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. |\n| **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. |\n\nThey compose: `project-brief → model-picker → [cold subagent per phase] →\nphase-checkpoint → repeat`. Each also works alone.\n\n## What these skills honestly cannot do\n\nStated plainly because the skills state it too:\n\n- **They cannot clear your context** — only you can, with `/clear`.\n  `phase-checkpoint` writes the handoff and *recommends* the reset; it never\n  claims to have done it.\n- **They cannot switch your session's model** — only you can, with `/model`.\n  Per-phase model choice works by running each phase as a subagent.\n- **They cannot measure your context size** — so the reset is recommended at\n  phase boundaries, the part that's actually detectable.\n\n## How we know it works\n\nThe suite's two core rules are guarded by RED/GREEN behavioral baselines run\nagainst a real repo — an agent dispatched once without the skill (to prove the\nfailure mode is real) and once with it (to prove the skill fixes it). Without\n`project-brief`, the baseline agent burned 129K tokens and **couldn't finish**\nunderstanding a 20-file repo; with it, a disposable scanner finished for 73K\ntokens that the session never had to carry. Details: [tests/README.md](tests/README.md).\n\n## Install\n\nCopy the skill folders into your Claude Code skills directory:\n\n```bash\n# personal (all projects):\ncp -r skills/* ~/.claude/skills/\n```\n\nThen invoke by name (e.g. \"use the project-brief skill\") or with\n`/project-brief`, `/model-picker`, `/phase-checkpoint` if your setup exposes\nskills as commands.\n\n## Worked example\n\nThe suite's first live run was self-hosted: `model-picker` planned and executed\nthe completion of this very repository.\n\n| # | Phase | Model | Outcome |\n|---|---|---|---|\n| 1 | `phase-checkpoint` skill | opus | Written by a cold subagent; orchestrator grep-verified no self-reset claims |\n| 2 | Sanitized evidence doc | opus | Written in parallel; sanitization sweep passed with zero hits |\n| 3 | README | opus | Completed after a session-limit cut — resumed entirely from the handoff file |\n| — | LICENSE | inline | Recorded deviation: one-correct-content file, pasted by the orchestrator |\n\nA hard session cut mid-run lost nothing, because the state lived in the handoff\nfile, not the conversation. Full run, numbers, and recorded deviations:\n[examples/worked-example.md](examples/worked-example.md).\n\n## Related\n\nThese skills act on the same finding a companion usage-tracker project\nmeasures: the tracker checkpoints sessions at a usage *limit* (involuntary,\nlate); claude-lean checkpoints at *task boundaries* (deliberate, early) — which\nis what keeps the cost from building in the first place.\n\n## License\n\nCC BY 4.0 — Arshit Dobariya. Share and adapt with attribution. See\n[LICENSE](LICENSE).\n"}