i18n/zh-TW/intelligent-routing/SKILL.md
自動代理選擇與智慧任務路由。分析使用者請求並自動選擇最佳專家代理,無需使用者明確提及。
npx skillsauth add tai-ch0802/skills-bundle intelligent-routingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
目的:自動分析使用者請求,並將其路由到最適當的專家代理,無需使用者明確提及。
AI 應該擔任智慧專案經理,分析每個請求並自動選擇最佳專家。
在回應任何使用者請求前,執行自動分析:
graph TD
A[使用者請求:新增登入] --> B[分析]
B --> C[關鍵字]
B --> D[領域]
B --> E[複雜度]
C --> F[選擇代理]
D --> F
E --> F
F --> G[security-auditor + backend-specialist]
G --> H[自動調用並附帶情境]
使用此矩陣自動選擇代理:
| 使用者意圖 | 關鍵字 | 選擇的代理 | 自動調用? |
|-----------|--------|-----------|-----------|
| 驗證 | 「login」、「auth」、「signup」、「password」 | security-auditor + backend-specialist | ✅ 是 |
| UI 元件 | 「button」、「card」、「layout」、「style」 | frontend-specialist | ✅ 是 |
| 行動 UI | 「screen」、「navigation」、「touch」、「gesture」 | mobile-developer | ✅ 是 |
| API 端點 | 「endpoint」、「route」、「API」、「POST」、「GET」 | backend-specialist | ✅ 是 |
| 資料庫 | 「schema」、「migration」、「query」、「table」 | database-architect + backend-specialist | ✅ 是 |
| Bug 修復 | 「error」、「bug」、「not working」、「broken」 | debugger | ✅ 是 |
| 測試 | 「test」、「coverage」、「unit」、「e2e」 | test-engineer | ✅ 是 |
| 部署 | 「deploy」、「production」、「CI/CD」、「docker」 | devops-engineer | ✅ 是 |
| 安全審查 | 「security」、「vulnerability」、「exploit」 | security-auditor + penetration-tester | ✅ 是 |
| 效能 | 「slow」、「optimize」、「performance」、「speed」 | performance-optimizer | ✅ 是 |
| 產品定義 | 「requirements」、「user story」、「backlog」、「MVP」 | product-owner | ✅ 是 |
| 新功能 | 「build」、「create」、「implement」、「new app」 | orchestrator → 多代理 | ⚠️ 先詢問 |
| 複雜任務 | 偵測到多個領域 | orchestrator → 多代理 | ⚠️ 先詢問 |
在回應任何請求前:
// 決策樹虛擬碼
function analyzeRequest(userMessage) {
// 1. 分類請求類型
const requestType = classifyRequest(userMessage);
// 2. 偵測領域
const domains = detectDomains(userMessage);
// 3. 判斷複雜度
const complexity = assessComplexity(domains);
// 4. 選擇代理
if (complexity === "SIMPLE" && domains.length === 1) {
return selectSingleAgent(domains[0]);
} else if (complexity === "MODERATE" && domains.length <= 2) {
return selectMultipleAgents(domains);
} else {
return "orchestrator"; // 複雜任務
}
}
自動選擇代理時,簡潔地告知使用者:
🤖 **應用 `@security-auditor` + `@backend-specialist` 的知識...**
[繼續專業回應]
好處:
| 領域 | 模式 | 代理 |
|------|------|------|
| 安全 | auth、login、jwt、password、hash、token | security-auditor |
| 前端 | component、react、vue、css、html、tailwind | frontend-specialist |
| 後端 | api、server、express、fastapi、node | backend-specialist |
| 行動 | react native、flutter、ios、android、expo | mobile-developer |
| 資料庫 | prisma、sql、mongodb、schema、migration | database-architect |
| 測試 | test、jest、vitest、playwright、cypress | test-engineer |
| DevOps | docker、kubernetes、ci/cd、pm2、nginx | devops-engineer |
| 除錯 | error、bug、crash、not working、issue | debugger |
| 效能 | slow、lag、optimize、cache、performance | performance-optimizer |
| SEO | seo、meta、analytics、sitemap、robots | seo-specialist |
| 遊戲 | unity、godot、phaser、game、multiplayer | game-developer |
如果請求匹配來自不同類別的 2+ 個領域,自動使用 orchestrator:
範例:「建立一個帶暗色模式 UI 的安全登入系統」
→ 偵測到:安全 + 前端
→ 自動調用:orchestrator
→ 協調器將處理:security-auditor、frontend-specialist、test-engineer
動作:自動調用對應代理
動作:依序自動調用相關代理
動作:自動調用 orchestrator → 將提出蘇格拉底式問題
要告知正在應用哪種專長:
🤖 **應用 `@frontend-specialist` 的知識...**
我將以以下特徵建立元件:
[繼續專業回應]
使用者不應該注意到與直接與正確專家對話的區別。
使用者仍可明確提及代理:
使用者:「使用 @backend-specialist 來審查這個」
→ 覆蓋自動選擇
→ 使用明確提到的代理
使用者:「React 如何運作?」
→ 類型:問題
→ 不需要代理
→ 直接回應說明
使用者:「讓它更好」
→ 複雜度:不明確
→ 動作:先詢問澄清問題
→ 然後路由到適當代理
使用者:「為 Web 應用新增行動支援」
→ 衝突:行動 vs web
→ 動作:詢問:「你想要響應式 Web 還是原生行動應用?」
→ 然後相應路由
/orchestrate:明確的協調模式差異:使用者不需要知道該指令存在。
intelligent-routing 技能啟用:
✅ 零指令操作(不需要 /orchestrate)
✅ 基於請求分析的自動專家選擇
✅ 透明地溝通正在應用哪種專長
✅ 與現有工作流無縫整合
✅ 明確代理提及的覆蓋能力
✅ 複雜任務退回到協調器
結果:使用者無需了解系統架構即可獲得專家級回應。
development
Unified testing skill — TDD workflow, unit/integration patterns, E2E/Playwright strategies. Replaces tdd-workflow + testing-patterns + webapp-testing.
testing
Security-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns.
development
Spec-Driven Development (SDD): A structured workflow (Requirement -> Analysis -> Implementation) enforcing explicit documentation before coding.
development
Methodologies for System Analysis (SA), focusing on technical architecture, data flow modeling, and API design.