nested-subagents

Installation
SKILL.md

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_types 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

Installs
7
GitHub Stars
61.6K
First Seen
Jun 11, 2026
nested-subagents — ruvnet/claude-flow