LIOR PESOAGet in touch
SkillBy Lior

Delegate

Delegate (delegate) is a Claude Code skill that turns the main agent into an architect and reviewer: it plans, writes the hard logic and reviews every diff, while subagents on cheaper models write the code from self-contained specs.

Lior PesoaUpdated · v0.1.0 · Works with Claude Code
npx skills add lior-pesoa/skills --skill delegate

View on GitHub ↗Raw for agents: /library/delegate.md

What it does

  • Splits a feature into packages that can each be built and reviewed on their own, and gives each one a model: Opus for code where taste matters, Sonnet for boilerplate, tests and mechanical edits.
  • Writes the hard logic itself, or puts a reference implementation in the spec, so no subagent is asked to "handle the race condition appropriately".
  • Gives every subagent a self-contained spec: files to touch and not touch, interfaces, invariants, edge cases listed one by one, and the exact command to verify.
  • Reviews the real diff against the spec, never the subagent's summary, and sends fixes back to the same subagent, at most twice.
  • Keeps coupled changes, debugging and iterative UI work with the main agent, because every handoff loses context and adds time.

When to use it

Use it for features that split along clean interfaces: a new module, a standalone script, a batch of tests or migrations. I use it for most feature work in my apps. Skip it for bug hunts and for changes that hang on reasoning the main agent just did.

How it works

  1. 01Reads the code until it can name exact files, signatures and invariants, and solves the hard parts at plan time.
  2. 02Decides by the shape of the work, not its size: separable packages go out, coupled work stays in.
  3. 03Sends independent packages to subagents in parallel, each with its own spec and model.
  4. 04Reviews each diff for missed edge cases, scope creep and "improved" reference code, then runs the tests and build itself.
  5. 05Escalates a package that won't converge to a stronger model, or takes it over, and says so in the report.

Questions

Doesn't Anthropic say to remove subagents?

It says to remove the ones that don't earn their place. Its article on folding subagents into the main loop (opens in a new tab) keeps subagents for parallel work, clean context and independent checks. Delegate follows that: it splits along clean interfaces, not along roles, and keeps coupled work inline.

Why not let the main agent write everything?

Cost and speed. The main agent's reasoning goes where it changes the outcome, planning, hard logic and review, and cheaper models do the typing in parallel. For small or tightly coupled changes the skill does write inline, because the spec would be as long as the code.

Does it work in agents other than Claude Code?

The method does, in any agent that can start subagents and pick their model. The dispatch and fix-round steps name Claude Code's Agent and SendMessage tools.

How do I install it?

Run npx skills add lior-pesoa/skills --skill delegate, or copy the skills/delegate folder into ~/.claude/skills/. It triggers on implementation work that splits cleanly, or when you type /delegate.