r/claudeskills • u/Craaashh • 20h ago
Skill Share I built lean coding agent workflows because popular frameworks felt slow and token-hungry
Popular coding agent frameworks can be slow and token-hungry: huge ceremony fills the context on every request, and even a one-line fix goes through a full plan-and-review loop. Without a framework, agents tend to skip planning entirely.
Lean Coding Agent gives Claude Code and Codex a plan → test-first implementation → independent review loop that runs only when you ask for it. Each step is handled by a separate subagent in its own context. The repo has three parts:
- Workflows. Feature, bug-fix, and refactor workflows share one loop. You approve a plan, then an implementer and a reviewer iterate until the reviewer approves. Planning and code review can also run on their own.
- Subagents. Five subagents: planner, bug diagnostician, implementer, code reviewer, and explorer.
- Project conventions. The
define-conventionsskill scans your repo, asks about the rules the code doesn't show, and writes them todocs/conventions/. Agents load each file by topic only when a task needs it, instead of piling everything intoAGENTS.md.
I wanted short instructions, few new tools to learn, and no mandatory workflow for small requests.
How it works
- Small requests run directly. For a one-line fix, the agent skips the plan and the subagents.
- You start workflows by name.
/workflow-feature-development Add CSV export to the orders page(or$workflow-...in Codex). The workflow skills setdisable-model-invocation: true, so the agent can't decide on its own to run the full loop. The loop has five steps:
- A
plannersubagent writes the plan. - You approve the plan.
- An
implementersubagent works test-first, one behavior at a time. - A
code-reviewersubagent returnsAPPROVE,WARNING, orBLOCK. - On
BLOCK, the implementer gets the findings and tries again.
- A
- The loop stops after three failed fixes. If the same problem survives three attempts, the agent stops and reports back instead of retrying forever.
- Each subagent runs in its own context. A reviewer that didn't write the code can't approve its own assumptions. Plans, implementation reports, and reviews go to files under
.agents/, so a dead session can pick up where it left off.
Model defaults
Strong models plan and review at low reasoning effort. Cheap models execute at high effort. In Claude Code, planner and code-reviewer use opus, and implementer, bug-diagnostician, and explorer use haiku. By the time the implementer runs, you've approved the plan, the tests define "done", and a stronger model checks the result. You can change any model during setup.
Instructions stay short
- The always-loaded baseline stays under 800 words.
- Each workflow stays under 450 words.
- Each subagent prompt is at most 135 lines.
Install
npx skills@latest add aloilor/lean-coding-agentThen run /setup-lean-coding-agent inside your project. Setup writes only project config, so git diff shows every change.
Warning: setup replaces AGENTS.md and CLAUDE.md on every run. Before you run it, move shared rules to docs/conventions/ and private notes to AGENTS.override.md.
Links
- GitHub: https://github.com/aloilor/lean-coding-agent. The repo is MIT-licensed and uses skills from Matt Pocock, Anthropic, and GitHub's awesome-copilot.
- Blog write-up: https://aloilor.github.io/lean-coding-agent/. It explains the reasoning behind each choice: the stop rule, the separate contexts, the model split, and the word budgets.
Any feedback is really appreciated. I'm most interested in these points:
- Whether the cheap implementer holds up on your codebase.
- What you had to add to
docs/conventions/that the scan missed.
Comments here or issues on GitHub both work.
1
u/SkeSh4ever 11h ago
Testing is outdated anyway