intelligent-router

Classify agent tasks and route them to optimal LLM models.

5|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/tiancaiamao/ai --skill intelligent-router-tiancaiamao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: intelligent-router
Source: https://github.com/tiancaiamao/ai/tree/main/skills/intelligent-router
Command: npx skills add https://github.com/tiancaiamao/ai --skill intelligent-router-tiancaiamao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Intelligent Router helps you choose the most cost-effective and capable LLM for each sub-agent task, reducing wasted spend on simple work while protecting quality for complex or high-stakes requests.

Core Features & Use Cases

  • Task Classification: Scores requests across multiple dimensions to identify simple, medium, complex, reasoning, and critical workloads.
  • Model Routing: Maps each tier to configured primary models and fallback chains so tasks can recover automatically when a preferred model fails.
  • Cost Control: Estimates token and dollar cost before execution, making it easier to compare routing options and avoid overusing premium models.
  • Practical Use Cases: Use it for monitoring checks, code fixes, feature builds, formal reasoning, security audits, and other delegated agent workflows.

Quick Start

Add your model configuration, then ask the router to classify a task so you can spawn the right sub-agent model with confidence.

Frequently Asked Questions about intelligent-router

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I route sub-agent tasks to the right LLM model based on complexity?

To route sub-agent tasks to the right LLM model, classify each request using weighted multi-dimension scoring to identify its complexity tier, then map that tier to a configured primary model. This ensures cost-effective model selection for delegated agent workflows.

What is task classification for cost-aware model routing?

Task classification for cost-aware model routing scores requests across multiple dimensions to categorize workloads as simple, medium, complex, reasoning, or critical. This classification enables mapping each tier to optimal models to reduce wasted spend on simple work.

How do I handle LLM model failures during agentic task execution?

Handle LLM model failures during agentic task execution by configuring automatic retry chains and fallback models. The router maps each task tier to a primary model and a fallback chain so sub-agents can recover automatically when a preferred model fails.

Can I estimate token and dollar costs before routing an LLM task?

Yes, you can estimate token and dollar costs before routing an LLM task. The router validates health and estimates execution costs beforehand, making it easier to compare routing options and avoid overusing premium models for simple checks or code fixes.

Does intelligent routing work for security audits and formal reasoning workflows?

Yes, intelligent routing works for security audits and formal reasoning workflows. It applies to sub-agent delegation for critical review workflows, feature builds, code fixes, and monitoring checks, protecting quality for high-stakes requests through tiered model mappings and confidence thresholds.

What do I need to set up before using a multi-tier model routing system?

Before using a multi-tier model routing system, you need to add your model configuration including primary models and fallback chains. Once configured, you can ask the router to classify a task and spawn the right sub-agent model with confidence using weighted scoring.