Loading...
Loading...
Compare original and translation side by side
---
name: subagent-name
description: When and why to invoke this subagent
tools: Read, Write, Grep, Glob # Optional - omit for full access
model: sonnet # Optional - sonnet/opus/haiku/inherit
------
name: subagent-name
description: When and why to invoke this subagent
tools: Read, Write, Grep, Glob # Optional - omit for full access
model: sonnet # Optional - sonnet/opus/haiku/inherit
---undefinedundefineddebuggertest-writersecurity-reviewerdata-analystdebuggertest-writersecurity-reviewerdata-analyst| Purpose Type | Recommended Tools | Reasoning |
|---|---|---|
| Code Review | Read, Grep, Glob | Read-only analysis, no modifications |
| Debugging | Read, Edit, Bash, Grep, Glob | Read code, make fixes, run tests |
| Test Writing | Read, Write, Grep, Glob | Read code, create test files |
| Refactoring | Read, Edit, Grep, Glob | Modify existing code safely |
| Documentation | Read, Write, Grep, Glob | Read code, create docs |
| Data Analysis | Read, Bash, Grep | Read data, run analysis commands |
| Security Audit | Read, Grep, Glob | Scan for vulnerabilities |
| Code Generation | Read, Write, Grep, Glob | Create new code from specs |
| Interactive Config | Read, Write, AskUserQuestion | Gather input, create configs |
| Full Workflow | (omit tools field) | Complex multi-step tasks |
tools| 任务类型 | 推荐工具 | 理由 |
|---|---|---|
| 代码审查 | Read, Grep, Glob | 仅需只读分析,无需修改 |
| 调试 | Read, Edit, Bash, Grep, Glob | 读取代码、修复问题、运行测试 |
| 测试用例编写 | Read, Write, Grep, Glob | 读取代码、创建测试文件 |
| 代码重构 | Read, Edit, Grep, Glob | 安全修改现有代码 |
| 文档编写 | Read, Write, Grep, Glob | 读取代码、创建文档 |
| 数据分析 | Read, Bash, Grep | 读取数据、运行分析命令 |
| 安全审计 | Read, Grep, Glob | 扫描漏洞 |
| 代码生成 | Read, Write, Grep, Glob | 根据需求创建新代码 |
| 交互式配置 | Read, Write, AskUserQuestion | 收集输入、创建配置 |
| 完整工作流 | (省略tools字段) | 复杂多步骤任务 |
tools| Model | Use When | Example Tasks |
|---|---|---|
| haiku | Fast, simple tasks | Quick formatting, simple validation, basic checks |
| sonnet | Balanced tasks (default) | Code review, debugging, test writing, most workflows |
| opus | Complex reasoning | Architecture design, complex refactoring, research |
| inherit | Match main conversation | When subagent should use same model as parent |
| 模型 | 适用场景 | 示例任务 |
|---|---|---|
| haiku | 快速、简单任务 | 快速格式化、简单验证、基础检查 |
| sonnet | 平衡型任务(默认) | 代码审查、调试、测试用例编写、大多数工作流 |
| opus | 复杂推理任务 | 架构设计、复杂重构、研究分析 |
| inherit | 与主对话保持一致 | 当子代理需要使用与父代理相同的模型时 |
[Purpose/expertise]. Invoke when [trigger conditions]. Handles [capabilities].description: Specialized in debugging complex code issues. Invoke when encountering bugs, test failures, or runtime errors. Analyzes stack traces, identifies root causes, suggests fixes, and validates solutions.description: Expert in writing comprehensive test cases. Invoke when creating tests, improving coverage, or validating functionality. Generates unit tests, integration tests, and edge case scenarios following project conventions.description: Security audit specialist focusing on vulnerability detection. Invoke when reviewing code for security issues, checking for common vulnerabilities, or performing security assessments. Identifies OWASP top 10 issues and suggests mitigations.[用途/专业领域]。当[触发条件]时调用。处理[能力范围]。description: 专注于排查复杂代码问题。当遇到bug、测试失败或运行时错误时调用。分析堆栈跟踪、识别根本原因、提供修复建议并验证解决方案。description: 擅长编写全面的测试用例。当创建测试、提升覆盖率或验证功能时调用。遵循项目规范生成单元测试、集成测试和边缘场景测试用例。description: 专注于漏洞检测的安全审计专家。当审查代码安全问题、检查常见漏洞或执行安全评估时调用。识别OWASP十大安全问题并提供缓解方案。undefinedundefinedundefinedundefined.claude/agents/agent-name.md~/.claude/agents/agent-name.md.claude/agents/agent-name.md~/.claude/agents/agent-name.md"Can you debug this test failure?"
→ Claude may automatically delegate to debugger subagent"Use the debugger subagent to investigate this error"
→ Explicitly invoke the subagent"Test the [subagent-name] subagent by [scenario]"
→ Validate it works as expected“你能排查这个测试失败的问题吗?”
→ Claude可能会自动委托给debugger子代理“使用debugger子代理来调查这个错误”
→ 显式调用子代理“通过[场景]测试[subagent-name]子代理”
→ 验证其是否按预期工作---
name: subagent-name # lowercase-with-hyphens
description: Clear purpose # When to invoke, what it does
------
tools: Read, Write, Grep # Comma-separated, omit for full access
model: sonnet # sonnet/opus/haiku/inherit (default: configured model)
------
name: subagent-name # 小写连字符格式
description: 清晰的用途描述 # 调用时机和功能说明
------
tools: Read, Write, Grep # 逗号分隔,省略则表示全权限访问
model: sonnet # sonnet/opus/haiku/inherit(默认:配置的模型)
---toolstoolsname: [domain]-analyzer
description: Analyzes [domain] for [issues]. Invoke when examining [context].
tools: Read, Grep, Glob
model: sonnetname: [domain]-analyzer
description: 分析[领域]中的[问题]。当检查[上下文]时调用。
tools: Read, Grep, Glob
model: sonnetname: [domain]-fixer
description: Fixes [issues] in [domain]. Invoke when encountering [problems].
tools: Read, Edit, Grep, Glob
model: sonnetname: [domain]-fixer
description: 修复[领域]中的[问题]。当遇到[故障]时调用。
tools: Read, Edit, Grep, Glob
model: sonnetname: [domain]-generator
description: Generates [artifacts] for [purpose]. Invoke when creating [items].
tools: Read, Write, Grep, Glob
model: sonnetname: [domain]-generator
description: 为[用途]生成[工件]。当创建[项目]时调用。
tools: Read, Write, Grep, Glob
model: sonnetname: [task]-runner
description: Executes [tasks] and reports results. Invoke when running [operations].
tools: Read, Bash, Grep, Glob
model: haikuname: [task]-runner
description: 执行[任务]并报告结果。当运行[操作]时调用。
tools: Read, Bash, Grep, Glob
model: haikuname: [domain]-researcher
description: Researches [topics] and provides insights. Invoke when investigating [subjects].
tools: Read, Grep, Glob, WebFetch, WebSearch
model: opusname: [domain]-researcher
description: 研究[主题]并提供见解。当调查[课题]时调用。
tools: Read, Grep, Glob, WebFetch, WebSearch
model: opusname: [system]-configurator
description: Configures [system] based on requirements. Invoke when setting up [components].
tools: Read, Write, AskUserQuestion
model: sonnetname: [system]-configurator
description: 根据需求配置[系统]。当设置[组件]时调用。
tools: Read, Write, AskUserQuestion
model: sonnetdebuggerdebugger---
name: test-writer
description: Specialized in writing comprehensive test cases. Invoke when creating tests, improving coverage, or validating functionality. Generates unit tests, integration tests, and edge case scenarios.
tools: Read, Write, Grep, Glob
model: sonnet
------
name: test-writer
description: 专注于编写全面的测试用例。当创建测试、提升覆盖率或验证功能时调用。生成单元测试、集成测试和边缘场景测试用例。
tools: Read, Write, Grep, Glob
model: sonnet
---undefinedundefined---
name: debugger
description: Expert in debugging complex issues. Invoke when encountering bugs, test failures, runtime errors, or unexpected behavior. Analyzes errors, identifies root causes, and suggests fixes.
tools: Read, Edit, Bash, Grep, Glob
model: sonnet
------
name: debugger
description: 擅长排查复杂问题。当遇到bug、测试失败、运行时错误或异常行为时调用。分析错误、识别根本原因并提供修复建议。
tools: Read, Edit, Bash, Grep, Glob
model: sonnet
---undefinedundefinedcode-refactorerrefactoring-specialist---
name: refactoring-specialist
description: Expert in refactoring code for improved maintainability, readability, and performance. Invoke when code needs restructuring, when tech debt needs addressing, or when improving code quality. Applies proven refactoring patterns while preserving functionality.
tools: Read, Edit, Grep, Glob
model: sonnet
---code-refactorerrefactoring-specialist---
name: refactoring-specialist
description: 擅长重构代码以提升可维护性、可读性和性能。当代码需要重构、技术债务需要处理或代码质量需要提升时调用。应用经过验证的重构模式,同时保留原有功能。
tools: Read, Edit, Grep, Glob
model: sonnet
---6. Provide usage examples
7. Suggest testing with specific refactoring scenario6. 提供使用示例
7. 建议通过特定重构场景进行测试"Resume the debugger subagent from conversation X to continue investigating"“从对话X恢复debugger子代理,继续调查问题”tools---
name: api-integrator
description: Integrates with external APIs using MCP serverstools---
name: api-integrator
description: 使用MCP服务器集成外部APIundefinedundefinedmodel: inherit # Use same model as parent conversationmodel: inherit # 使用与父对话相同的模型