task-model-router

Route user messages to suitable LLMs by task type with fallback routing.

37|4|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/MerkyorLynn/Lynn --skill task-model-router
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: task-model-router
Source: https://github.com/MerkyorLynn/Lynn/tree/main/skills2set/task-model-router
Command: npx skills add https://github.com/MerkyorLynn/Lynn --skill task-model-router

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the inefficiency and quality loss of using a single LLM for every request by selecting the best-fit model based on the user’s input (chat, code, images, or long documents).

Core Features & Use Cases

  • Task classification for model choice: Automatically detects whether the request is vision, reasoning/code, large-context, or general chat and routes accordingly.
  • Deterministic routing rules + fallbacks: Uses explicit detection triggers (e.g., image blocks, code signals, token/length thresholds) and falls back to the next best model if the chosen one fails.
  • Mixed multi-task handling: Designed for agents that receive mixed content like chat plus code plus images, optimizing both speed and cost.

Quick Start

Ask your Lynn-powered agent to process a mixed request (e.g., “Review this refactor PR and also analyze the screenshot I attached, then summarize the key risks for a long report”), and it will automatically route each part to the most suitable model.

Frequently Asked Questions about task-model-router

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

FAQPage Schema
How do I route multi-model requests for chat, code, and vision automatically?

You can route multi-model requests by inspecting message content for image blocks and code signals, applying token thresholds for long context, and selecting the best-fit model for each specific task type automatically.

What is task classification for model routing and when do I need it?

Task classification for model routing detects whether a request involves vision, code reasoning, large-document summarization, or general chat to select the optimal LLM. You need it when using a single model for every request causes quality loss or inefficiency.

How do I handle mixed inputs with image attachments and code blocks in a single prompt?

To handle mixed inputs like images and code blocks, the system applies deterministic routing rules to detect specific content triggers, routing each part to the most suitable model while optimizing both speed and cost.

What happens if the selected model fails during multi-model routing?

If the selected model fails during multi-model routing, the system applies fallback routing to automatically redirect the request to the next best available model, ensuring task completion.

Can I use model routing for long documents that exceed small-model context limits?

Yes, you can use model routing for long documents by applying token and length thresholding to detect when inputs exceed small-model context limits, then routing them to a model that supports large context.

What is the best way to optimize LLM costs for agents handling mixed content?

The best way to optimize LLM costs for mixed content is to use deterministic task classification, routing simple chat to fast models and reserving expensive vision or reasoning models only for inputs that require them.