Skills as Sub-Agents: Orchestrating Complex work with Claude Skills A developer detailed a pattern for orchestrating complex coding tasks by splitting work into skills that act as sub-agents, each with its own context window, to maintain context hygiene and improve reliability. The approach uses an orchestrator skill that plans and interprets, while worker skills perform focused tasks and return concise summaries, with full reports written to files for on-demand access. If you've built anything with a coding agent, you've hit the wall: the task is too big for one prompt. You ask it to "find out what's causing this bug," and it starts strong — then drowns. Half its context is the raw output of files it dumped, it's lost the thread of which theory it was testing, and the answer it finally gives is confidently wrong. The problem isn't the model. It's that you asked one agent, with one context window, to do everything — gather evidence, hold it all in its head, and reason about it at the same time. There's a cleaner pattern. Split the work into skills , and have one skill orchestrate the others as sub-agents . Let's walk through it. New to skills or the agent loop? The one-line version: a skillis a packaged set of instructions on disk that the agent loads only when it's relevant. Asub-agentis a fresh agent instance with its own separate context window. This post is about combining the two. Picture two layers. The orchestrator sits on top. Its only job is to think : plan the investigation, interpret results, decide what to do next, and conclude. It never opens a file, never greps the codebase, never parses output. The first lines of an orchestrator skill should say exactly that: You are a reasoning and coordination layer. You think, you plan, you interpret, you propose — but you never dig into the data yourself. That work belongs in sub-agents. The workers sit below. Each is a small, focused skill that does one concrete thing — find every usage of a function, read a file's git history, run a specific test. The orchestrator spawns each worker as a sub-agent : a separate agent with its own fresh context window. Why does this split matter so much? Context hygiene. When a worker greps a huge codebase and reads a dozen files, all of that lands in theworker'scontext — not the orchestrator's. The worker chews through it, extracts the one thing that matters, and reports back a three-line summary. The orchestrator's context stays clean: it accumulatesconclusions, notraw data. That's the whole trick, and it's why the orchestrator can run for dozens of steps without falling over. A worker skill is just a folder with a SKILL.md file. The front matter does the heavy lifting: --- name: find-usages description: "Find every place a symbol, function, or pattern is used across the codebase. Use when tracing how a change ripples through the code." context: fork allowed-tools: Grep, Read argument-hint: