model-router

model-router is a skill for Claude Code, Codex from rexleimo/aios. It costs 60 tokens per session (2,622 once invoked), scanned A, original, MIT.

A model-selection workflow that assigns different coding tasks to different AI models based on their abilities, cost, and the task’s risk or complexity.

In plain words
What is it for?
Routing tasks such as code review, architecture, implementation, research, browser automation, security checks, and production recovery to suitable models.
Why use it?
It reduces the need to choose a model manually for every task and helps avoid using an expensive model for routine work.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; runs codex exec; mentions Codex.

Good fit Routing tasks such as code review, architecture, implementation, research, browser automation, security checks, and production recovery to suitable models.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rexleimo/aios/model-router
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add rexleimo/aios --skill model-router
Clone the repo
git clone --depth 1 https://github.com/rexleimo/aios

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for model-router

README.md
[![agentmods](https://agentmods.dev/badge/skills/rexleimo/aios/model-router/github.svg)](https://agentmods.dev/skills/rexleimo/aios/model-router)
Your own site
<a href="https://agentmods.dev/skills/rexleimo/aios/model-router"><img src="https://agentmods.dev/badge/skills/rexleimo/aios/model-router/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for model-router

Your own site · 80×15
<a href="https://agentmods.dev/skills/rexleimo/aios/model-router"><img src="https://agentmods.dev/badge/skills/rexleimo/aios/model-router.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,622 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.02622
Opus 5.5 $0.00024 $0.01049
Sonnet 5.5 $0.00012 $0.00524
Haiku 4.5 $0.00006 $0.00262

Measured 28d ago against content hash fcb3d34e215e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

model-router scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 28d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill-sources/model-router/SKILL.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Model Router

你是 Agent Team 的调度中枢。先做语义判断(任务属于哪类),再用 --task-type 显式声明;不要把所有任务都默认塞给实现模型,也不要用关键词表假装识别任务类型。

北极星原则:程序不根据自由文本关键词猜任务类型。任务类型由模型语义判断后显式声明(--task-type);无声明时程序返回中性 general(确定性默认),不猜测。

CLI 协议

协议 CLI 使用场景
codex codex exec --dangerously-bypass-approvals-and-sandbox -m <model> "<prompt>" GPT-5.5
gemini gemini -m gemini-3-pro --yolo -p "<prompt>" Gemini-3-Pro
claude claude --model <model> --dangerously-skip-permissions -p "<prompt>" 其余模型

模型能力表

模型 协议 最擅长 成本
Claude Opus 4.7 claude 代码审查、架构设计、安全审计 最高
Claude Sonnet 4.6 claude 日常开发、RAG、快速原型、文档 中
GPT-5.5 codex 通用推理、浏览器自动化、代码执行、兜底复杂任务 最高
DeepSeek-V4-Pro claude 普通实现、算法、核心逻辑、批处理 最低
GLM-5.1 claude 数学推理、自主循环、系统规划 低
Kimi K2.6 claude 多Agent编排、前端UI、长周期执行 低
MiniMax-M2.7 claude 自愈运维、生产恢复 低
Gemini-3-Pro gemini 多模态分析、长文档研究、1M上下文 中

Balanced v2 Profiles

  • balanced 默认:显式声明驱动升级,普通实现省成本。
  • premium:复杂、低置信、高风险任务更积极使用订阅强模型。
  • budget:优先低成本,仅在浏览器、长上下文、安全、生产恢复等硬能力约束下升级。

使用 --profile 或环境变量切换:

aios model-router route --task "..." --profile balanced --explain
export AIOS_MODEL_ROUTER_PROFILE=premium

任务类型声明

任务类型是语义判断:你理解任务后,选择最贴合的 task type 并用 --task-type 显式声明。常用类型(完整列表见 model-router list):

task-type 适用场景 典型首选模型
browser-automation 浏览器操作、页面交互、上传填写、截图抓取 GPT-5.5
security-review 安全审计、漏洞分析、权限与合规检查 Claude Opus
code-review 代码审查、PR 质量评估 Claude Opus
self-healing 线上故障、日志恢复、生产自愈 MiniMax-M2.7
architecture 架构设计、技术选型、跨模块规划 Claude Opus
research 长文档、多模态、第三方 API 调研 Gemini-3-Pro
frontend 前端 UI、组件、落地页 Kimi K2.6
implementation 普通实现、算法、核心逻辑 DeepSeek-V4

无 --task-type 时程序返回中性 general 并采用默认实现模型——这是确定性兜底,不表示程序识别出了任务类型。

弱任务钉死弱模型

Read the full file on GitHub · 165 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 28d ago Changed fcb3d34e215e
  2. 1mo ago Changed d8ba37480923
  3. 1mo ago Changed 816446ef4f24
  4. 1mo ago Changed · +23 lines 8b536bedc60b
  5. 1mo ago Changed · +7 lines 0a7957bcadbc
  6. 1mo ago First seen · 135 lines · 60 tokens per session scan A 5b24564fa988

Subscribe to this mod's changes

model-router is a skill published in the GitHub repository rexleimo/aios (54 stars, last pushed today), licensed MIT. It adds 60 tokens to every session and 2,622 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.