Module 1: Fundamentals1.6: Custom Sub-agents

1.6: Custom Sub-agents

  • Time to Complete: 15 minutes

Interactive lesson: Run /start-1-6 in Claude Code

Additional Resources

Agents vs Sub-agents

AspectAgents (1.5)Sub-agents (1.6)
LifespanTemporary - spin up, process, gonePermanent - always available
PurposeVolume, batch processingWisdom, perspectives, feedback
Analogy”10 interns processing files""Advisory board reviewing strategy”

The Advisory Team Concept

Like building your own board of advisors:

  • Each has a different perspective
  • Call on them for feedback from different angles
  • Update and improve them over time

How Sub-agents Work

Sub-agents are defined in .claude/agents/ folder.

Each file has:

  • YAML frontmatter (name, description)
  • System prompt (personality and perspective)

They’re just text files - you can view and edit them directly.

Sub-agent File Structure

---
name: Agent Name
description: One-line description
---
 
# System prompt
 
You are... [personality and perspective]

Using Sub-agents

Reference them by name in your prompts:

Have the Skeptic review this proposal
Get feedback from all three sub-agents on this plan

They respond in character with their perspective.

Creating Your Own Sub-agents

Use the /agents command:

  1. Choose Project (this project only) or Personal (all projects)
  2. Claude helps you create the agent

Ideas for Useful Sub-agents

Sub-agentPerspective
Skeptical InvestorPressure-tests ideas and ROI
Confused BeginnerChecks if instructions are clear
Legal ReviewerSpots risks and compliance issues
Busy ExecutiveWants bottom line, no fluff

When to Use Sub-agents

  • Need thoughtful feedback from different viewpoints
  • Stress-testing proposals or plans
  • Getting diverse perspectives on a document
  • Simulating stakeholder reactions
  • Review from specific personas

Advisory Team Examples

ScenarioSub-agents
Resume reviewRecruiter + Hiring Manager + Career Coach
Business ideaSkeptical Investor + Target Customer + Realist
PresentationBusy Exec + Detail-Oriented Analyst + Skeptic
WritingEditor + Target Reader + Harsh Critic
Big decisionRisk-Averse + Opportunity-Focused + Practical

What’s Next

1.7: Project Memory (CLAUDE.md) → - Persistent context that survives sessions