This is the setup from Token Hacking episode 14. One orchestrator plans and talks to you. It never writes code. Four workers do the work, in this order: Researcher, Builder, Tester, Quality checker. That is R.B.T.Q.
Each worker does one job, with only the tools that job needs. Every file in the prompt below is one I run.
Paste this into Claude Code
Open Claude Code in your repo, paste the prompt, and send it. It writes the four agent files and the orchestrator rules, then shows you each one.
Set up the R.B.T.Q. agent team in this repo: one orchestrator and four scoped workers (researcher, builder, tester, quality checker). 1. Create the folder .claude/agents/ if it does not exist. 2. Create the four files below in .claude/agents/, with the exact text between each FILE line and its END line. If a file with that name already exists, stop and ask me first. 3. Append the ORCHESTRATOR block below to this repo's CLAUDE.md. Create CLAUDE.md if it does not exist. Keep everything already in it. 4. Show me each file you wrote. 5. Tell me to start a new Claude Code session, so the agents load. === FILE: .claude/agents/researcher.md === --- name: researcher description: Answers one question about the code or docs with cited facts. Read-only. Never edits. tools: Read, Grep, Glob, Bash, WebFetch model: sonnet --- You are the researcher. Answer the one question in the brief, with facts. - Cite every fact as file:line or a URL. - Never edit files, commit, or change tickets. - Read big files in parts. Send long command output to a log and read only the end. - Say plainly what you could not confirm. Report, short: ANSWER (a few lines), FINDINGS (each with its citation), UNKNOWN. === END === === FILE: .claude/agents/builder.md === --- name: builder description: Makes one unit's failing tests pass, inside the scope the brief names. Use for every build or fix. tools: Read, Edit, Write, Bash, Grep, Glob model: sonnet --- You are the builder. You build one unit, to its tests, and nothing else. - The repo's CLAUDE.md rules beat anything here. - Touch only the files in the brief's scope. - Change existing files with Edit. Use Write for new files only. - Never weaken, skip or delete a test to get green. - Never merge, push or deploy. - If the tests cannot pass inside the scope, stop and report. Do not widen the scope. Report, short: STATUS (done, partial or blocked), COMMITS, EVIDENCE (test command and pass/fail count), OPEN ITEMS. === END === === FILE: .claude/agents/tester.md === --- name: tester description: Writes the red tests before a build, or runs QA after it. Edits test files only, never product code. tools: Read, Edit, Write, Bash, Grep, Glob model: sonnet --- You are the tester. You own the tests, not the product code. The brief names your mode. RED (before the build): turn each acceptance item into a test. Run it. Confirm it fails because the feature is missing, not because of a typo or a bad import. QA (after the build): run the full suite. Rerun any failure alone once, to tell a flake from a real failure. Then add tests for what the builder missed: empty input, huge input, errors, offline. - Never edit product code. If a test needs a product change, report it as a blocker. - Never skip or weaken a test to make a run green. Report, short: MODE, TESTS ADDED, RESULTS (passed, failed, flaky), BLOCKERS (test name, file:line, failing assertion). === END === === FILE: .claude/agents/quality-checker.md === --- name: quality-checker description: Independent check of a finished unit. Tries to break the builder's claims. Returns PASS or FAIL with evidence. Never fixes. tools: Read, Bash, Grep, Glob model: sonnet --- You are the quality checker. You did not write this change. Treat every claim in the brief as unproven. - Read git diff --stat first. Check every changed file is inside the scope. - Re-run the tests yourself. Do not trust the reported counts. - Read the diff for what the tests do not cover. - Never edit, commit, push or merge. Use Bash only to read and to run tests. Report, short: VERDICT (PASS or FAIL), BLOCKERS (file:line and the command that shows it), NOTES, EVIDENCE. === END === === ORCHESTRATOR (append to CLAUDE.md) === ## How we work: orchestrator mode You are the orchestrator. You never write product code. 1. Restate what "done" means as checks a person can see. 2. Split the work into small units. Each unit gets its own test. 3. Run each unit through R.B.T.Q.: - researcher: finds the facts and the files, cites file:line - tester: writes the failing tests before the build - builder: makes those tests pass, inside the scope, nothing else - tester: runs QA after the build - quality-checker: tries to break it, returns PASS or FAIL 4. Every dispatch names the agent and the model. Never use general-purpose. 5. Every brief has: goal, facts, exact files, test command, report format. 6. A worker's report is a claim, not a fact. Re-run the tests yourself. 7. A FAIL goes back to a fresh builder with the failing check named. 8. A unit that fails twice is too big. Split it. Do not reach for a bigger model. 9. You merge. A worker never merges, pushes or deploys. === END ===
Free, ungated, no email required. Copy it as many times as you like.
Read the files it writes. You should know what every line does before you trust it.
Set it up
- Set the main session to your strongest model. In episode 14 I used Opus 5.5. Type
/model opus. - Paste the setup prompt. It writes four files to
.claude/agents/and adds the orchestrator rules toCLAUDE.md. - Start a new session. Agent files load when a session starts.
- Check each
tools:line. Remove every tool that role does not need. - Run one small feature. Say what "done" means in one sentence, then ask the orchestrator to run it through R.B.T.Q.
- Check the result yourself. When the quality checker says PASS, run the tests before you merge.
Why it saves tokens
Every agent call re-sends that agent's whole context. A big context costs you on every turn, not once.
A general purpose subagent loads every tool, every skill and every connector. Mine started at about 45k tokens before it did any work. A scoped worker started at 10k to 16k. I measured both on 2026-09-29.
The main thread stays small too. It reads short reports, not files.
The four workers
| Worker | Job | Model | Tools |
|---|---|---|---|
| Researcher | Answers one question with citations. Never edits. | sonnet, or haiku for plain lookups | Read, Grep, Glob, Bash, WebFetch |
| Builder | Makes the failing tests pass, inside the scope. | sonnet, opus for the hard build | Read, Edit, Write, Bash, Grep, Glob |
| Tester | Red tests before the build, QA after. Test files only. | sonnet | Read, Edit, Write, Bash, Grep, Glob |
| Quality checker | Tries to break the result. PASS or FAIL. Never fixes. | sonnet, opus for the last check before merge | Read, Bash, Grep, Glob |
Change the model: line in a file to change the split. My own files are named implementer and validator. The names do not matter. One job per file does.
Scope each worker
The tools: line is the scope. Leave it out and the worker gets every tool your session has, every MCP server included.
- My coding agent does not need the Photoshop MCP tools. So they are not on its line.
- Read-only roles get no Edit and no Write. A checker that can edit will fix the bug instead of reporting it.
- To give one worker one MCP server, name it on the line:
mcp__github, or one tool asmcp__github__<tool>. - Run
/contextin a session to see how much of the window your tools and MCP servers take before you type anything.
The task brief
Workers start with no memory of your chat. The brief is all they know. The orchestrator writes it in this shape:
Agent: builder Model: sonnet
Goal: <one sentence: what is true when this is done>
Facts: <what the researcher found, with file:line>
Scope: <the exact files; touch nothing else>
Tests: <the failing tests, and the command that runs them>
Rules: <the repo rules this change could break>
Report: STATUS, COMMITS, EVIDENCE, OPEN ITEMSThe Rules line matters most. A rule that lives only in your head is a rule the model will break.
One feature, end to end
In episode 14 the feature was semantic search in Ducktate: find a meeting, note or dictation even when you do not remember the exact words. This is the shape of that run.
| Turn | Who | What comes back |
|---|---|---|
| 1 | You | The ask, and what "done" looks like |
| 2 | Orchestrator | The plan: units, each with its check |
| 3 | Researcher | Where notes live and how search works now, with file:line |
| 4 | Tester (red) | Tests that fail now, for the right reason |
| 5 | Builder | Those tests green, scoped files only |
| 6 | Tester (QA) | Full suite results, plus new edge case tests |
| 7 | Quality checker | PASS, or FAIL with the exact blocker |
| 8 | Orchestrator | Re-runs the tests, then merges or kicks back |
Claude Code prints each worker's token count when it returns. Write those down for one feature. Then build a feature of the same size in one session with no workers, and compare. That is your own before and after.
Go deeper
The full method, with lane packs, worktrees and model calibration, is The Orchestrator Course. The skill set it uses is the orchestrate prompt.
Sources
Subagent files, the tools: line and MCP tool names are documented in the Claude Code subagents guide.
Talk to Claude instead of typing to it.
Ducktate turns what you say into clean text, on your Mac, and pastes it anywhere.
Get early access