create-subagent
為 Claude Code 創建專業化的子代理
用戶需要有關創建和配置能夠處理複雜任務的專業 AI 助手的指導。此技能提供了模板、最佳實踐和構建有效子代理的逐步說明。
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「create-subagent」。 Create a code reviewer agent that checks for security issues
預期結果:
- Agent name: security-reviewer
- Tools: Read, Glob, Grep (read-only for safety)
- Model: opus (for thorough analysis)
- Triggers: Use PROACTIVELY when reviewing authentication, authorization, or data handling code
- Workflow: Threat modeling → Code review → Vulnerability search → Report
正在使用「create-subagent」。 How do I set up parallel debugging agents for different error types
預期結果:
- Dispatch 3 parallel agents: stack-trace-analyzer, log-investigator, state-inspector
- Each agent uses specialized prompts for their domain
- Synthesize findings after all agents complete their analysis
- Report combines insights from all three perspectives
正在使用「create-subagent」。 Create a research agent for API documentation
預期結果:
- Agent name: api-researcher
- Tools: Read, Glob, Grep, WebSearch, WebFetch (for external docs)
- Model: opus (for complex synthesis)
- Workflow: Plan investigation → Deep exploration → Synthesize → Report
- Outputs comprehensive API documentation with examples
安全審計
安全Pure documentation skill containing only markdown files. No executable code, network calls, file system access, or external command execution. Files contain guidance templates for configuring Claude Code subagents. All 157 static findings are false positives triggered by patterns inside markdown code blocks used as examples.
風險因素
⚙️ 外部命令 (94)
🌐 網路存取 (1)
品質評分
你能建構什麼
標準化代碼審查工作流程
創建專業化的審查者代理,在代碼更改後自動運行以進行一致的質量檢查。
更快地調試複雜問題
調度具有結構化工作流程的調試代理,以便在多個文件中進行根本原因分析。
並行研究和綜合
同時啟動多個研究代理,並將發現綜合成全面的架構報告。
試試這些提示
幫助我在 .claude/agents/ 中創建一個用於 [任務類型] 的基於文件的代理。包括名稱、帶有 PROACTIVELY 觸發的描述,以及基本工具權限。
向我展示如何使用 Task 工具調度一個 [模型] 代理來執行 [任務]。我需要哪些參數?
為 [角色] 創建一個完整的代理定義,包括角色定義、硬性規則、工作流程階段和輸出格式期望。
設置並行執行 [數量] 個 [模型] 代理來分析 [組件]。包括綜合步驟以合併發現。
最佳實務
- 在定義代理工具時使用最小權限原則 - 只授予代理真正需要的工具訪問權限
- 在描述中包含帶有 PROACTIVELY 的特定觸發條件以實現自動調用
- 為清晰起見,結構化代理提示為角色、約束、工作流程和輸出格式部分
避免
- 向每個代理授予所有工具會造成不必要的安全風險
- 沒有觸發條件的模糊描述會阻止自動調用
- 沒有結構的過長提示會使代理行為混亂