The 402-Line Prompt: How Splitting Agents Makes Them 5x Faster

A slow agent with a 402-line prompt and 12 tools is not fixed by adding more. The video splits the same knowledge across tools, skills and subagents so only the relevant slice loads for each task, and explains when that split backfires.

2:45 video3 min readWatch on YouTube

A newcomer might assume a slow agent needs more tools, more context and more instructions. The video argues the opposite. It uses one example, a daily low-stock sweep run by an agent with a 402-line prompt and 12 tools, to show why carrying everything on every call is the real problem.

The natural fix that makes things worse

When an agent works but runs slowly and expensively, the instinct is to pack more into the system prompt so it never misses a case. The video treats that as the wrong guess. In the example, the sweep took 102 tool calls and 488 seconds. Every one of the 402 lines is read on every call, and all 12 tools are considered even when only one applies. The point made is that more is not the problem; carrying all of it all the time is.

Three levers: tools, skills and subagents

The video describes three levers that trade cost for control.

  • Tools are stateless calls: ask, get an answer, decide what to do next.
  • Skills are instructions that load only when they are needed.
  • Subagents get a separate context window for a task that needs full autonomy.

Applying them to the example, the 402-line prompt splits. The core shrinks to 15 lines covering only 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 calls for them.

Complexity hides behind the interface

The video then shows what a skill call looks like. The core 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, does its own reasoning and returns a single result. The core never touches those lines, so the complexity stays behind the interface and out of the main context.

The same sweep, decomposed

Back to the original task, the decomposed version runs as three scripts in about 100 seconds, with the same correctness. That is roughly five times faster than the 488-second original. The video attaches a clear caveat: the five-times figure and the roughly 100 seconds are one team's measurement on one workflow. How much anyone gains depends on how cleanly their own task splits into bounded pieces.

When splitting helps and when it hurts

The video describes both directions. Decomposition works when the pieces are genuinely separable, such as a lookup, a policy check or 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 kind of task only adds a boundary to cross, and the back-and-forth can cost more than the single large prompt ever did. The closing line sums it up: faster agents do not know less, they load only the knowledge each task needs, exactly when it needs it.

Key takeaways

  • A long prompt and many tools slow an agent because all of it is read and considered on every call.
  • Tools, skills and subagents are three ways to trade cost for control.
  • Skills keep instructions out of the core prompt until a task needs them.
  • A skill call hides its own sub-prompt and reasoning behind a single instruction and result.
  • In the example, 102 tool calls and 488 seconds became three scripts and about 100 seconds.
  • The five-times speedup is one measurement on one workflow, not a guaranteed multiplier.
  • Splitting works for separable pieces and backfires on one continuous judgment call.

Try it yourself

Take your own agent's system prompt and paste it into Claude with this request: 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. Then check whether your task really splits into bounded pieces before you commit to the new structure.

Chapters

  1. 0:00The naive framing: "just add more tools?"
  2. 0:11The wrong guess: add more
  3. 0:24The anchor: 402 lines, 12 tools, low-stock sweep
  4. 0:34Breaking the wrong guess
  5. 0:45Three levers: tools, skills, subagents
  6. 1:13Complexity hides behind the interface
  7. 1:29The one flag
  8. 1:40The anchor returns, decomposed
  9. 1:54Both directions
  10. 2:13Carry-out
  11. 2:19Your turn
  12. 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.

The anchor returns, decomposed

[1:40]Back to 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.

More from Claude

Humanitarians AI Lyrical Literacy Project