spawn_agent — Claude Code prompt: research and install
The spawn_agent Claude Code prompt sends a child agent to investigate a bounded question. It returns a short observation; that result alone does not finish the main task.
Apache-2.0 ★ 9,488 updated 2026-11-16
.claude/commands/spawn_agent.mdWhat spawn_agent does
The prompt delegates a narrowly scoped research question to a child agent. The agent can read web pages and use sandbox tools, but cannot ask the user questions or send messages outward. Its response comes back as an observation.
The child has a step limit, and its response is cut off after a character limit. For work involving several pages or sources, pass maxSteps and maxResultChars and request a compact response. A truncated marker means the end of the result was cut off. The child’s answer does not complete the parent task.
For Claude Code, install the prompt as .claude/commands/spawn_agent.md.
What it helps with
- research one narrowly scoped question using web sources
- gather concise findings from several pages
- get a separate observation from a child agent
Example prompts for the agent
- Research how this API works and return a brief observation with source links.
- Compare the information on these pages against this question and report the main findings only.
- Investigate this question in the sandbox and return the result without sending messages outward.
How to install spawn_agent
Manually: put the files in place
.claude/commands/spawn_agent.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about spawn_agent
How do I install spawn_agent in Claude Code?
Add the prompt file at .claude/commands/spawn_agent.md.
What does spawn_agent do?
It assigns a bounded research question to a child agent that can read web pages and use sandbox tools. The returned observation does not finish the parent task.
What tools can the spawn_agent child use?
It can read the web and use sandbox tools. It cannot ask the user questions or send anything outward.
Source text
spawn_agent.md · Apache-2.0
Ask a child agent to research a bounded question. The child has read only web and sandbox tools, cannot ask the user or send anything outward, and returns one limited result as an observation. The child result alone does not complete your task. By default it gets {{steps}} steps and its result is cut at {{chars}} characters; for a question that needs more reading (several sources or pages) pass maxSteps up to {{maxSteps}} and maxResultChars up to {{maxChars}}, and ask for a compact result. truncated in the result means the end was cut off.
© wangzan101 · Apache-2.0 · wangzan101/Mika