intelligence-route
Skill này làm gì
Skill này chọn trợ lý nào và mức model nào nên xử lý một tác vụ, dựa trên những gì đã hiệu quả trước đây. Nó dành cho người muốn phân công việc tốt hơn mà họ có thể hiểu và kiểm tra.
Khi nào nên dùng
- ✓Khi bạn sắp bắt đầu một tác vụ lớn và muốn chọn đúng trợ lý.
- ✓Khi bạn muốn biết mức model nào phù hợp với tác vụ và vì sao.
- ✓Khi bạn muốn lý do định tuyến được hiển thị để kiểm tra lựa chọn.
Liên kết skill
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-intelligence/skills/intelligence-route/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Agent và model nào nên xử lý đợt refactor này, và bạn có thể giải thích vì sao không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill hỏi các công cụ định tuyến xem nên dùng agent và mức model nào, kiểm tra các mẫu tương tự đã có và lấy một dự đoán. Sau đó nó khởi chạy trợ lý được chọn và, nếu bạn yêu cầu, hiển thị lý do. Sau tác vụ, nó ghi lại kết quả để cải thiện các lựa chọn sau này.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Intelligence Routing
Pick the optimal agent + model tier for a task using learned patterns + the 3-tier router. Emits a hooks_explain rationale so the choice is auditable.
When to use
Before starting any non-trivial task. Replaces manual agent selection with data-driven decisions.
Steps
- Get an agent recommendation —
mcp__plugin_ruflo-core_ruflo__hooks_routewith the task description. Returns{ recommended, confidence, reasoning }. - Get a model tier recommendation —
mcp__plugin_ruflo-core_ruflo__hooks_model-routefor Haiku/Sonnet/Opus selection. - Search for similar past patterns —
mcp__plugin_ruflo-core_ruflo__hooks_intelligence_pattern-searchto find prior successes. - Predict outcome —
mcp__plugin_ruflo-core_ruflo__neural_predictwith the task description for a confidence-scored prediction. - Spawn the recommended agent at the recommended model tier.
- (If
--whywas passed) — callmcp__plugin_ruflo-core_ruflo__hooks_explainto surface the routing rationale to the user. - After task completes — call
mcp__plugin_ruflo-core_ruflo__hooks_model-outcomewith{ task, model, outcome: "success"|"failure"|"escalated" }to train the router.
3-Tier Model Routing
| Tier | Handler | Latency | Cost | When |
|---|---|---|---|---|
| 1 | Deterministic codemod (TS compiler) | ~1ms | $0 | Structural transforms with no LLM: var-to-const, remove-console, add-logging |
| 2 | Haiku | ~500ms | ~$0.0002 | Low complexity (<30%), bug fixes, quick patches |
| 3 | Sonnet/Opus | 2–5s | $0.003–$0.015 | Complex reasoning, architecture, security, multi-file refactors |
When hooks_route returns [CODEMOD_AVAILABLE] for a deterministic intent (var-to-const, remove-console, add-logging), call mcp__plugin_ruflo-core_ruflo__hooks_codemod with the intent + file — it applies the transform via the TypeScript compiler at $0, no LLM. Note: add-types, add-error-handling, async-await require judgement and route to a model (Tier 2/3) per ADR-143; they are NOT $0 codemods. Agent Booster is a fast-apply merge engine for LLM-produced edits, not the Tier-1 path.
Recording outcomes
Closing the routing loop is mandatory:
# Success (task, model and outcome are all required; model is haiku|sonnet|opus)
npx @claude-flow/cli@latest mcp exec -t hooks_model-outcome -p '{"task": "fix the flaky retry test", "model": "haiku", "outcome": "success"}'
# The model was too small and the work moved up a tier: use "escalated"; use "failure" if it did not work out
npx @claude-flow/cli@latest mcp exec -t hooks_model-outcome -p '{"task": "fix the flaky retry test", "model": "haiku", "outcome": "escalated"}'
The router learns from these calls. Skipping them = no learning.
CLI alternative
npx @claude-flow/cli@latest hooks route --task "description"
npx @claude-flow/cli@latest hooks pre-task --description "description"
npx @claude-flow/cli@latest hooks explain --task "description" --verbose
Câu hỏi thường gặp
Nó có luôn hiển thị lý do không?
Chỉ khi bạn yêu cầu bằng tùy chọn why. Nếu không, lựa chọn được thực hiện mà không có giải thích hiển thị.
Nó cải thiện bằng cách nào?
Sau mỗi tác vụ, kết quả được ghi là thành công, thất bại hoặc được chuyển cấp, và điều này huấn luyện bộ định tuyến.
Nó chọn giữa những mức model nào?
Nó chọn giữa các mức Haiku, Sonnet và Opus, dựa trên độ phức tạp của tác vụ.
Chi tiết
Mô tả gốc của tác giả
Route tasks via the 3-tier model selector and learned patterns; emits a routing rationale via hooks_explain
repo: ruvnet/ruflo
Độ phổ biến
- Sao GitHub
- 81k
- Vị trí xếp hạng
- #1629
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-adaptive-coordinator
81kGiúp agent của bạn chia và cân bằng lại một nhóm agent AI khi khối lượng công việc thay đổi, chọn bố cục phù hợp với tác vụ.
agent-agent
81kDạy agent của bạn biến một mục tiêu lớn thành kế hoạch hành động có thứ tự, và lập lại kế hoạch khi điều kiện thay đổi.
agent-agentic-payments
81kGiúp agent của bạn quản lý ủy quyền chi tiêu cho mua sắm bằng AI, với hạn mức chi, khung thời gian, quy tắc người bán và phê duyệt có chữ ký.
agent-analyze-code-quality
81kGiúp agent của bạn rà soát chất lượng mã, tìm code smell, nợ kỹ thuật và gợi ý tái cấu trúc mà không thay đổi các file.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.