Notes on building software.
A personal blog of technical articles about software development.
What Are Subagents and When to Use Them
Subagents run in their own context window, so you can hand off focused work without cluttering your main session.
Creating Your First Subagent Definition
A subagent is just a Markdown file with frontmatter and a system prompt you drop into .claude/agents.
Giving Subagents the Right Tools
The tools field is an allowlist, so you can hand a subagent exactly the tools it needs and nothing more.
Choosing a Model for Each Subagent
Set a model alias per subagent so cheap jobs run on a fast model and hard jobs get a stronger one.
Invoking Subagents Explicitly vs Automatically
You can name a subagent directly, let Claude delegate by description, or start a whole session as one agent.
The Built-in Explore, Plan, and General-Purpose Agents
Claude Code ships with three ready-made agents: Explore for search, Plan for design, and general-purpose for anything.