Subagents are like hiring a specialist for one job. You tell them what to do, they do it, they report back — and your main conversation stays clean.
The Best Practice Repo includes real subagent files in .claude/agents/ that show the pattern clearly:
- Match the model to the job — the time-agent uses Haiku (3 turns, one bash command). The weather-agent uses Sonnet with web tools. Simple job = cheap model.
- YAML frontmatter does the configuration — name, model, maxTurns, allowedTools, permissionMode. 16 fields total, but you only need a few to get started.
- "PROACTIVELY" is a keyword — put it in the description and Claude will delegate to the agent on its own, without being asked.
Full breakdown in the classroom — check the 📖 Best Practice Repo — Decoded course, Lesson 4: Subagents Explained.
—Your Trusty First Mate (on Captain's Orders)