I Built a 3-Agent Content Team in Claude Code (Research → Write → Review in One Run)
Build 3 custom Claude Code subagents - researcher, writer, reviewer - that run in parallel with separate context windows. Full configs, cost data, and pipeline demo.
My context window kept running out.
Not because I was doing anything wrong. I was doing too much right - in one conversation. Research a topic. Analyze three competitor articles. Write a 3,000-word draft. Audit it against brand voice rules. Check SEO. By the time I got to the quality check, Claude Code had forgotten what I’d researched at the start.
The fix wasn’t working faster or typing shorter prompts. The fix was splitting the work across multiple agents. Each with its own context window, its own tools, and its own job description.
Now I have three specialists instead of one generalist.
A researcher that searches the web and gathers sources.
A writer that drafts content using my brand voice rules.
A reviewer that audits quality without being able to edit (so it can’t just “fix” things silently).
They run in parallel while I work on other tasks. And because each has its own context, nothing gets forgotten.
This is Lesson 4 of the Claude Code Masterclass. In Lessons 1-3, we built a content system, organized the extension stack with skills, and connected external tools. Today we multiply Claude Code itself.
👋 Julley, I'm Dheeraj, an AI systems builder.
I build production-grade AI systems at work by day and ship my own products by night, 9 and counting, including SubflowAI and the Content OS Agents Toolkit. This newsletter is the bridge between those two worlds. Every system, every build, documented step by step.
Join 1,800+ builders getting the exact AI setups, prompts, and workflows that actually work in your business.
Claude Code Masterclass - Full Course
Build a 3-Agent AI Research Team ← You are here
The one-person team that keeps forgetting
Imagine running a content business where one employee handles research, writing, editing, proofreading, and distribution. They’re talented. But by the time they’ve finished a 4-hour research session, they’ve forgotten the first article’s notes while working on the second.
That’s what a single Claude Code conversation looks like after an hour. The context window fills up. Earlier information gets compressed. Quality drifts.
Now imagine hiring three specialists: a researcher who only researches, a writer who only writes, a reviewer who only reviews. Each person has their own desk, their own notes, their own focus.
The researcher’s findings get passed to the writer.
The writer’s draft gets passed to the reviewer.
Nobody forgets anything because nobody is trying to do everything. (If this sounds like the multi-agent collaboration pattern I covered before - it’s the same architecture, applied to Claude Code.)
That’s what Claude Code agents give you. Separate context windows. Separate tool access. Separate instructions. Separate models. One conversation becomes a coordinated team.
Built-in Claude Code agents you already have
Before building custom agents, know what Claude Code already provides. These built-in agent types run behind the scenes:
Explore agent
Uses Haiku when required (fast, cheap model). Has read-only access: can search files, read code, browse the codebase. Cannot edit anything.
Claude Code automatically delegates to this agent when you ask questions like “Where is the authentication logic?” or “Find all files that import this module.”
Plan agent
Inherits your current model. Also read-only. Used when you enter plan mode to research and design an approach before implementing. It gathers context without making changes.
General-purpose agent
Inherits your model. Has full tool access. Used for complex tasks that need both research and action. This is the one Claude Code uses most often when you delegate broad tasks.
There are a few more, like Bash, Claude code guide, and statusline, that help you within Claude Code sessions every now and then.
The key insight: these agents get their own context windows. When Claude Code says “Let me search for that,” it’s often spawning an Explore agent that won’t fill up your main conversation with hundreds of file reads.
Commercial break: Claude Code Builder cohort
The founding batch of my Claude Code cohort starts in July on Maven. Four weeks, six sessions. Learn to build the AI system with me.
Only 12 Seats. When they’re gone, the founding price ($797) closes and Cohort 2 opens at $1,597.
Use code GENAI20 for 20% off. Expires July 9. Check the Syllabus →
Anatomy of a Claude Code agent
Before we build three specific agents, here’s the full shape of an agent file. Every field you can put in the frontmatter, grouped by what it actually controls.
# identity
name: content-researcher
description: Scouts a topic, pulls competitor coverage, and returns a brief with citations. Use before drafting.
# brain
model: sonnet # haiku | sonnet | opus | inherit
effort: medium # low | medium | high | max (how hard it thinks)
# what it can reach for
tools: WebSearch, WebFetch, Read, Glob, Grep
disallowedTools: Write, Edit # can't touch files (by design)
mcpServers: perplexity, tavily # MCP servers mounted at startup
skills: seo-check # skills preloaded into context
# how it behaves
permissionMode: default # default | acceptEdits | plan
maxTurns: 20 # cap on tool round-trips per run
memory: project # user | project | local
# lifecycle
background: false # run in parallel with your main chat
isolation: worktree # give it its own git worktree
initialPrompt: "Read the brief template before searching."
# hooks (optional), fire around tool use
hooks:
PreToolUse:
- matcher: "Bash"
hooks:
- type: command
command: "./scripts/log-run.sh"
---
Below the second `---` is where the agent learns its job.
Role, rules, step-by-step process, and the shape you want its output in.
The frontmatter decides what the agent CAN do.
This section decides what it SHOULD do.
Keep it specific enough that you could hand itto a new hire on day one.
Most agents need five or six of these fields, not all fifteen. The ones that earn their keep every single time:
description is how Claude Code decides when to auto-spawn this agent. Write it like a job posting, not a label. “Scouts a topic and returns a brief” beats “Research agent.”
tools / disallowedTools scope what the agent can do. Giving an agent fewer tools usually produces better results, which is the whole point of the reviewer you’ll see in a moment.
memory: project is the quietest compounding feature in the system. Agents remember what they learn between sessions, so agent number 10 is noticeably sharper than agent number 1.
maxTurns exists to save you from yourself. Without a cap, a curious researcher can burn 80+ tool calls chasing one tangent.
skills preloads skill files into the agent’s context at startup, so a brand voice guide or SEO checklist is available from word one instead of being discovered mid-conversation.
Everything else is a dial you can reach for later. Now let’s build three of these.
1. Building your first agent: the researcher
Custom agents live as markdown files. The filename becomes the agent name. The file has two parts: YAML frontmatter (configuration) and markdown body (instructions).
Where agent files go:
.claude/agents/- project-specific, shared with your team via git~/.claude/agents/- available across all your projects
Create .claude/agents/researcher.md:
name: researcher
description: Deep web research on any topic. Searches the web,
reads competitor articles, and produces research briefs with
specific citations. Use for topic research and competitive analysis.
tools: WebSearch, WebFetch, Read, Glob, Grep
model: sonnet
memory: project
maxTurns: 20
mcpServers:
- perplexity
- firecrawl
---
You are a research specialist for a content business.
When given a topic, conduct thorough research:
1. Search for existing coverage using WebSearch and Perplexity
2. Identify the top 3-5 existing articles or videos
3. Use Firecrawl to scrape and analyze the best ones
4. Note what they cover well and what they miss
5. Find specific data points, statistics, and recent developments
## Output Format
Deliver a structured research brief:
- Topic overview (2-3 sentences)
- Key findings (bullet points with source URLs)
- Competitor coverage gaps (what nobody is saying)
- Specific data points with citations
- Recommended angle for our article
Always include specific URLs. Never fabricate sources.
Update your memory with reliable sources you discover.What's specific to this agent:
mcpServersplugs in Perplexity (deep search) and Firecrawl (page scraping) from Lesson 3. This is the researcher's superpower, it can reach the web.toolsintentionally has noWriteorEdit. A researcher gathers, it doesn't create.
2. Building agent two: the writer
Create .claude/agents/writer.md:
---
name: writer
description: Writes article drafts following brand voice guidelines
and content structure rules. Uses research briefs as input.
Produces long-form content (2,500-3,500 words).
tools: Read, Write, Edit, Glob, Grep
model: sonnet
memory: project
skills:
- seo-check
---
You are a content writer for GenAI Unplugged.
Before writing, always read:
- Brand Knowledge/genai_unplugged_core_brand_voice_guide.md
- Brand Knowledge/longform_content_playbook.md
- config/brand-config.json
## Writing Rules
- First sentence: under 10 words, compelling
- Paragraphs: never more than 4 lines
- Tone: conversational, specific with numbers, practical
- Include 2-4 copy-paste code blocks or prompts
- Include a debugging/failure story
- Include a numbers table showing measurable results
- End with 5-7 key takeaways and a mini exercise
## Forbidden Phrases
Never use: revolutionary, game-changing, unlock, unleash,
supercharge, paradigm, next-level, cutting-edge
## Process
1. Read the research brief provided
2. Read the brand voice guide and playbook
3. Draft the full article following the blueprint structure
4. Self-check against the forbidden phrases list
5. Save to drafts/ with proper naming conventionWhat's specific to this agent:
tools: Read, Write, Edit— the only agent with file write access. Research gathers, review audits, writer creates.skills: seo-checkpreloads skill content into the agent's context at startup. The writer knows SEO rules before word one. (Same trick I use for brand voice training.)No web tools. Keeps the writer focused on the research brief instead of going down rabbit holes.
3. Building agent three: the reviewer
Create .claude/agents/reviewer.md:
---
name: reviewer
description: Quality audits content against brand voice, structure
rules, and SEO requirements. Finds problems but never fixes them.
Read-only access. Use after content is drafted.
tools: Read, Glob, Grep
disallowedTools: Write, Edit
model: sonnet
memory: project
---
You are a content quality reviewer for GenAI Unplugged.
Your job is to find problems, not fix them. You CANNOT edit files.
This is intentional. If you could edit, you would silently fix
issues instead of surfacing them for the writer to learn from.
## Review Process
1. Read the draft article
2. Read config/brand-config.json for forbidden phrases and rules
3. Read Brand Knowledge/longform_content_playbook.md for structure
## Check Against
- Forbidden phrases (reject any found)
- First sentence length (must be under 10 words)
- Paragraph length (none over 4 lines)
- Intro answers 4 questions: what, problem, why, promise
- Big idea statement present
- Analogy used (if topic is complex)
- Key takeaways: 5-7 actionable bullets
- Mini exercise: achievable in 5-15 minutes
- Specific numbers in outcomes
- Copy-paste prompts or code blocks included
## Output Format
Provide a structured review:
- Overall score (1-10)
- Critical issues (must fix before publishing)
- Major issues (should fix)
- Minor issues (nice to fix)
- Specific suggestions with line referencesWhy the reviewer can’t edit:
This was a deliberate architecture decision. My first version gave the reviewer write access. It would find a forbidden phrase and immediately replace it. Problem solved? Not quite. I never saw the issue, never learned the pattern, and the same mistake kept appearing in future drafts.
With disallowedTools: Write, Edit, the reviewer surfaces every issue with a specific location and suggestion. The writer (or I) make the fix. The feedback loop stays intact.
The debugging story: the reviewer that kept passing everything
When I first built the reviewer agent, it gave every draft a 9/10 and flagged zero critical issues. I thought my writing had gotten that good. It hadn’t.
The problem: the reviewer’s system prompt said “find problems” but didn’t tell it what to look for with enough specificity. It was checking vibes, not rules.
The fix was making the review checklist exhaustive and explicit. Instead of “check brand voice,” I listed every forbidden phrase. Instead of “check structure,” I listed every required element with pass/fail criteria.
The reviewer went from “looks good” to “4 issues found: forbidden phrase ‘unlock’ on line 47, paragraph on line 89 exceeds 4 lines, no mini exercise found, first sentence is 14 words (max: 10).”
The lesson: agent instructions need to be specific enough that a literal-minded system can follow them. Vague instructions produce vague results. Specific checklists produce specific findings.
Orchestrating the three agents
1. Sequential: the pipeline pattern
The most reliable pattern runs agents in sequence - research feeds writing, writing feeds review:
Use the researcher agent to investigate "Claude Code hooks tutorial" - existing coverage, competitor gaps, and real data about how hooks work.The researcher runs, searches, scrapes, and returns a brief. Then:
Use the writer agent to draft an article based on those research findings. Save to drafts/hooks-tutorial-draft.md.The writer reads the research, reads the brand guidelines, and writes. Then:
Use the reviewer agent to audit the draft at drafts/hooks-tutorial-draft.md against our brand voice and structure rules.The reviewer reads the draft, checks every rule, and returns a report.
Three agents. Three separate context windows. No information forgotten.
2. Parallel: the speed pattern
When tasks are independent, run them simultaneously. Ask Claude Code:
Run these three research tasks in parallel:
1. Use the researcher agent to investigate "n8n vs Make pricing 2026"
2. Use the researcher agent to analyze "best automation tools for solopreneurs"
3. Use the researcher agent to research "AI content creation workflows"Claude Code spawns three instances. Each runs independently with its own context. When all three finish, results come back to your main conversation for synthesis.
The speed difference
Three sequential research tasks that took 12 minutes now take about 5 minutes (4 min of parallel work plus a quick synthesis pass). Same quality. Less than half the time.
The payoff: one prompt, three agents
Here’s what my content session looks like now:
Research the topic "Claude Code MCP servers tutorial" using the researcher agent. Then have the writer agent draft an article from that research. Then have the reviewer agent audit the draft. Give me all three outputs.Claude Code orchestrates the entire pipeline:
Researcher searches, scrapes, synthesizes (4-5 minutes)
Writer reads the research, reads brand guidelines, writes the draft (6-8 minutes)
Reviewer audits the draft against every rule (2-3 minutes)
Total: about 15 minutes for research + first draft + quality audit. The same work used to take me 2+ hours of manual prompting, tab-switching, and re-explaining context.
Get PluggedIn
The three agents above get you started. Here's what PluggedIn adds, the parts I rebuilt over months of running this stack:
Pipeline orchestrator agent. Chains researcher → writer → reviewer from one prompt. The article shows the three agents. PluggedIn ships the conductor.
Test harness. 20 input topics with expected output checklists, so you can stress-test your agents before letting them touch real work.
Memory seed pack. MEMORY.md scaffolds for all three agents with section structure, worked examples, and a how-to-build-your-own framework. Your agents' memory starts shaped, not empty.
Agent creation template. 5 fully-annotated examples covering research, writing, QA, distribution, and analysis. Your next agent starts in minutes.
Failure-mode playbook. Top 10 ways agents break with exact fixes. The lessons I learned the expensive way.
Model selection: where the money goes
Not all agents need the same model. This is where cost management gets practical:
Researcher - Model: Sonnet. Good balance of speed and synthesis. Approx. cost per run: $0.15-0.30
Writer - Model: Sonnet. Creative enough for articles, fast enough for iterations. Approx. cost per run: $0.20-0.40
Reviewer - Model: Sonnet. Analytical tasks don’t need Opus. Approx. cost per run: $0.10-0.20
I initially used Opus for the writer. The quality was marginally better, but the cost was 5x higher and it took twice as long. Sonnet with good instructions (loaded via the brand voice skill and detailed system prompt) produces 90% of Opus quality at 20% of the cost.
The exception: if you’re writing something highly creative or nuanced, a personal essay, a launch announcement, switch the writer to Opus for that specific run. Don’t make it the default.
Agent memory: getting smarter over time
Each agent has a memory: project setting. Here’s what that means in practice.
The first time I run the researcher on a topic, it searches broadly. It doesn’t know my niche, my competitors, or my reliable sources. After 10 sessions, it has accumulated:
A list of reliable sources for Claude Code content
Knowledge of which competitor blogs to check first
Patterns for what search queries return the best results
Data points it’s verified before (so it doesn’t re-verify)
This memory lives in .claude/agent-memory/researcher/MEMORY.md. It’s a file the agent reads at the start of every session and updates when it learns something new.
The writer builds memory too: writing patterns that work for my audience, common mistakes to avoid, which analogies land well. The reviewer accumulates: recurring issues, common forbidden-phrase violations, structural patterns that pass consistently.
After a month of use, each agent is noticeably better at its specific job. Not because the underlying model improved - because the accumulated memory gives each agent a head start.
Key takeaways
Agents are markdown files with YAML frontmatter. Drop them in
.claude/agents/and Claude Code finds them automatically.Built-in agents ship with the box. Explore, Plan, and General-purpose are already there before you write a single file.
Tool restrictions are features. The reviewer can't edit for a reason — constraints force better feedback.
Model selection is a cost decision. Sonnet handles 90% of work. Reserve Opus for creative tasks, Haiku for lookups.
Agent memory compounds. After 10 sessions, each agent already knows your niche, sources, and patterns.
Parallel execution is free speed. Three independent tasks finish in one-third the time of sequential.
Specific instructions beat vague ones. If the reviewer flags nothing, the checklist isn't detailed enough yet.
Mini exercise
30 minutes if you get the PluggedIn files; expect 3-4 hours if you write them from scratch:
Create
.claude/agents/folder in your projectBuild the researcher agent from this lesson - copy the markdown file, add your own topic focus
Run it: “Use the researcher agent to investigate [your topic]”
Build the reviewer agent - copy the markdown file, customize the checklist for your content rules
Test the pipeline: have the researcher investigate a topic, then have the reviewer audit one of your existing drafts
Check the output quality. Adjust the instructions in each agent file based on what you see
Start with two agents. Add the writer when you’re comfortable with the pattern.
Next lesson
In Lesson 5, we snap everything together. The content multiplier from Lesson 1. The extension stack from Lesson 2. The MCP connections and hooks from Lesson 3. The agent team from today.
One integrated system that handles your entire content pipeline from research to distribution - with real cost data and an honest look at what not to automate.
Lesson 5: Claude Code Runs My Content Business While I Create ->
Your PluggedIn assets for this post
What’s inside:
researcher-agent.md - Researcher Agent (drop-in config)
writer-agent.md - Writer Agent (drop-in config)
reviewer-agent.md - Reviewer Agent (drop-in config)
orchestrator-agent.md - Pipeline Orchestrator (sequences research → write → review)
agent-creation-template.md - 5 annotated agent examples to copy-paste
agent-test-harness.pdf - Agent Test Harness (20 input tests, binary checklists)
failure-mode-playbook.pdf - Top 10 ways agents break + exact fixes
memory-seed-pack/README.pdf - How to use the memory seed scaffolds
memory-seed-pack/researcher-MEMORY.md - Researcher memory scaffold
memory-seed-pack/writer-MEMORY.md - Writer memory scaffold
memory-seed-pack/reviewer-MEMORY.md - Reviewer memory scaffold












Great article! Good team to support a content creator:) Thanks for sharing.