跳到正文
Skillpedia
智能体81k · #1629

intelligence-route

它能做什么

这项技能根据过去的成效,选择应由哪个辅助工具、使用哪个模型等级来处理任务。适合希望任务分配更好、并且能理解和检查分配理由的人。

适用场景

  • ✓当你即将开始一项较大的任务,想选定合适的辅助工具时。
  • ✓当你想知道哪个模型等级适合某项任务、以及原因时。
  • ✓当你希望显示路由理由,以便检查这一选择时。

技能链接

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-intelligence/skills/intelligence-route/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-intelligence/skills/intelligence-route/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Get an agent recommendation — mcp__plugin_ruflo-core_ruflo__hooks_route with the task description. Returns { recommended, confidence, reasoning }.
  2. Get a model tier recommendation — mcp__plugin_ruflo-core_ruflo__hooks_model-route for Haiku/Sonnet/Opus selection.
  3. Search for similar past patterns — mcp__plugin_ruflo-core_ruflo__hooks_intelligence_pattern-search to find prior successes.
  4. Predict outcome — mcp__plugin_ruflo-core_ruflo__neural_predict with the task description for a confidence-scored prediction.
  5. Spawn the recommended agent at the recommended model tier.
  6. (If --why was passed) — call mcp__plugin_ruflo-core_ruflo__hooks_explain to surface the routing rationale to the user.
  7. After task completes — call mcp__plugin_ruflo-core_ruflo__hooks_model-outcome with { 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能