The 402-Line Prompt: How Decomposition Makes Agents 5x Faster
A slow agent does not need more tools and instructions. In one measured case, a 402-line prompt with 12 tools took 102 tool calls and 488 seconds, and decomposing it into skills and scripts cut the run to about 100 seconds with the same correctness.
A slow, expensive agent tempts you to add more: more tools, more context, more instructions packed into the system prompt so it never misses a case. This video argues the opposite. One measured case shows that cutting what loads on every call, while keeping the same knowledge, can make an agent about five times faster.
The wrong guess: add more
The natural fix for an agent that works but is slow is to add more of everything. The video holds on to one case that breaks that guess: a 402-line prompt with 12 tools, doing one task, a daily low-stock sweep. It took 102 tool calls and 488 seconds.
Why more is the problem
Every one of those 402 lines is read on every call, and all 12 tools are considered even when only one applies. The video's diagnosis is that more is not the problem. Carrying all of it, all the time, is.
Three levers
The video names three levers that trade cost for control:
- Tools: stateless calls that ask, get an answer, and decide what to do next.
- Skills: instructions loaded only when needed.
- Subagents: a separate context window for a task that needs full autonomy.
The 402-line prompt splits accordingly. The core shrinks to 15 lines covering the role, the decision logic, and the output format. Five skill modules, for reorder policy, forecasting, notifications, vendor lookup, and audit logging, load only when a task needs them.
Complexity hides behind the interface
A skill call looks simple from the core. It issues one instruction, such as run the forecasting skill. On the other side of that line, the skill loads its own 200-line sub-prompt, runs its own reasoning, and returns one result. The core never touches those lines, so the complexity stays hidden behind the interface.
The same sweep, decomposed
Back to the low-stock sweep. The same task that took 102 tool calls and 488 seconds now runs as three scripts in about 100 seconds, with the same correctness, roughly five times faster.
An honest caveat and a limit
The video flags that these numbers are one team's measurement on one workflow. How much you gain depends on how cleanly your own task splits into bounded pieces. Decomposition works when the pieces are genuinely separable, such as a lookup, a policy check, or a template. It flips when the task is one continuous judgment call, because splitting that just adds a boundary to cross, and the back-and-forth can cost more than the single large prompt did.
Key takeaways
- Adding more tools, context, and instructions is not the fix for a slow agent.
- A long prompt is read on every call, and every tool is considered each time.
- Tools, skills, and subagents are three levers that trade cost for control.
- Skills load their instructions only when a task needs them.
- In the example, a 402-line prompt shrank to a 15-line core plus five skill modules.
- The sweep fell from 102 tool calls and 488 seconds to three scripts and about 100 seconds.
- Decomposition helps when pieces are separable and can hurt for one continuous judgment call.
Try it yourself
Paste this into Claude: "Here is my agent's system prompt. Find the lines that are decision logic versus the lines that are domain knowledge, split the knowledge into skills the agent loads on demand, and estimate the token and latency difference." Run it on your own agent and find your split.
Chapters
- 0:00The naive framing: "just add more tools?"
- 0:11The wrong guess: add more
- 0:24The anchor: 402 lines, 12 tools, low-stock sweep
- 0:34Breaking the wrong guess
- 0:45Three levers: tools, skills, subagents
- 1:13Complexity hides behind the interface
- 1:29The one flag
- 1:40The anchor returns, decomposed
- 1:54Both directions
- 2:13Carry-out
- 2:19Your turn
- 2:37Outro
Full transcript(auto-generated, with timestamps)
The naive framing: "just add more tools?"
[0:00]A newcomer might think a slow agent needs more tools, more context, more instructions. It's the opposite. Why does cutting a 402-line prompt make agents five times faster? You built an agent that works, but it's
The wrong guess: add more
[0:12]Slow, and every call costs more than it should. The natural fix is to add more, more tools, more context, more instructions packed into the system prompt so it never misses a case. Hold on to one case, a 402-line prompt,
The anchor: 402 lines, 12 tools, low-stock sweep
[0:26]12 tools, one task, a daily low stock sweep. It took 102 tool calls and 488 seconds. But every one of those 402 lines gets
Breaking the wrong guess
[0:36]Read on every call, and all 12 tools get considered even when only one applies. More isn't the problem, carrying all of it always is.
Three levers: tools, skills, subagents
[0:45]Three levers trade cost for control. Tools, stateless calls ask, get an answer, decide next. Skills, instructions loaded only when needed. Sub-agents, a separate context window for a task that needs full autonomy. So, the 402-line prompt splits. The core shrinks to 15 lines, just the role, the decision logic, the output format. Five skill modules, reorder policy, forecasting, notifications, vendor lookup, audit logging, load only when a task needs them.
Complexity hides behind the interface
[1:13]Here's what a skill call looks like. The core issues one instruction, run the forecasting skill. On the other side of that line, the skill loads its own 200-line sub-prompt, runs its own reasoning, and returns one result. The core never touches those lines, complexity hides behind the interface.
The one flag
[1:29]One flag, these numbers five times faster, 100 seconds, are one team's measurement on one workflow. How much you gain depends on how cleanly your own task splits into bounded pieces. Back to
The anchor returns, decomposed
[1:40]The sweep, same 402-line case now decomposed. The same task that took 102 tool calls and 488 seconds now runs as three scripts in about 100 seconds. Same correctness, about five times faster.
Both directions
[1:54]This works when the pieces are genuinely separable. A lookup, a policy check, a template, each bounded enough to hand to a tool or a skill on its own. It flips when the task is one continuous judgment call. Splitting that just adds a boundary to cross, and the back-and-forth can cost more than the single big prompt ever did. Faster agents don't know less. They load
Carry-out
[2:14]Only the knowledge each task actually needs, exactly when it needs it.
Your turn
[2:19]Your turn. Here's the prompt. Read it with me. Here's my agent system prompt. Find the lines that are decision logic versus the lines that are domain knowledge. Split the knowledge into skills the agent loads on demand, and estimate the token and latency difference. Run it on your own agent and find your split. Liam Infrabear.
Outro
[2:37]The 402-line prompt: How decomposition makes agents 5x faster. Liam Infrabear.





