intelligence-route
它能做什么
这项技能根据过去的成效,选择应由哪个辅助工具、使用哪个模型等级来处理任务。适合希望任务分配更好、并且能理解和检查分配理由的人。
适用场景
- ✓当你即将开始一项较大的任务,想选定合适的辅助工具时。
- ✓当你想知道哪个模型等级适合某项任务、以及原因时。
- ✓当你希望显示路由理由,以便检查这一选择时。
技能链接
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-intelligence/skills/intelligence-route/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“这次重构应该由哪个智能体和哪个模型来处理?请解释一下原因。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能向路由工具请求推荐的智能体和模型等级,检查类似的过往模式并获得预测。然后启动所选的辅助工具;如果你要求,还会显示理由。任务完成后,它记录结果,以改进以后的选择。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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
常见问题
它总会显示理由吗?
只有在你使用 why 选项要求时才会。否则选择会在不显示解释的情况下做出。
它如何变得更好?
每项任务之后,结果会被记录为成功、失败或已升级,从而训练路由器。
它在哪些模型等级之间选择?
它根据任务的复杂程度,在 Haiku、Sonnet 和 Opus 等级之间选择。
详情
作者的原始描述
Route tasks via the 3-tier model selector and learned patterns; emits a routing rationale via hooks_explain
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1629
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。