代理系统
Claude Code 有 6 种内置代理类型。每种都是为特定目的构建的,具有特定的模型、工具集和权限模式。子代理根据任务自动生成。
6 代理类型 3 使用的不同模型 34M+ 每周生成次数
i Explore 和 Plan 代理省略 CLAUDE.md
Explore 和 Plan 代理故意跳过从上下文加载 CLAUDE.md 和 git 状态。
这在 34M+ 次生成时每周节省约 5-15 Gtok。如果你需要这些代理遵循项目约定,
请直接在提示词中包含相关规则。
01
General-Purpose
The default workhorse
Model Inherits from parent
Tools All tools (*)
Use case
Complex research, multi-step search, tasks that require the full tool set
- · No tool restrictions
- · Model inherits from parent session
- · Used when no specialized agent fits
02
Explore
Read-only codebase explorer
Model Haiku (external) / Inherits (internal)
Tools All except Agent, Edit, Write, ExitPlanMode, NotebookEdit
Use case
Codebase searches, quick lookups, exploring file structure
× Cannot modify files. Cannot spawn sub-agents.
- · Uses cheaper Haiku model for external users
- · Minimum 3 queries enforced before returning results
- · Omits CLAUDE.md from context to save tokens
- · Saves ~5–15 Gtok/week at 34M+ spawns
03
Plan
Architecture and strategy designer
Model Inherits from parent
Tools Read-only (no Edit, Write, Agent, ExitPlanMode)
Use case
Design implementation strategy, identify critical files, consider trade-offs
× Cannot modify files.
- · Required output: list of 3–5 critical files for implementation
- · Omits CLAUDE.md and git status from context
- · Focuses purely on design decisions
04
Verification
Automated quality gate
Model Inherits from parent
Tools Read-only verification tools
Permission Mode
Always runs in background
Use case
Verify implementations are correct after code changes
- · Always runs in the background (non-blocking)
- · Displays in red in the terminal to stand out
- · Must end with one of: VERDICT: PASS, VERDICT: FAIL, or VERDICT: PARTIAL
- · Useful as an automated quality gate in CI/CD
05
Claude Code Guide
Documentation assistant
Model Haiku
Tools Glob, Grep, Read, WebFetch, WebSearch
Permission Mode
dontAsk (auto-denies prompts)
Use case
Answer questions about Claude Code features, API, CLI, MCP servers
- · Uses cheaper Haiku model
- · Auto-denies permission prompts (dontAsk mode)
- · Sources: official Claude Code and Anthropic API docs
- · Specialized for documentation lookups only
06
Status Line Setup
Config file editor
Model Sonnet
Tools Read and Edit only
Use case
Configure the Claude Code terminal status line setting
- · Extremely restricted tool set: only Read + Edit
- · Cannot run shell commands or access the web
- · Focused single-purpose agent