smart-router

Routes user prompts to suitable subagents using .agent.md templates and criteria like length and keywords.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/jeff-hamm/ai-tools --skill smart-router-jeff-hamm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: smart-router
Source: https://github.com/jeff-hamm/ai-tools/tree/main/src/skills/smart-router
Command: npx skills add https://github.com/jeff-hamm/ai-tools --skill smart-router-jeff-hamm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Configure and manage model routing by orchestrating a primary router agent that delegates work to specialized subagents using different models based on prompt length, complexity, or topic.

Core Features & Use Cases

  • Create an orchestrator agent that analyzes the user's request and routes to appropriate worker agents
  • Define worker agents with pinned models to balance cost and capability
  • Support for workspace, directory, or profile contexts and easy validation with .agent.md standards

Quick Start

Create an orchestrator agent and the necessary worker agents following the templates described above.

Frequently Asked Questions about smart-router

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

FAQPage Schema
How do I route prompts to different models based on task type?

Route prompts to different models by configuring an orchestrator agent that analyzes requests and delegates to specialized worker agents. The router evaluates criteria like prompt length, task type, and keywords to select the most suitable model.

What is the best way to balance model cost and capability across workspace contexts?

Balance cost and capability by defining worker agents with pinned models within a primary router agent. This orchestrator pattern delegates requests to specialized subagents based on prompt complexity to optimize resource usage.

How do I set up subagents for prompt routing using .agent.md templates?

Set up subagents by creating an orchestrator agent and necessary worker agents using .agent.md templates. These templates require specific frontmatter fields including name, description, tools, agents, and model for proper validation.

Can I use model routing for orchestrating worker agents across directory contexts?

Yes, model routing supports orchestrating worker agents across workspace, directory, or profile contexts. The primary router agent delegates work to specialized subagents using different models based on prompt characteristics.

What frontmatter is required for agent files to validate model routing templates?

Agent files require specific frontmatter fields to validate routing templates: name, description, tools, agents, and model. These fields ensure the orchestrator and worker agents function correctly within the routing framework.

When should I not use a single orchestrator agent for subagent routing?

Avoid using a single orchestrator for subagent routing when requests require uniform model capability without cost differentiation. If prompt complexity does not vary significantly, direct model execution is more efficient than routing.