Subagents
Specialized sub-agents with isolated context — a reviewer, researcher or debugger, each with its own tools and instructions.
Overview
The core benefit is context isolation: a reviewer reads the diff away from your main conversation, a researcher sweeps files without flooding your context with intermediate results — and several can run in parallel on large tasks.
Common patterns: a code-reviewer invoked proactively after edits, a debugger that takes a stack trace and returns the root cause, and a researcher that gathers codebase context before planning. They live in .claude/agents/ per project or ~/.claude/agents/ globally.
Who Is This For?
- Splitting large tasks across parallel specialized agents
- Automatic code review with a clean context after every change
- Isolating codebase research from the main conversation context
- Restricting a given agent to read-only tools for safety
Installation
mkdir -p .claude/agents
# Create reviewer.md with frontmatter: name, description, tools — Claude delegates matching tasks automatically. Configuration
---
name: code-reviewer
description: Reviews diffs for bugs and style. Use proactively after edits.
tools: Read, Grep, Bash
---
You are a strict senior reviewer... Explore AI Tools
Discover the best AI tools that complement your skills
Read AI & Design Articles
Tips and trends in the world of design and AI
Related Servers
Linear MCP Server
Manage Linear issues, projects, and workflows directly from your AI coding agent without leaving the terminal.
Playwright MCP
Automate browser interactions and run end-to-end tests through the Model Context Protocol, enabling AI agents to verify UI behavior in real browsers.
Jest Test Runner
Run, debug, and analyze Jest test suites directly from your AI agent. Quickly identify failing tests and get suggested fixes.