nested-subagents
Spawn nested sub-agents (agents that spawn sub-agents, up to depth=5) via Claude Code's native Task tool — for context-managed deep delegation
npx skills add ruvnet/ruflo --skill nested-subagents --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Nested Sub-Agents Spawn a tree of sub-agents where each child can itself spawn children, up to 5 levels deep. The motivation is **context management**, not parallelism: each level gets a fresh context window so deep work doesn't blow the top-level agent's context budget. ## When to use - The problem decomposes into nested layers (research → expand → verify → synthesize), each of which would otherwise pollute the parent's context. - A single agent's context window would not be enough to hold all the intermediate state. - The leaves of the tree are different `subagent_type`s and need their own specialized prompts (e.g., `pii-detector` at one leaf, `tester` at another). Skip this skill when flat fan-out (`Task` × N in one message) suffices — nesting adds latency. ## Steps 1. **Invoke the coordinator** — spawn `nested-coordinator` as your top-level agent: ``` Task({ subagent_type: "nested-coordinator", name: "root-coordinator", description: "Decompose and delegate <problem>", prompt: "<problem statement, with constraints and expected output shape>" }) ``` 2. **The coordinator decomposes first** — it lays out the spawn tree via `TodoWrite` before any `Task` call. Inspect the tree befo
- When to use
- Steps
- Depth budget
- Benefits
- Anti-patterns (do NOT)
- Related
What does the nested-subagents skill do?
Spawn nested sub-agents (agents that spawn sub-agents, up to depth=5) via Claude Code's native Task tool — for context-managed deep delegation
How do I install it?
Run `npx skills add ruvnet/ruflo --skill nested-subagents --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ruvnet/ruflo, a repository with 67,015 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.