gruckion

Nested Subagent — Development skill for Claude Code

Development community

Enable nested subagents in Claude Code - subagents can spawn their own subagents.

How to install Nested Subagent

This entry records only its repository, not the path inside it, so there is no exact command to give. Open gruckion/nested-subagent and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Nested Subagent does

Enable nested subagents in Claude Code - subagents can spawn their own subagents.

Alternatives in Development

  • On — PUA 开启默认模式 — 每次新会话自动加载 PUA 核心 skill 19.5k ★
  • Happy Coder — by GrocerPublishAgent - Spawn and control multiple Claude Codes in parallel from your phone or desktop 15.7k ★
  • Notebooklm Skill — Use this skill to enable Claude Code to communicate directly with your Google NotebookLM notebooks 5.9k ★

README

Nested Subagent

![Nested Subagent banner](assets/banner.jpg)

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Claude Code](https://img.shields.io/badge/Claude%20Code-v1.0.33+-blue.svg)](https://docs.anthropic.com/en/docs/claude-code) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/gruckion/nested-subagent/pulls)

Enable **unlimited nested subagents** in Claude Code. Subagents can spawn their own subagents.


Quick Start

Option 1: Install from Marketplace (Recommended)

  1. Run /plugin in Claude Code
  2. Go to Marketplaces tab
  3. Select + Add Marketplace
  4. Enter gruckion/nested-subagent
  5. Go to Discover tab and install the plugin

Option 2: Install Locally

git clone https://github.com/gruckion/nested-subagent.git
cd nested-subagent/mcp-server && npm install
claude /plugin install ./nested-subagent

Option 3: Per-Session (CLI)

claude --plugin-dir /path/to/nested-subagent

What's Included

Component Name Description
MCP Tool Task Spawns isolated Claude processes with full tool access

Example

![Example terminal session showing 3 levels of nesting](assets/example.png)

Usage

Claude automatically uses the nested subagent tool when your task requires multi-level delegation:

Build a math utility that needs its own subagents for verify, plan, and code steps.
Process these issues where each issue handler spawns specialized workers.
Run a workflow that delegates to sub-sub-agents for parallel execution.

Why Use This?

Claude Code's native Task tool **blocks subagents from spawning other subagents**:

// src/tools/AgentTool/prompt.ts - the recursion blocker
.filter(_ => _.name !== AgentTool.name)

This plugin works around that limitation using the official `claude -p` headless mode. Each spawned