sub-agent-patterns by jezweb/claude-skills
npx skills add https://github.com/jezweb/claude-skills --skill sub-agent-patterns包含钩子
此技能使用 Claude 钩子,可以自动执行代码以响应事件。安装前请仔细审查。
状态 : 生产就绪 ✅ 最后更新 : 2026-02-02 来源 : https://code.claude.com/docs/en/sub-agents
子代理是 Claude Code 可以委派任务给的专业化 AI 助手。每个子代理都有自己的上下文窗口、可配置的工具和自定义系统提示。
子代理的主要价值不在于专业化——而在于保持您的主上下文清洁。
没有代理(上下文膨胀):
主上下文累积:
├─ git status 输出 (50 行)
├─ npm run build 输出 (200 行)
├─ tsc --noEmit 输出 (100 行)
├─ wrangler deploy 输出 (100 行)
├─ curl 健康检查响应
├─ 所有关于下一步做什么的推理
└─ 上下文: 📈 消耗 500+ 行
有代理(上下文整洁):
主上下文:
├─ "部署到 cloudflare"
├─ [代理摘要 - 30 行]
└─ 上下文: 📊 约消耗 50 行
代理上下文(隔离):
├─ 所有冗长的工具输出
├─ 所有中间推理
└─ 返回摘要后丢弃
计算:一个部署工作流运行约 10 个工具调用。在主上下文中是 500+ 行,而使用代理则是 30 行的摘要。在整个会话中,这会显著累积。
这种情况最重要的时候:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
关键见解:将代理用于您重复的工作流,而不仅仅是为了专业化。上下文节省会随着时间的推移而累积。
Claude Code 包含三个开箱即用的内置子代理:
快速、轻量级的代理,专为只读代码库探索而优化。
| 属性 | 值 |
|---|---|
| 模型 | Haiku(快速,低延迟) |
| 模式 | 严格只读 |
| 工具 | Glob, Grep, Read, Bash(只读:ls, git status, git log, git diff, find, cat, head, tail) |
详尽程度级别(调用时指定):
quick - 快速搜索,针对性查找medium - 速度与详尽性的平衡very thorough - 跨多个位置的全面分析Claude 何时使用它:在不进行更改的情况下搜索/理解代码库。发现的内容不会使主对话膨胀。
User: 客户端的错误在哪里处理?
Claude: [使用"medium"详尽程度调用探索代理]
→ 返回:src/services/process.ts:712
专为计划模式研究和信息收集而设计。
| 属性 | 值 |
|---|---|
| 模型 | Sonnet |
| 模式 | 只读研究 |
| 工具 | Read, Glob, Grep, Bash |
| 调用 | 在计划模式下自动调用 |
Claude 何时使用它:在计划模式下研究代码库以创建计划时。防止无限嵌套(子代理不能生成子代理)。
功能强大的代理,用于需要探索和操作的复杂、多步骤任务。
| 属性 | 值 |
|---|---|
| 模型 | Sonnet |
| 模式 | 读取和写入 |
| 工具 | 所有工具 |
| 目的 | 复杂研究、多步骤操作、代码修改 |
Claude 何时使用它:
| 类型 | 位置 | 范围 | 优先级 |
|---|---|---|---|
| 项目 | .claude/agents/ | 仅当前项目 | 最高 |
| 用户 | ~/.claude/agents/ | 所有项目 | 较低 |
| CLI | --agents '{...}' | 当前会话 | 中等 |
当名称冲突时,项目级别的优先。
⚠️ 关键:需要重启会话
代理仅在会话启动时加载。如果您在会话期间创建新的代理文件:
/agents 中这是自定义代理"不工作"的最常见原因——它们是在会话启动后创建的。
带有 YAML 前置元数据的 Markdown 文件:
---
name: code-reviewer
description: 专家代码审查员。在代码更改后主动使用。
tools: Read, Grep, Glob, Bash
model: inherit
permissionMode: default
skills: project-workflow
hooks:
PostToolUse:
- matcher: "Edit|Write"
hooks:
- type: command
command: "./scripts/run-linter.sh"
---
您的子代理系统提示写在这里。
包括具体的说明、最佳实践和约束。
| 字段 | 必需 | 描述 |
|---|---|---|
name | 是 | 唯一标识符(小写,连字符) |
description | 是 | Claude 何时应使用此代理 |
tools | 否 | 逗号分隔的列表。完全省略 = 继承所有工具(包括 MCP) |
model | 否 | sonnet, opus, haiku, 或 inherit。默认:sonnet |
permissionMode | 否 | default, acceptEdits, dontAsk, bypassPermissions, plan, ignore |
skills | 否 | 自动加载的逗号分隔技能(子代理不继承父级技能) |
hooks | 否 | PreToolUse, PostToolUse, Stop 事件处理程序 |
要从子代理访问 MCP 工具,您必须完全省略tools字段。
当您在 tools 字段中指定任何工具时,它将成为允许列表。没有通配符语法。
# ❌ 错误 - "*" 被字面解释为名为 "*" 的工具,而不是通配符
tools: Read, Grep, Glob, "*"
# ❌ 错误 - 这是一个允许列表,代理无法访问 MCP 工具
tools: Read, Grep, Glob
# ✅ 正确 - 完全省略 tools 字段以继承所有工具,包括 MCP
# tools 字段已省略
model: sonnet
关键见解:"*" 不是有效的通配符语法。解析时,它被视为不存在的字面工具名称。
需要重启代理:对代理配置文件的更改仅在重启 Claude Code 会话后生效。
可以分配给子代理的完整工具列表:
| 工具 | 目的 | 类型 |
|---|---|---|
| Read | 读取文件(文本、图像、PDF、笔记本) | 只读 |
| Write | 创建或覆盖文件 | 写入 |
| Edit | 文件中的精确字符串替换 | 写入 |
| MultiEdit | 对单个文件的批量编辑 | 写入 |
| Glob | 文件模式匹配(**/*.ts) | 只读 |
| Grep | 使用正则表达式的内容搜索(ripgrep) | 只读 |
| LS | 列出目录内容 | 只读 |
| Bash | 执行 shell 命令 | 执行 |
| BashOutput | 从后台 shell 获取输出 | 执行 |
| KillShell | 终止后台 shell | 执行 |
| Task | 生成子代理 | 编排 |
| WebFetch | 获取和分析网络内容 | 网络 |
| WebSearch | 搜索网络 | 网络 |
| TodoWrite | 创建/管理任务列表 | 组织 |
| TodoRead | 读取当前任务列表 | 组织 |
| NotebookRead | 读取 Jupyter 笔记本 | 笔记本 |
| NotebookEdit | 编辑 Jupyter 笔记本单元格 | 笔记本 |
| AskUserQuestion | 交互式用户提问 | UI |
| EnterPlanMode | 进入计划模式 | 规划 |
| ExitPlanMode | 退出计划模式并携带计划 | 规划 |
| Skill | 在对话中执行技能 | 技能 |
| LSP | 语言服务器协议集成 | 高级 |
| MCPSearch | MCP 工具发现 | 高级 |
按代理类型的工具访问模式:
| 代理类型 | 推荐工具 | 备注 |
|---|---|---|
| 只读审查员 | Read, Grep, Glob, LS | 无写入能力 |
| 文件创建者 | Read, Write, Edit, Glob, Grep | ⚠️ 无 Bash - 避免批准垃圾信息 |
| 脚本运行器 | Read, Write, Edit, Glob, Grep, Bash | 需要 CLI 执行时使用 |
| 研究代理 | Read, Grep, Glob, WebFetch, WebSearch | 只读外部访问 |
| 文档代理 | Read, Write, Edit, Glob, Grep, WebFetch | 无 Bash,工作流更简洁 |
| 编排器 | Read, Grep, Glob, Task | 最少工具,委派给专家 |
| 完全访问 | 省略 tools 字段(继承所有) | 谨慎使用 |
⚠️ 工具访问原则:如果代理不需要 Bash,就不要给它 Bash。每个 bash 命令都需要批准,会导致工作流中断。请参阅下面的"避免 Bash 批准垃圾信息"。
当子代理的工具列表中包含 Bash 时,它们通常默认使用 cat > file << 'EOF' heredocs 来创建文件,而不是使用 Write 工具。每个唯一的 bash 命令都需要用户批准,导致:
根本原因:
解决方案(按偏好顺序):
从工具列表中移除 Bash(如果不需要):
tools: Read, Write, Edit, Glob, Grep, Bash
# 之后 - 干净的文件操作
tools: Read, Write, Edit, Glob, Grep
如果代理只创建文件,它不需要 Bash。编排器可以在之后运行必要的脚本。
将关键说明放在最前面(紧接在前置元数据之后):
name: site-builder
tools: Read, Write, Edit, Glob, Grep
model: sonnet
---
## ⛔ 关键:对所有文件使用 WRITE 工具
**您没有 Bash 访问权限。** 使用 **Write 工具** 创建所有文件。
---
[提示的其余部分...]
顶部的说明会被遵循。埋没在 300 行深处的说明会被忽略。
移除矛盾的说明:
第 75 行:"使用 `cp -r intake/images/* build/images/` 复制图像"
第 300 行:"永远不要使用 cp、mkdir、cat 或 echo"
# 好 - 一致
只提及您想要使用的模式。如果您想要 Write 工具,请移除所有 bash 示例。
何时保留 Bash:
测试:移除 Bash 前后的对比:
/agents
交互式菜单用于:
claude --agents '{
"code-reviewer": {
"description": "专家代码审查员。在代码更改后主动使用。",
"prompt": "您是一名高级代码审查员。专注于代码质量、安全和最佳实践。",
"tools": ["Read", "Grep", "Glob", "Bash"],
"model": "sonnet"
}
}'
Claude 根据以下因素主动委派:
description 字段提示:在描述中包含"主动使用"或"必须使用"以获得更自动的调用。
> 使用 test-runner 子代理修复失败的测试
> 让 code-reviewer 子代理查看我最近的更改
> 请 debugger 子代理调查此错误
可以恢复子代理以继续之前的对话:
# 初始调用
> 使用 code-analyzer 代理审查 auth 模块
[代理完成,返回 agentId:"abc123"]
# 恢复完整上下文
> 恢复代理 abc123,现在分析授权逻辑
使用场景:
添加到 settings.json 权限:
{
"permissions": {
"deny": ["Task(Explore)", "Task(Plan)"]
}
}
或通过 CLI:
claude --disallowedTools "Task(Explore)"
子代理可以调用其他子代理,实现复杂的编排模式。这是通过将 Task 工具包含在代理的工具列表中实现的。
当子代理有权访问 Task 工具时,它可以:
生成其他子代理(内置或自定义)
跨专家协调并行工作
为多阶段工作流链接代理
---
name: release-orchestrator
description: 通过委派给专业代理来协调发布准备。在发布前使用。
tools: Read, Grep, Glob, Bash, Task
---
您是一名发布编排器。当被调用时:
1. 使用 Task 工具生成 code-reviewer 代理
→ 审查所有未提交的更改
2. 使用 Task 工具生成 test-runner 代理
→ 运行完整的测试套件
3. 使用 Task 工具生成 doc-validator 代理
→ 检查文档是否最新
4. 收集所有报告并综合:
- 阻塞项(发布前必须修复)
- 警告项(应解决)
- 准备发布:是/否
当任务独立时,并行生成代理。
在综合最终报告前等待所有代理。
多专家工作流:
User: "准备此代码库用于生产"
orchestrator 代理:
├─ Task(code-reviewer) → 审查代码质量
├─ Task(security-auditor) → 检查漏洞
├─ Task(performance-analyzer) → 识别瓶颈
└─ 将发现综合成可操作的报告
并行研究:
User: "为我们的用例比较这 5 个框架"
research-orchestrator:
├─ Task(general-purpose) → 研究框架 A
├─ Task(general-purpose) → 研究框架 B
├─ Task(general-purpose) → 研究框架 C
├─ Task(general-purpose) → 研究框架 D
├─ Task(general-purpose) → 研究框架 E
└─ 综合比较矩阵并给出推荐
| 层级 | 示例 | 状态 |
|---|---|---|
| 1 | Claude → orchestrator | ✅ 工作 |
| 2 | orchestrator → code-reviewer | ✅ 工作 |
| 3 | code-reviewer → sub-task | ⚠️ 工作但上下文变薄 |
| 4+ | 更深嵌套 | ❌ 不推荐 |
最佳实践:将编排保持在 2 层深度。超过此深度,上下文窗口会缩小,协调会变得脆弱。
| 使用编排 | 使用直接委派 |
|---|---|
| 复杂的多阶段工作流 | 单个专家任务 |
| 需要从多个来源综合 | 简单的审计或审查 |
| 并行执行重要 | 顺序执行即可 |
| 需要不同的专家 | 相同的代理类型 |
直接(更简单,通常足够):
User: "审查我的代码更改"
Claude: [直接调用 code-reviewer 代理]
编排(需要协调时):
User: "准备发布"
Claude: [调用 release-orchestrator]
orchestrator: [生成 code-reviewer, test-runner, doc-validator]
orchestrator: [综合所有报告]
[返回全面的发布准备报告]
Task 的编排器可以生成会话有权访问的任何代理inherit 则继承)将代理发送到后台,同时继续在主会话中工作:
在代理执行期间按 Ctrl+B 将其移至后台。
> 使用 research-agent 分析这 10 个框架
[代理开始工作...]
[按 Ctrl+B]
→ 代理在后台继续
→ 主会话空闲用于其他工作
→ 稍后检查结果:"research agent 发现了什么?"
使用场景:
质量优先方法:大多数代理默认使用 Sonnet。Haiku 节省的成本很少能抵消质量损失。
| 模型 | 最适合 | 速度 | 成本 | 质量 |
|---|---|---|---|---|
sonnet | 大多数代理的默认选择 - 内容生成、推理、文件创建 | 平衡 | 标准 | ✅ 高 |
opus | 创意工作、复杂推理、质量关键输出 | 较慢 | 高级 | ✅ 最高 |
haiku | 仅用于质量无关的简单脚本执行 | 2 倍更快 | 3 倍更便宜 | ⚠️ 可变 |
inherit | 匹配主对话 | 可变 | 可变 | 匹配父级 |
为什么默认使用 Sonnet?
测试显示显著的质量差异:
| 任务类型 | 推荐模型 | 原因 |
|---|---|---|
| 内容生成 | Sonnet | 质量重要 |
| 文件创建 | Sonnet | 模式必须正确 |
| 代码编写 | Sonnet | 错误代价高 |
| 审计/审查 | Sonnet | 需要判断力 |
| 创意工作 | Opus | 最高质量 |
| 部署脚本 | Haiku(可接受) | 仅运行命令 |
| 简单格式检查 | Haiku(可接受) | 仅通过/失败 |
模式:默认 Sonnet,创意使用 Opus,仅当质量确实不重要时才使用 Haiku:
---
name: site-builder
model: sonnet # 内容质量重要 - 不要用 haiku
tools: Read, Write, Edit, Glob, Grep
---
---
name: creative-director
model: opus # 创意工作需要最高质量
tools: Read, Write, Edit, Glob, Grep
---
---
name: deploy-runner
model: haiku # 仅运行 wrangler 命令 - 质量无关紧要
tools: Read, Bash
---
代理上下文使用情况在很大程度上取决于任务:
| 场景 | 上下文 | 工具调用 | 可行? |
|---|---|---|---|
| 深度研究代理 | 130k | 90+ | ✅ 是 |
| 多文件审计 | 80k+ | 50+ | ✅ 是 |
| 简单格式检查 | 3k | 5-10 | ✅ 是 |
| 链式编排 | 可变 | 可变 | ✅ 取决于任务 |
现实情况:当进行有意义的工作时,具有 90+ 工具调用和 130k 上下文的代理工作正常。限制因素是任务复杂性,而不是任意的令牌限制。
真正重要的是:
当上下文成为问题时:
通过明确的约束防止代理偏离到相邻领域:
---
name: frontend-specialist
description: 前端代码专家。从不编写后端逻辑。
tools: Read, Write, Edit, Glob, Grep
---
您是一名前端专家。
边界:
- 从不编写后端逻辑、API 路由或数据库查询
- 始终使用与代码库一致的 React 模式
- 如果任务需要后端工作,停止并报告"需要后端专家"
专注:
- React 组件、钩子、状态管理
- CSS/Tailwind 样式
- 客户端路由
- 浏览器 API
这可以防止代理遇到不熟悉的领域时产生幻觉。
钩子支持自动验证和反馈:
提交时阻止(强制执行质量门):
hooks:
PreToolUse:
- matcher: "Bash"
hooks:
- type: command
command: |
if [[ "$BASH_COMMAND" == *"git commit"* ]]; then
npm test || exit 1
fi
提示钩子(非阻塞反馈):
hooks:
PostToolUse:
- matcher: "Edit|Write"
hooks:
- type: command
command: "./scripts/lint-check.sh"
# 退出 0 继续,非零警告
最佳实践:在提交阶段验证,而不是在计划中期。让代理自由工作,在永久更改前发现问题。
Claude 在访问这些路径时自动从子目录加载 CLAUDE.md 文件:
project/
├── CLAUDE.md # 根上下文(始终加载)
├── src/
│ └── CLAUDE.md # 编辑 src/** 时加载
├── tests/
│ └── CLAUDE.md # 编辑 tests/** 时加载
└── docs/
└── CLAUDE.md # 编辑 docs/** 时加载
用于:目录特定的编码标准、本地模式、模块文档。
这是延迟加载的上下文——子代理获得相关上下文,而不会使主提示膨胀。
两种委派哲学:
自定义子代理(明确的专家):
Main Claude → task-runner agent → result
主克隆(动态委派):
Main Claude → Task(general-purpose) → result
推荐:对于定义明确、重复的任务使用自定义代理。对于主上下文重要的临时委派,使用 Task(general-purpose)。
最佳用例:重复但需要判断的任务。
✅ 适合:
- 审计 70 个技能(重复)检查版本与文档(判断)
- 更新 50 个文件(重复)决定需要更改什么(判断)
- 研究 10 个框架(重复)评估权衡(判断)
❌ 不适合:
- 简单的查找替换(不需要判断,使用 sed/grep)
- 单个复杂任务(不重复,自己完成)
- 具有跨项目依赖关系的任务(代理独立工作)
这个 5 步结构始终有效:
对于每个 [项目]:
1. 读取 [源文件/数据]
2. 使用 [外部检查 - npm view, API, 文档] 验证
3. 检查 [权威来源]
4. 评估/评分
5. 修复发现的问题 ← 关键:赋予代理采取行动的权限
关键要素:
| 批量大小 | 使用时机 |
|---|---|
| 3-5 个项目 | 复杂任务(深度研究、多步骤修复) |
| 5-8 个项目 | 标准任务(审计、更新、验证) |
| 8-12 个项目 | 简单任务(版本检查、格式修复) |
为什么不多一些?
并行代理:同时启动 2-4 个代理,每个都有自己的批次。
┌─────────────────────────────────────────────────────────────┐
│ 1. 计划:识别项目,分成批次 │
│ └─ "58 个技能 ÷ 每批 10 个 = 6 个代理" │
├─────────────────────────────────────────────────────────────┤
│ 2. 启动:使用相同提示的并行 Task 工具调用 │
│ └─ 相同的模板,不同的项目列表 │
├─────────────────────────────────────────────────────────────┤
│ 3. 等待:代理并行工作 │
│ └─ 读取 → 验证 → 检查 → 编辑 → 报告 │
├─────────────────────────────────────────────────────────────┤
│ 4. 审查:检查代理报告和文件更改 │
│ └─ git status,抽查差异 │
├─────────────────────────────────────────────────────────────┤
│ 5. 提交:使用有意义的变更日志批量更改 │
│ └─ 每个层级/类别一个提交,而不是每个代理一个 │
└─────────────────────────────────────────────────────────────┘
深度审计这 [N] 个 [项目]。对于每个:
1. 从 [路径] 读取 [源文件]
2. 使用 [命令或 API] 验证 [版本/数据]
3. 检查官方 [文档/来源] 的准确性
4. 评分 1-10 并记录任何问题
5. 直接在文件中修复发现的问题
要审计的项目:
- [项目-1]
- [项目-2]
- [项目-3]
对于每个项目,创建一个摘要,包含:
- 评分和状态(通过/需要更新)
- 发现的问题
- 应用的修复
- 修改的文件
工作目录:[绝对路径]
将这些 [N] 个 [项目] 更新到 [新标准/格式]。对于每个:
1. 读取 [路径模式] 处的当前文件
2. 识别需要更改的内容
3. 按照此模式应用更新:
[显示正确格式的示例]
4. 验证更改有效
5. 报告更改了什么
要更新的项目:
- [项目-1]
- [项目-2]
- [项目-3]
输出格式:
| 项目 | 状态 | 所做的更改 |
|------|--------|--------------|
工作目录:[绝对路径]
研究这 [N] 个 [选项/框架/工具]。对于每个:
1. 在 [URL 模式或搜索] 检查官方文档
2. 查找当前版本和最近更改
3. 识别与 [用例] 相关的关键特性
4. 记录任何陷阱、限制或已知问题
5. 评估对 [特定需求] 的适用性(1-10)
要研究的选项:
- [选项-1]
- [选项-2]
- [选项-3]
输出格式:
## [选项名称]
- **版本**:X.Y.Z
- **关键特性**:...
- **限制**:...
- **适用性评分**:X/10
- **推荐**:...
---
name: code-reviewer
description: 专家代码审查专家。主动审查代码质量、安全性和可维护性。在编写或修改代码后立即使用。
tools: Read, Grep, Glob, Bash
model: inherit
---
您是一名高级代码审查员,确保代码质量和安全的高标准。
当被调用时:
1. 运行 git diff 查看最近的更改
2. 专注于修改的文件
3. 立即开始审查
审查清单:
- 代码清晰易读
- 函数和变量命名良好
- 没有重复代码
- 适当的错误处理
- 没有暴露的密钥或 API 密钥
- 实现了输入验证
- 良好的测试覆盖率
- 考虑了性能问题
按优先级组织反馈:
- 关键问题(必须修复)
- 警告(应修复)
- 建议(考虑改进)
包括如何修复问题的具体示例。
---
name: debugger
description: 针对错误、测试失败和意外行为的调试专家。遇到任何问题时主动使用。
tools: Read, Edit, Bash, Grep, Glob
---
您是一名专门进行根本原因分析的专家调试器。
当被调用时:
1. 捕获错误消息和堆栈跟踪
2. 识别重现步骤
3. 隔离失败位置
4. 实施最小修复
5. 验证解决方案有效
调试过程:
- 分析错误消息和日志
- 检查最近的代码更改
- 形成并测试假设
- 添加战略性的调试日志
- 检查变量状态
对于每个问题,提供:
- 根本原因解释
- 支持诊断的证据
- 具体的代码修复
- 测试方法
- 预防建议
专注于修复根本问题,而不是症状。
---
name: data-scientist
description: SQL 查询、BigQuery 操作和数据洞察的数据分析专家。主动用于数据分析任务和查询。
tools: Bash, Read, Write
model: sonnet
---
您是一名专门从事 SQL 和 BigQuery 分析的数据科学家。
当被调用时:
1. 理解数据分析需求
2. 编写高效的 SQL 查询
3. 在适当时使用 BigQuery 命令行工具(bq)
4. 分析和总结结果
5. 清晰地呈现发现
关键实践:
- 使用适当的过滤器编写优化的 SQL 查询
- 使用适当的聚合和连接
- 包含解释复杂逻辑的注释
- 格式化结果以提高可读性
- 提供数据驱动的建议
始终确保查询高效且具有成本效益。
代理不提交 - 它们只编辑文件。这是设计使然:
| 代理做 | 人类做 |
|---|---|
| 研究和验证 | 审查更改 |
| 编辑文件 | 抽查差异 |
| 评分和报告 | git add/commit |
| 创建摘要 | 编写变更日志 |
为什么?
提交模式:
git add [文件] && git commit -m "$(cat <<'EOF'
[类型]([范围]): [摘要]
[批次 1 更改]
[批次 2 更改]
[批次 3 更改]
🤖 使用 [Claude Code](https://claude.com/claude-code) 生成
EOF
)"
git diff [文件] 查看更改了什么git checkout -- [文件] 恢复很少发生(代理处理不同的项目),但如果发生:
/agents 生成初始配置,然后自定义.claude/agents/ 检入 git 以便团队共享| 考虑因素 | 影响 |
|---|---|
| 上下文效率 | 代理保留主上下文,支持更长的会话 |
| 延迟 | 子代理从头开始,收集上下文可能会增加延迟 |
| 详尽性 | 探索代理的详尽性级别在速度和完整性之间权衡 |
内置代理:
Explore → Haiku,只读,quick/medium/thorough
Plan → Sonnet,计划模式研究
General → Sonnet,所有工具,读/写
自定义代理:
Project → .claude/agents/*.md(最高优先级
Contains Hooks
This skill uses Claude hooks which can execute code automatically in response to events. Review carefully before installing.
Status : Production Ready ✅ Last Updated : 2026-02-02 Source : https://code.claude.com/docs/en/sub-agents
Sub-agents are specialized AI assistants that Claude Code can delegate tasks to. Each sub-agent has its own context window, configurable tools, and custom system prompt.
The primary value of sub-agents isn't specialization—it's keeping your main context clean.
Without agent (context bloat):
Main context accumulates:
├─ git status output (50 lines)
├─ npm run build output (200 lines)
├─ tsc --noEmit output (100 lines)
├─ wrangler deploy output (100 lines)
├─ curl health check responses
├─ All reasoning about what to do next
└─ Context: 📈 500+ lines consumed
With agent (context hygiene):
Main context:
├─ "Deploy to cloudflare"
├─ [agent summary - 30 lines]
└─ Context: 📊 ~50 lines consumed
Agent context (isolated):
├─ All verbose tool outputs
├─ All intermediate reasoning
└─ Discarded after returning summary
The math : A deploy workflow runs ~10 tool calls. That's 500+ lines in main context vs 30-line summary with an agent. Over a session, this compounds dramatically.
When this matters most :
Key insight : Use agents for workflows you repeat , not just for specialization. The context savings compound over time.
Claude Code includes three built-in sub-agents available out of the box:
Fast, lightweight agent optimized for read-only codebase exploration.
| Property | Value |
|---|---|
| Model | Haiku (fast, low-latency) |
| Mode | Strictly read-only |
| Tools | Glob, Grep, Read, Bash (read-only: ls, git status, git log, git diff, find, cat, head, tail) |
Thoroughness levels (specify when invoking):
quick - Fast searches, targeted lookupsmedium - Balanced speed and thoroughnessvery thorough - Comprehensive analysis across multiple locationsWhen Claude uses it : Searching/understanding codebase without making changes. Findings don't bloat the main conversation.
User: Where are errors from the client handled?
Claude: [Invokes Explore with "medium" thoroughness]
→ Returns: src/services/process.ts:712
Specialized for plan mode research and information gathering.
| Property | Value |
|---|---|
| Model | Sonnet |
| Mode | Read-only research |
| Tools | Read, Glob, Grep, Bash |
| Invocation | Automatic in plan mode |
When Claude uses it : In plan mode when researching codebase to create a plan. Prevents infinite nesting (sub-agents cannot spawn sub-agents).
Capable agent for complex, multi-step tasks requiring both exploration AND action.
| Property | Value |
|---|---|
| Model | Sonnet |
| Mode | Read AND write |
| Tools | All tools |
| Purpose | Complex research, multi-step operations, code modifications |
When Claude uses it :
| Type | Location | Scope | Priority |
|---|---|---|---|
| Project | .claude/agents/ | Current project only | Highest |
| User | ~/.claude/agents/ | All projects | Lower |
| CLI | --agents '{...}' | Current session | Middle |
When names conflict, project-level takes precedence.
⚠️ CRITICAL: Session Restart Required
Agents are loaded at session startup only. If you create new agent files during a session:
/agentsThis is the most common reason custom agents "don't work" - they were created after the session started.
Markdown files with YAML frontmatter:
---
name: code-reviewer
description: Expert code reviewer. Use proactively after code changes.
tools: Read, Grep, Glob, Bash
model: inherit
permissionMode: default
skills: project-workflow
hooks:
PostToolUse:
- matcher: "Edit|Write"
hooks:
- type: command
command: "./scripts/run-linter.sh"
---
Your sub-agent's system prompt goes here.
Include specific instructions, best practices, and constraints.
| Field | Required | Description |
|---|---|---|
name | Yes | Unique identifier (lowercase, hyphens) |
description | Yes | When Claude should use this agent |
tools | No | Comma-separated list. Omit entirely = inherit ALL tools (including MCP) |
model | No | sonnet, opus, , or . Default: sonnet |
To access MCP tools from a sub-agent, you MUST omit thetools field entirely.
When you specify ANY tools in the tools field, it becomes an allowlist. There is no wildcard syntax.
# ❌ WRONG - "*" is interpreted literally as a tool named "*", not a wildcard
tools: Read, Grep, Glob, "*"
# ❌ WRONG - this is an allowlist, agent cannot access MCP tools
tools: Read, Grep, Glob
# ✅ CORRECT - omit tools field entirely to inherit ALL tools including MCP
# tools field omitted
model: sonnet
Key insight : The "*" is NOT valid wildcard syntax. When parsed, it's treated as a literal tool name that doesn't exist.
Agent restart required : Changes to agent config files only take effect after restarting Claude Code session.
Complete list of tools that can be assigned to sub-agents:
| Tool | Purpose | Type |
|---|---|---|
| Read | Read files (text, images, PDFs, notebooks) | Read-only |
| Write | Create or overwrite files | Write |
| Edit | Exact string replacements in files | Write |
| MultiEdit | Batch edits to single file | Write |
| Glob | File pattern matching (**/*.ts) | Read-only |
| Grep | Content search with regex (ripgrep) | Read-only |
| LS | List directory contents | Read-only |
Tool Access Patterns by Agent Type:
| Agent Type | Recommended Tools | Notes |
|---|---|---|
| Read-only reviewers | Read, Grep, Glob, LS | No write capability |
| File creators | Read, Write, Edit, Glob, Grep | ⚠️ No Bash - avoids approval spam |
| Script runners | Read, Write, Edit, Glob, Grep, Bash | Use when CLI execution needed |
| Research agents | Read, Grep, Glob, WebFetch, WebSearch | Read-only external access |
| Documentation | Read, Write, Edit, Glob, Grep, WebFetch |
⚠️ Tool Access Principle : If an agent doesn't need Bash, don't give it Bash. Each bash command requires approval, causing workflow interruptions. See "Avoiding Bash Approval Spam" below.
When sub-agents have Bash in their tools list, they often default to using cat > file << 'EOF' heredocs for file creation instead of the Write tool. Each unique bash command requires user approval, causing:
Root Causes :
Solutions (in order of preference):
Remove Bash from tools list (if not needed):
tools: Read, Write, Edit, Glob, Grep, Bash
# After - clean file operations
tools: Read, Write, Edit, Glob, Grep
If the agent only creates files, it doesn't need Bash. The orchestrator can run necessary scripts after.
Put critical instructions FIRST (immediately after frontmatter):
name: site-builder
tools: Read, Write, Edit, Glob, Grep
model: sonnet
---
## ⛔ CRITICAL: USE WRITE TOOL FOR ALL FILES
**You do NOT have Bash access.** Create ALL files using the **Write tool**.
---
[rest of prompt...]
Instructions at the top get followed. Instructions buried 300 lines deep get ignored.
Remove contradictory instructions :
Line 75: "Copy images with `cp -r intake/images/* build/images/`"
Line 300: "NEVER use cp, mkdir, cat, or echo"
# GOOD - consistent
Only mention the pattern you want used. Remove all bash examples if you want Write tool.
When to keep Bash:
Testing : Before vs after removing Bash:
/agents
Interactive menu to:
claude --agents '{
"code-reviewer": {
"description": "Expert code reviewer. Use proactively after code changes.",
"prompt": "You are a senior code reviewer. Focus on code quality, security, and best practices.",
"tools": ["Read", "Grep", "Glob", "Bash"],
"model": "sonnet"
}
}'
Claude proactively delegates based on:
description field in sub-agent configTip : Include "use PROACTIVELY" or "MUST BE USED" in description for more automatic invocation.
> Use the test-runner subagent to fix failing tests
> Have the code-reviewer subagent look at my recent changes
> Ask the debugger subagent to investigate this error
Sub-agents can be resumed to continue previous conversations:
# Initial invocation
> Use the code-analyzer agent to review the auth module
[Agent completes, returns agentId: "abc123"]
# Resume with full context
> Resume agent abc123 and now analyze the authorization logic
Use cases :
Add to settings.json permissions:
{
"permissions": {
"deny": ["Task(Explore)", "Task(Plan)"]
}
}
Or via CLI:
claude --disallowedTools "Task(Explore)"
Sub-agents can invoke other sub-agents, enabling sophisticated orchestration patterns. This is accomplished by including the Task tool in an agent's tool list.
When a sub-agent has access to the Task tool, it can:
Spawn other sub-agents (built-in or custom)
Coordinate parallel work across specialists
Chain agents for multi-phase workflows
---
name: release-orchestrator
description: Coordinates release preparation by delegating to specialized agents. Use before releases.
tools: Read, Grep, Glob, Bash, Task
---
You are a release orchestrator. When invoked:
1. Use Task tool to spawn code-reviewer agent
→ Review all uncommitted changes
2. Use Task tool to spawn test-runner agent
→ Run full test suite
3. Use Task tool to spawn doc-validator agent
→ Check documentation is current
4. Collect all reports and synthesize:
- Blockers (must fix before release)
- Warnings (should address)
- Ready to release: YES/NO
Spawn agents in parallel when tasks are independent.
Wait for all agents before synthesizing final report.
Multi-Specialist Workflow:
User: "Prepare this codebase for production"
orchestrator agent:
├─ Task(code-reviewer) → Reviews code quality
├─ Task(security-auditor) → Checks for vulnerabilities
├─ Task(performance-analyzer) → Identifies bottlenecks
└─ Synthesizes findings into actionable report
Parallel Research:
User: "Compare these 5 frameworks for our use case"
research-orchestrator:
├─ Task(general-purpose) → Research framework A
├─ Task(general-purpose) → Research framework B
├─ Task(general-purpose) → Research framework C
├─ Task(general-purpose) → Research framework D
├─ Task(general-purpose) → Research framework E
└─ Synthesizes comparison matrix with recommendation
| Level | Example | Status |
|---|---|---|
| 1 | Claude → orchestrator | ✅ Works |
| 2 | orchestrator → code-reviewer | ✅ Works |
| 3 | code-reviewer → sub-task | ⚠️ Works but context gets thin |
| 4+ | Deeper nesting | ❌ Not recommended |
Best practice : Keep orchestration to 2 levels deep. Beyond that, context windows shrink and coordination becomes fragile.
| Use Orchestration | Use Direct Delegation |
|---|---|
| Complex multi-phase workflows | Single specialist task |
| Need to synthesize from multiple sources | Simple audit or review |
| Parallel execution important | Sequential is fine |
| Different specialists required | Same agent type |
Direct (simpler, often sufficient):
User: "Review my code changes"
Claude: [Invokes code-reviewer agent directly]
Orchestrated (when coordination needed):
User: "Prepare release"
Claude: [Invokes release-orchestrator]
orchestrator: [Spawns code-reviewer, test-runner, doc-validator]
orchestrator: [Synthesizes all reports]
[Returns comprehensive release readiness report]
Task can spawn any agent the session has access toinherit)Send agents to the background while continuing work in your main session:
Ctrl+B during agent execution moves it to background.
> Use the research-agent to analyze these 10 frameworks
[Agent starts working...]
[Press Ctrl+B]
→ Agent continues in background
→ Main session free for other work
→ Check results later with: "What did the research agent find?"
Use cases :
Quality-First Approach : Default to Sonnet for most agents. The cost savings from Haiku rarely outweigh the quality loss.
| Model | Best For | Speed | Cost | Quality |
|---|---|---|---|---|
sonnet | Default for most agents - content generation, reasoning, file creation | Balanced | Standard | ✅ High |
opus | Creative work, complex reasoning, quality-critical outputs | Slower | Premium | ✅ Highest |
haiku | Only for simple script execution where quality doesn't matter | 2x faster | 3x cheaper | ⚠️ Variable |
Why Sonnet Default?
Testing showed significant quality differences:
| Task Type | Recommended Model | Why |
|---|---|---|
| Content generation | Sonnet | Quality matters |
| File creation | Sonnet | Patterns must be correct |
| Code writing | Sonnet | Bugs are expensive |
| Audits/reviews | Sonnet | Judgment required |
| Creative work | Opus | Maximum quality |
| Deploy scripts | Haiku (OK) | Just running commands |
| Simple format checks | Haiku (OK) | Pass/fail only |
Pattern : Default Sonnet, use Opus for creative, Haiku only when quality truly doesn't matter:
---
name: site-builder
model: sonnet # Content quality matters - NOT haiku
tools: Read, Write, Edit, Glob, Grep
---
---
name: creative-director
model: opus # Creative work needs maximum quality
tools: Read, Write, Edit, Glob, Grep
---
---
name: deploy-runner
model: haiku # Just running wrangler commands - quality irrelevant
tools: Read, Bash
---
Agent context usage depends heavily on the task:
| Scenario | Context | Tool Calls | Works? |
|---|---|---|---|
| Deep research agent | 130k | 90+ | ✅ Yes |
| Multi-file audit | 80k+ | 50+ | ✅ Yes |
| Simple format check | 3k | 5-10 | ✅ Yes |
| Chained orchestration | Varies | Varies | ✅ Depends on task |
Reality : Agents with 90+ tool calls and 130k context work fine when doing meaningful work. The limiting factor is task complexity, not arbitrary token limits.
What actually matters :
When context becomes a problem :
Prevent agents from drifting into adjacent domains with explicit constraints:
---
name: frontend-specialist
description: Frontend code expert. NEVER writes backend logic.
tools: Read, Write, Edit, Glob, Grep
---
You are a frontend specialist.
BOUNDARIES:
- NEVER write backend logic, API routes, or database queries
- ALWAYS use React patterns consistent with the codebase
- If task requires backend work, STOP and report "Requires backend specialist"
FOCUS:
- React components, hooks, state management
- CSS/Tailwind styling
- Client-side routing
- Browser APIs
This prevents hallucination when agents encounter unfamiliar domains.
Hooks enable automated validation and feedback:
Block-at-commit (enforce quality gates):
hooks:
PreToolUse:
- matcher: "Bash"
hooks:
- type: command
command: |
if [[ "$BASH_COMMAND" == *"git commit"* ]]; then
npm test || exit 1
fi
Hint hooks (non-blocking feedback):
hooks:
PostToolUse:
- matcher: "Edit|Write"
hooks:
- type: command
command: "./scripts/lint-check.sh"
# Exits 0 to continue, non-zero to warn
Best practice : Validate at commit stage, not mid-plan. Let agents work freely, catch issues before permanent changes.
Claude automatically loads CLAUDE.md files from subdirectories when accessing those paths:
project/
├── CLAUDE.md # Root context (always loaded)
├── src/
│ └── CLAUDE.md # Loaded when editing src/**
├── tests/
│ └── CLAUDE.md # Loaded when editing tests/**
└── docs/
└── CLAUDE.md # Loaded when editing docs/**
Use for : Directory-specific coding standards, local patterns, module documentation.
This is lazy-loaded context - sub-agents get relevant context without bloating main prompt.
Two philosophies for delegation:
Custom Subagents (explicit specialists):
Main Claude → task-runner agent → result
Master-Clone (dynamic delegation):
Main Claude → Task(general-purpose) → result
Recommendation : Use custom agents for well-defined, repeated tasks. Use Task(general-purpose) for ad-hoc delegation where main context matters.
Best use case : Tasks that are repetitive but require judgment.
✅ Good fit:
- Audit 70 skills (repetitive) checking versions against docs (judgment)
- Update 50 files (repetitive) deciding what needs changing (judgment)
- Research 10 frameworks (repetitive) evaluating trade-offs (judgment)
❌ Poor fit:
- Simple find-replace (no judgment needed, use sed/grep)
- Single complex task (not repetitive, do it yourself)
- Tasks with cross-item dependencies (agents work independently)
This 5-step structure works consistently:
For each [item]:
1. Read [source file/data]
2. Verify with [external check - npm view, API, docs]
3. Check [authoritative source]
4. Evaluate/score
5. FIX issues found ← Critical: gives agent authority to act
Key elements:
| Batch Size | Use When |
|---|---|
| 3-5 items | Complex tasks (deep research, multi-step fixes) |
| 5-8 items | Standard tasks (audits, updates, validations) |
| 8-12 items | Simple tasks (version checks, format fixes) |
Why not more?
Parallel agents : Launch 2-4 agents simultaneously, each with their own batch.
┌─────────────────────────────────────────────────────────────┐
│ 1. PLAN: Identify items, divide into batches │
│ └─ "58 skills ÷ 10 per batch = 6 agents" │
├─────────────────────────────────────────────────────────────┤
│ 2. LAUNCH: Parallel Task tool calls with identical prompts │
│ └─ Same template, different item lists │
├─────────────────────────────────────────────────────────────┤
│ 3. WAIT: Agents work in parallel │
│ └─ Read → Verify → Check → Edit → Report │
├─────────────────────────────────────────────────────────────┤
│ 4. REVIEW: Check agent reports and file changes │
│ └─ git status, spot-check diffs │
├─────────────────────────────────────────────────────────────┤
│ 5. COMMIT: Batch changes with meaningful changelog │
│ └─ One commit per tier/category, not per agent │
└─────────────────────────────────────────────────────────────┘
Deep audit these [N] [items]. For each:
1. Read the [source file] from [path]
2. Verify [versions/data] with [command or API]
3. Check official [docs/source] for accuracy
4. Score 1-10 and note any issues
5. FIX issues found directly in the file
Items to audit:
- [item-1]
- [item-2]
- [item-3]
For each item, create a summary with:
- Score and status (PASS/NEEDS_UPDATE)
- Issues found
- Fixes applied
- Files modified
Working directory: [absolute path]
Update these [N] [items] to [new standard/format]. For each:
1. Read the current file at [path pattern]
2. Identify what needs changing
3. Apply the update following this pattern:
[show example of correct format]
4. Verify the change is valid
5. Report what was changed
Items to update:
- [item-1]
- [item-2]
- [item-3]
Output format:
| Item | Status | Changes Made |
|------|--------|--------------|
Working directory: [absolute path]
Research these [N] [options/frameworks/tools]. For each:
1. Check official documentation at [URL pattern or search]
2. Find current version and recent changes
3. Identify key features relevant to [use case]
4. Note any gotchas, limitations, or known issues
5. Rate suitability for [specific need] (1-10)
Options to research:
- [option-1]
- [option-2]
- [option-3]
Output format:
## [Option Name]
- **Version**: X.Y.Z
- **Key Features**: ...
- **Limitations**: ...
- **Suitability Score**: X/10
- **Recommendation**: ...
---
name: code-reviewer
description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
tools: Read, Grep, Glob, Bash
model: inherit
---
You are a senior code reviewer ensuring high standards of code quality and security.
When invoked:
1. Run git diff to see recent changes
2. Focus on modified files
3. Begin review immediately
Review checklist:
- Code is clear and readable
- Functions and variables are well-named
- No duplicated code
- Proper error handling
- No exposed secrets or API keys
- Input validation implemented
- Good test coverage
- Performance considerations addressed
Provide feedback organized by priority:
- Critical issues (must fix)
- Warnings (should fix)
- Suggestions (consider improving)
Include specific examples of how to fix issues.
---
name: debugger
description: Debugging specialist for errors, test failures, and unexpected behavior. Use proactively when encountering any issues.
tools: Read, Edit, Bash, Grep, Glob
---
You are an expert debugger specializing in root cause analysis.
When invoked:
1. Capture error message and stack trace
2. Identify reproduction steps
3. Isolate the failure location
4. Implement minimal fix
5. Verify solution works
Debugging process:
- Analyze error messages and logs
- Check recent code changes
- Form and test hypotheses
- Add strategic debug logging
- Inspect variable states
For each issue, provide:
- Root cause explanation
- Evidence supporting the diagnosis
- Specific code fix
- Testing approach
- Prevention recommendations
Focus on fixing the underlying issue, not the symptoms.
---
name: data-scientist
description: Data analysis expert for SQL queries, BigQuery operations, and data insights. Use proactively for data analysis tasks and queries.
tools: Bash, Read, Write
model: sonnet
---
You are a data scientist specializing in SQL and BigQuery analysis.
When invoked:
1. Understand the data analysis requirement
2. Write efficient SQL queries
3. Use BigQuery command line tools (bq) when appropriate
4. Analyze and summarize results
5. Present findings clearly
Key practices:
- Write optimized SQL queries with proper filters
- Use appropriate aggregations and joins
- Include comments explaining complex logic
- Format results for readability
- Provide data-driven recommendations
Always ensure queries are efficient and cost-effective.
Agents don't commit - they only edit files. This is by design:
| Agent Does | Human Does |
|---|---|
| Research & verify | Review changes |
| Edit files | Spot-check diffs |
| Score & report | git add/commit |
| Create summaries | Write changelog |
Why?
Commit pattern:
git add [files] && git commit -m "$(cat <<'EOF'
[type]([scope]): [summary]
[Batch 1 changes]
[Batch 2 changes]
[Batch 3 changes]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
git diff [file] to see what changedgit checkout -- [file] to revertRare (agents work on different items), but if it happens:
/agents to generate initial config, then customize.claude/agents/ into git for team sharing| Consideration | Impact |
|---|---|
| Context efficiency | Agents preserve main context, enabling longer sessions |
| Latency | Sub-agents start fresh, may add latency gathering context |
| Thoroughness | Explore agent's thoroughness levels trade speed for completeness |
Built-in agents:
Explore → Haiku, read-only, quick/medium/thorough
Plan → Sonnet, plan mode research
General → Sonnet, all tools, read/write
Custom agents:
Project → .claude/agents/*.md (highest priority)
User → ~/.claude/agents/*.md
CLI → --agents '{...}'
Config fields:
name, description (required)
tools, model, permissionMode, skills, hooks (optional)
Tool access principle:
⚠️ Don't give Bash unless agent needs CLI execution
File creators: Read, Write, Edit, Glob, Grep (no Bash!)
Script runners: Read, Write, Edit, Glob, Grep, Bash (only if needed)
Research: Read, Grep, Glob, WebFetch, WebSearch
Model selection (quality-first):
Default: sonnet (most agents - quality matters)
Creative: opus (maximum quality)
Scripts only: haiku (just running commands)
⚠️ Avoid Haiku for content generation - quality drops significantly
Instruction placement:
⛔ Critical instructions go FIRST (right after frontmatter)
⚠️ Instructions buried 300+ lines deep get ignored
✅ Remove contradictory instructions (pick one pattern)
Delegation:
Batch size: 5-8 items per agent
Parallel: 2-4 agents simultaneously
Prompt: 5-step (read → verify → check → evaluate → FIX)
Orchestration:
Enable: Add "Task" to agent's tools list
Depth: Keep to 2 levels max
Use: Multi-phase workflows, parallel specialists
Advanced:
Background: Ctrl+B during agent execution
Context: 130k+ and 90+ tool calls work fine for real work
Hooks: PreToolUse, PostToolUse, Stop events
Resume agents:
> Resume agent [agentId] and continue...
Last Updated : 2026-02-02
Weekly Installs
396
Repository
GitHub Stars
643
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code337
opencode275
gemini-cli270
cursor250
antigravity246
codex235
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
138,300 周安装
社交媒体内容策略指南:LinkedIn、Twitter、Instagram、TikTok、Facebook平台优化与内容创作模板
303 周安装
data-extractor 数据提取技能:从PDF、Word、Excel等文档自动提取结构化数据
304 周安装
架构决策框架:需求驱动架构设计,ADR记录决策,权衡分析指南
304 周安装
使用reveal.js创建HTML幻灯片 | 交互式演示文稿制作工具 | 代码高亮与动画效果
304 周安装
移动应用发布策略指南:从ASO优化到推广渠道的完整发布计划
304 周安装
计分卡营销系统:四步法生成高转化率潜在客户,互动评估提升线索质量
304 周安装
haikuinheritpermissionMode | No | default, acceptEdits, dontAsk, bypassPermissions, plan, ignore |
skills | No | Comma-separated skills to auto-load (sub-agents don't inherit parent skills) |
hooks | No | PreToolUse, PostToolUse, Stop event handlers |
| Bash | Execute shell commands | Execute |
| BashOutput | Get output from background shells | Execute |
| KillShell | Terminate background shell | Execute |
| Task | Spawn sub-agents | Orchestration |
| WebFetch | Fetch and analyze web content | Web |
| WebSearch | Search the web | Web |
| TodoWrite | Create/manage task lists | Organization |
| TodoRead | Read current task list | Organization |
| NotebookRead | Read Jupyter notebooks | Notebook |
| NotebookEdit | Edit Jupyter notebook cells | Notebook |
| AskUserQuestion | Interactive user questions | UI |
| EnterPlanMode | Enter planning mode | Planning |
| ExitPlanMode | Exit planning mode with plan | Planning |
| Skill | Execute skills in conversation | Skills |
| LSP | Language Server Protocol integration | Advanced |
| MCPSearch | MCP tool discovery | Advanced |
| No Bash for cleaner workflow |
| Orchestrators | Read, Grep, Glob, Task | Minimal tools, delegates to specialists |
| Full access | Omit tools field (inherits all) | Use sparingly |
inherit| Match main conversation |
| Varies |
| Varies |
| Matches parent |