Skip to content
Skillpedia
Agents81k · #1629

intelligence-route

What it does

This skill picks which helper and which model level should handle a task, based on what has worked before. It is for people who want better task assignments that they can understand and check.

When to use it

  • ✓When you are about to start a larger task and want the right helper chosen.
  • ✓When you want to know which model level fits a task and why.
  • ✓When you want the routing reason shown so you can check the choice.

Skill link

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

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-intelligence/skills/intelligence-route/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Which agent and model should handle this refactor, and can you explain why?”

5 new skills a week. 1 minute to read.

How it works

The skill asks the routing tools for a recommended agent and model level, checks similar past patterns and gets a prediction. It then starts the chosen helper and, if you ask, shows the reason. After the task it records the outcome to improve future choices.

Technical content (original SKILL.md)

Original text by the author, straight from 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
FAQ

Does it always show the reasoning?

Only when you ask for it with the why option. Otherwise the choice is made without a shown explanation.

How does it get better?

After each task, the outcome is recorded as success, failure or escalated, which trains the router.

What model levels does it choose between?

It chooses between the Haiku, Sonnet and Opus levels, based on how complex the task is.

Details

Original description by the author

Route tasks via the 3-tier model selector and learned patterns; emits a routing rationale via hooks_explain

repo: ruvnet/ruflo

Popularity

GitHub stars
81k
Ranking position
#1629
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills