How to Build Claude Subagents Better Than 99% of People
Nate Herk | AI Automation ·2026-06-09 ·2 min read
Summary written by us from the video's transcript. The video, and everything in it, is Nate Herk | AI Automation's work.
Learn how to create, configure, and use Claude Code sub‑agents—specialized parallel assistants that keep your main context clean and can run with different models and personas.
Takeaways
- Sub‑agents run in parallel sessions, preserving the main context window and allowing different models per task.
- Define sub‑agents with concise YAML front matter; precise descriptions improve trigger reliability.
- Custom agents are markdown files placed in *.claud* (project or global), making them portable and version‑controlled.
- Use built‑in agents for quick tasks, but create custom agents when you need specific personas, tools, or memory scopes.
- Iterate on descriptions whenever a sub‑agent misfires—adjust trigger phrases or resolve conflicts with similarly named skills.
What Sub‑Agents Are and Why They Matter
A sub‑agent is a separate chat session launched from the main Claude Code session. The main session acts as an orchestrator, delegating tasks like research or bug fixing to these agents and receiving concise reports back. Running work in parallel keeps the main context window clean, preventing token pollution as you add more information.
The demo shows five sub‑agents with distinct personas—beginner, software engineer, business owner, publisher—each receiving a tailored prompt (e.g., “Linda, 58, retired teacher, complete beginner”) and working independently.
Built‑In vs. Custom Sub‑Agents
Claude Code includes built‑in agents such as the research agent that can be invoked automatically. Custom sub‑agents are defined by a markdown file placed in a *.claud* folder (e.g., *skills/agent_builder.md* or *agents/clickup-searcher.md*). The file contains YAML front matter and the body that describes behavior, model, color, tools, etc.
The YAML front matter is crucial for “progressive disclosure”: Claude reads only the name and description to decide whether a sub‑agent matches a request, saving tokens when it isn’t needed.
Creating a Sub‑Agent in Cloud Code
In the UI click **Create → New Agent**, choose project or global scope, then either generate with Claude or edit manually. Provide a concise description that captures trigger phrases (e.g., “Trigger on ‘roast my plan’ or ‘review my plan’”), select tools (read‑only if desired), pick a model (Haiku, Opus, Sonnet), set a background color, and choose memory scope (project is typical).
Claude will generate a markdown file; you should trim the description to keep it focused for reliable triggering.
Fine‑Tuning Triggers and Avoiding Misfires
Misfires happen when an agent fires unexpectedly or fails to fire. Resolve them by iterating on the YAML description: make trigger phrases explicit, test, then adjust wording until Claude consistently selects the right sub‑agent.
If a skill with similar triggers exists (e.g., a generic “roast” skill), it may preempt the custom sub‑agent. You can resolve conflicts by making descriptions more specific or by invoking the sub‑agent explicitly in your prompt (“use the plan roaster sub‑agent”).
Practical Use Cases
*Research*: Spin off a researcher sub‑agent (e.g., using Haiku) to gather product details without filling the main context.
*Specialized Review*: A “plan roaster” sub‑agent critiques business ideas, providing adversarial feedback while keeping token usage low.
*Project‑Level Tools*: Agents like *clickup-searcher* can query project data and display results with a custom color for easy identification.