routing

Route inputs to specialized prompts, tools, or models based on input type.

Updated Apr 29, 2026
One-click install
npx skills add https://github.com/dev-khoi/conHack-2026 --skill routing-dev-khoi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: routing
Source: https://github.com/dev-khoi/conHack-2026/tree/main/.opencode/skills/routing
Command: npx skills add https://github.com/dev-khoi/conHack-2026 --skill routing-dev-khoi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Routing heterogeneous inputs to the most suitable prompts, tools, or models is complex and error-prone without a clear decision path.

Core Features & Use Cases

  • Classification and routing: classify input and select the appropriate route (prompt, model, tool, or agent) for efficient processing.
  • Extensibility and guardrails: easy to add new routes with fallbacks and confidence scores to control routing quality.
  • Use Case: route a customer query to a specialized agent when it matches customer-support intent.

Quick Start

Route an incoming user request to the most appropriate prompt, tool, or model path based on its classified category.

Frequently Asked Questions about routing

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

FAQPage Schema
How do I route inputs to specialized prompts or models based on their category?

To route inputs to specialized prompts or models, you can classify the input type to select the most suitable processing path. This ensures each request is handled by the appropriate prompt, tool, or agent for optimal results.

How does model routing handle fallbacks for requests with low confidence?

Model routing handles fallbacks by outputting a route label alongside a confidence score. When confidence is low, the router directs the input to a predefined fallback path to ensure the request is still processed reliably.

What is the best way to classify heterogeneous user queries for tool chaining?

The best way to classify heterogeneous user queries is to implement a router that evaluates the input type and outputs a route label. This approach applies across classification and tool chaining to direct each query to the right specialized agent.

Can I easily add new routes to an existing input classification system?

Yes, you can easily add new routes to the input classification system. The routing mechanism is designed for extensibility, allowing you to append new paths while maintaining guardrails like confidence scores and fallbacks to control quality.

How do I optimize cost and latency when routing customer queries to agents?

You optimize cost and latency by routing customer queries to specialized models or tools based on their classified intent. Directing inputs to the most suitable path prevents overprocessing and reduces unnecessary computational overhead.

When should I use a fallback path in automated decision routing?

You should use a fallback path in automated decision routing when the router outputs a low confidence score for a classified input. This guardrail ensures unclassified or ambiguous requests are handled correctly without breaking the workflow.