Agent skill · Workflow & Productivity

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

rUv71,307★ · +1,002/wk · 3 repos on radarProfile →
claude-codecodexcan modify filesMIT
Install
npx skills add ruvnet/ruflo --skill nested-subagents --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 4 KB
Bundled scripts: none
Allowed tools: TaskTodoWriteReadGrepGlobBash
Path: plugins/ruflo-agent/skills/nested-subagents/SKILL.md
Open the folder on GitHub →
Where it comes from
Source: ruvnet/ruflo
Stars: 67,015 · +629 this week
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the 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_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

What's inside
Steps it walks through
  1. When to use
  2. Steps
  3. Depth budget
  4. Benefits
  5. Anti-patterns (do NOT)
  6. Related
More from ruflo
All skills →
About this skill
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.

Keep going