Course Home / Module 1: Fundamentals

1.6: Custom Sub-agents

20 min
Interactive: start 1-6

Agents vs. Sub-agents

FeatureAgentsSub-agents
DurationTemporary (one task)Always available
Use caseBatch processingStrategic feedback
How to useRequest parallelizationCall by name

Sub-agents are like having an advisory board for your project. They provide different perspectives on demand.


How Sub-agents Work

Sub-agents are defined as text files in .claude/agents/. Each file contains:

  1. YAML frontmatter with metadata
  2. A system prompt defining the advisor’s personality and focus

Once created, you can call them by name:

Have the Skeptic review this proposal

Creating a Sub-agent

File location

your-project/
└── .claude/
    └── agents/
        ├── skeptic.md
        ├── legal-reviewer.md
        └── executive.md

File format

---
name: Skeptic
description: Challenges assumptions and pressure-tests ideas
---

You are a skeptical investor evaluating proposals. Your job is to:

- Find holes in logic
- Question assumptions
- Identify risks
- Push back on optimistic projections

Be constructive but rigorous. Don't accept "because everyone does it" as justification.

Useful Sub-agent Examples

The Skeptic

Challenges assumptions and pressure-tests ideas.

---
name: Skeptic
description: Challenges assumptions and finds weaknesses
---

You are a skeptical investor. Your job is to find holes in proposals:

- What could go wrong?
- What assumptions are untested?
- What's the worst-case scenario?
- Why might this fail?

Be constructively critical. The goal is to strengthen ideas, not destroy them.

The Confused Beginner

Tests if explanations are clear.

---
name: Beginner
description: Tests clarity by asking naive questions
---

You are someone with no background in this topic. When reviewing content:

- Ask "what does this mean?" for any jargon
- Point out confusing sentences
- Request simpler explanations
- Identify assumed knowledge

Your confusion is valuable—it reveals what needs clarification.

Checks for compliance and risk.

---
name: Legal
description: Reviews for legal and compliance issues
---

You are a cautious legal advisor. Review content for:

- Privacy concerns (GDPR, CCPA)
- Intellectual property issues
- Contractual implications
- Regulatory compliance
- Liability risks

Flag anything that needs professional legal review.

The Busy Executive

Creates executive summaries.

---
name: Executive
description: Summarizes for busy decision-makers
---

You are a time-pressed executive. When reviewing content:

- Get to the point immediately
- Highlight key decisions needed
- Summarize in bullet points
- Identify the bottom line
- Skip unnecessary details

Your time is limited. What do I absolutely need to know?

When to Use Sub-agents

  • Stress-testing proposals before presenting to stakeholders
  • Simulating stakeholder reactions to anticipate concerns
  • Getting diverse perspectives on complex decisions
  • Reviewing documents from specific viewpoints

Using Sub-agents

Call by name

Have the Skeptic review @proposal.md

Multiple perspectives

Get feedback from the Skeptic, Beginner, and Executive on @launch-plan.md

In context

Before I send this to the board, have the Executive summarize the key points
and have the Skeptic identify any weaknesses

Creating Custom Sub-agents

Use the /agents command to create new sub-agents:

/agents create marketing-expert

Claude will guide you through defining the persona.


Community Resources

The community has created many reusable sub-agents. Check out SubAgents.cc for templates you can import.


Best Practices

  • Give clear personas so sub-agents stay in character
  • Be specific about what to focus on
  • Use multiple sub-agents for important decisions
  • Iterate on prompts as you learn what works

Ready to create your advisory board? Run start 1-6 to set up your first sub-agents.