C4D Practice
← Browse by Chapter
#49Chapter 08 — Subagents: Isolation and Delegation
Write a subagent definition file at `.claude/agents/code-reviewer.md`. Purpose: review the diff between the current branch and `main` for correctness, design and style. The `description` must say when to delegate to this agent, in one sentence. Give it the smallest `tools` list that lets it read the code and obtain the diff, and justify each tool you include. Add a turn budget. The system prompt must state the output format (three concerns, ranked, each with `file:line`, a severity and one sentence), the anti-goals (never edits, never approves to be agreeable, never pads the list) and a refusal rule (a diff touching `migrations/` with no migration-safety note is BLOCKING). Show me the file before you save it.
Mastering Claude Code
Mastering Claude Code

These prompts are excerpts from the book. Get the full collection with explanations and use cases.

Get the Book →