Home/Blog/Subagent Prompt Template: 12 Briefs for Scoped Agent Tasks
Blog

Subagent Prompt Template: 12 Briefs for Scoped Agent Tasks

P
promptstudio

12 subagent prompt templates for scouts, research, code changes and review, each with scope, allowed tools, acceptance criteria, stop rules and a report shape.

Subagent Prompt Template: 12 Briefs for Scoped Agent Tasks

A subagent prompt template is the brief a lead agent hands one subagent so it can do a single job without the lead's conversation history. The 12 templates below cover scouting, research, code changes, review and merging reports, and each one sets scope, allowed tools, acceptance criteria, stop rules and a report shape. Copy one, fill the brackets, and keep each subagent to one job so the lead can check and combine the results.

For a full brief with a done, partial or blocked report and a ready-made Claude Code subagent file, use the scoped subagent brief prompt.

Read-only scouts

1. Codebase usage scout

You are a read-only scout. Goal: [parent goal]. Find every use of [library or function] in [folders], list file and line, tag each by [categories], and return status, findings with evidence and open questions. Do not edit anything.

2. Docs fact finder

Read only these pages [links or files]. Answer [questions] with a quote and its location for each answer. If a page does not answer a question, say "not found" instead of inferring.

3. Inventory builder

List every [item type, such as API route or cron job] in [scope] with name, location and owner if written down. Stop after [limit] tool calls and report partial with what remains.

Research subagents

4. Option comparison

Compare [options] for [decision] using only [sources]. Return a table with the criteria [list], a source for every cell, and the cells you could not fill. Do not recommend; the lead decides.

5. Source collector

Find up to [number] sources on [topic] published after [date]. For each return title, publisher, date, link and one sentence on what it adds. Skip anything you cannot open.

6. Claim checker

Check each claim below [paste] against [sources]. Mark it supported, contradicted or not found, with the exact supporting line. Do not rewrite the claims.

Writing and changing

7. Single-file change

Change only [file] to [change]. Run [test command] before and after. Return the diff, both test results and anything you noticed but did not change.

8. Test writer

Write tests for [function] in [test file] covering [cases]. Do not change the code under test. If a case fails, report it as a finding instead of fixing it.

9. Draft section writer

Draft [section] of [document] for [audience] in [length], using only facts from [inputs]. Mark any sentence that needs a fact you were not given.

Review and merge

10. Reviewer subagent

Review [diff or document] against these criteria [list]. Return pass or fail per criterion with the line that decides it. No new features or rewrites.

11. Report merger

Here are reports from [number] subagents [paste]. Merge them into one table, flag findings that conflict, and list open questions that more than one subagent raised.

12. Blocked handoff

You stopped before finishing [subtask]. Write a handoff: what was done with evidence, where you stopped and why, the exact decision a human needs to make, and the next step once it is made.

Worked example: mapping a deprecated library

In the prompt's sample, a lead agent is moving a Node.js CLI called nethatch off the deprecated request library. The subagent gets one job: find every use and tag each call, with Read, Grep and Glob only and no edits. The brief lists the read order starting with src/net/, four acceptance criteria that each need a file and line as evidence, a stop at 60 tool calls, and a rule to report blocked if more than five calls build their options at runtime. It ends with a report schema and the same brief as a .claude/agents/request-scout.md file with name, description and tools in the frontmatter.

Tips

  • A subagent does not see the lead's chat, so state the why in one sentence; it helps the subagent make judgment calls.
  • Give every subagent the same report shape so merging takes minutes, not a rereading.
  • Start read-only. Grant write tools in a second brief once the map is right.
  • Set tool permissions in the platform as well; words in a brief are not a security boundary.

Claude Code notes, checked on Nov 30, 2026

Claude Code stores project subagents as Markdown files in .claude/agents/. Only name and description are required in the frontmatter; tools is an optional allowlist, and if you leave it out the subagent inherits every tool available to subagents. An optional maxTurns field stops a subagent after a set number of turns and returns its output marked as partial. The text after the frontmatter is the subagent's system prompt. Check Anthropic's current docs before relying on other fields. PromptDig is not affiliated with Anthropic.

Related on PromptDig

For a single agent working alone, see the agentic coding task brief prompt and agentic prompts with stop rules. Writing the parent agent's instructions? See the AI agent system prompt writer. Reviewing a branch before you merge the scout's findings? Try the Claude Code branch review prompt, and for which instruction file loads where, read AGENTS.md vs CLAUDE.md vs Cursor rules. More in the Agents hub, browse all prompts, or share your own subagent brief.

Share this article