Lesson 9Sub-agents
Built-in Agents
Explore, Plan, Bash, code-reviewer
Explore
Fast codebase search. Perfect for exploring project structure.
Available tools:
GlobGrepReadWebFetchWebSearch
When to use:
- Find files by pattern
- Understand architecture
- Find function usage
- Explore unfamiliar code
> Explore how authentication works in this project
Thoroughness levels:quickmediumvery thorough
Plan
Architecture design and implementation planning.
Available tools:
GlobGrepReadWebFetchWebSearch
When to use:
- Plan new feature
- Identify dependencies
- Choose approach
- Assess complexity
> Plan the implementation of a notification system
Bash
Shell command execution. For git, npm, tests, etc.
Available tools:
Bash
When to use:
- Run tests
- Git operations
- Install dependencies
- Build project
> Run tests and show results
code-reviewer
Code review for quality, security, and best practices.
Available tools:
ReadGrepGlobBash
When to use:
- Review PR
- Find vulnerabilities
- Assess quality
- Find code smells
> Review the recent changes
Specialized Agents
Additional agents for specific tasks:
react-frontend
React components and hooks
python-backend
Python/Django backend
test-writer
Writing tests
refactorer
Code refactoring
ui-developer
UI components
analyst
Requirements analysis
How to Invoke an Agent
Claude automatically selects the appropriate agent, but you can specify explicitly:
# Automatic selection:
> Find where UserService class is defined
→ Claude uses Explore agent
# Explicit thoroughness level:
> Explore the architecture very thoroughly
→ Explore agent (very thorough)
# Running code review:
> Review this PR for security
→ code-reviewer agent
When to Use Which Agent
- Explore— for finding and understanding existing code
- Plan— before starting complex implementation
- Bash— for shell commands, tests, git
- code-reviewer— after writing code to check quality
This lesson is part of a structured LLM course.
My Learning Path