mcmadsen

Lean Agent — Development skill for Claude Code

Development community

Token-frugal orchestration for Claude Code: a front-desk session that hands work to cheap worker agents, one Remote Control session per thread, budgets, reviews and shared memory.

How to install Lean Agent

This entry records only its repository, not the path inside it, so there is no exact command to give. Open mcmadsen/lean-agent and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Lean Agent does

Token-frugal orchestration for Claude Code: a front-desk session that hands work to cheap worker agents, one Remote Control session per thread, budgets, reviews and shared memory.

Alternatives in Development

  • Dao Code — Open-source TypeScript terminal coding agent for DeepSeek-V4 — builds on DeepSeek's strong price-performance a 1.3k ★
  • Printed Shirt Front — From a supplied print to a garment concept 215 ★
  • Dev Run — /dev-run — Orchestrateur dev (arch+db → back → API gate → front) pour 1 FEAT 193 ★

README

lean-agent

**An orchestrator for Claude Code that runs worker agents on as few tokens as possible.**

You talk to one lean-agent orchestrator, from your phone through Remote Control, the Claude Desktop app, or a terminal. It never does project work itself. For each piece of work it decides:

  • which context the worker needs, chosen from a library learned from your project's CLAUDE.md, rules and skills
  • which model (Sonnet by default, Haiku for cheap read-only work, Opus only when it's worth it)
  • which tools and limits (read-only or not, max turns, max $)

Then it starts an isolated worker. Workers report back which context they used and what was missing, and the library tunes itself: cards that are always used become *core*, unused ones are archived, and recurring gaps become new cards.

 you ──▶ orchestrator  (~/.lean-agent/home, Sonnet, short playbook CLAUDE.md, session budget)
            │  lean-agent suggest / run / stats / optimize
            ├──▶ worker  sonnet  cards: testing, code-style      tools: all      ─┐
            ├──▶ worker  haiku   cards: (none)       --read-only tools: R/Glob/Grep├─▶ ledger + card stats
            └──▶ worker  sonnet  --resume                                    ─┘
                     cwd ~/.lean-agent/work/,  --add-dir 

Why workers are cheap

A normal Claude Code session in your project loads the project's `CLAUDE.md`, every skill (project, user, plugins), your plugins' hooks, MCP servers and dozens of tool schemas, and resends all of it on every turn. lean-agent workers run with:

claude -p --safe-mode --disable-slash-commands --tools Bash,Read,Edit,Write,Glob,Grep \
          --add-dir  --append-system-prompt-file  \
          --model  --max-turns N --max-budget-usd X

from a scratch folder, not your project, so nothing project-level auto-loads. Measured on Claude Code 2.1.301:

| Same one-line prompt | Context per tur