model-router — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited model-router (Plugin) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
中文 | English
Model Router 是一个面向 AI 编程代理的模型选择和模型切换 Skill。它用于在任务开始前或阶段切换时,根据任务难度、风险、上下文规模和工具需求,选择当前可用模型中最适合的一个,并在宿主工具支持时自动切换。
本项目默认使用中文文档和中文 reference。英文文档作为可选路径提供给英文用户。
它优先适配 Codex,也可以被 Cursor、Claude、ChatGPT、Windsurf、Roo Code、Cline 或其他 AI 工程代理使用。对不支持 Codex Skill 的平台,可以把 SKILL.md 和 references/zh-CN/routing-guide.md 作为上下文提供给模型。
关键词:模型路由、模型选择、自动切换模型、Codex Skill、Cursor、AI Agent、AI 编程、架构模型、编程模型、推理模型、长上下文、slash command、/model。
AI 编程任务经常混合多种阶段:
Model Router 的目标是在正确的时间使用正确的模型,减少模型能力不匹配导致的低质量规划、低效编码或过度消耗。
在 Codex、Antigravity、Cursor 等支持 agent 安装 GitHub 仓库的工具中,新建对话后直接输入:
安装 https://github.com/YPF1016696863/model-router 并且告诉我使用方法期望行为:
skill/model-router 安装为 $model-router skill。integrations/cursor/model-router.mdc 安装为 Project Rule。integrations/antigravity/rules/model-router.md 安装为 Workspace Rule;如果支持插件,再按 plugin 模板安装。如果当前工具不能直接从 GitHub 安装,请使用下面的手动或本地仓库安装方式。
/model 或模型切换工具,自动切换。/model 只能由用户手动触发,输出精确推荐和命令。这个 Skill 不能给宿主工具增加不存在的权限。
/model,它可以自动发现和选择模型。/model 只能由用户在输入框触发,它会输出推荐模型或命令,让用户手动切换。model-router/
README.md
LICENSE
CONTRIBUTING.md
.gitignore
integrations/
install.md
compatibility-matrix.md
codex/
install.md
cursor/
install.md
model-router.mdc
antigravity/
install.md
rules/
model-router.md
plugin/
plugin.json
skill/
model-router/
SKILL.md
agents/
openai.yaml
references/
zh-CN/
routing-guide.md
en/
routing-guide.md
examples/
architecture-task-example.md
coding-task-example.md
frontend-task-example.md
forward-test-scenarios.md最简单方式:在 Codex 新对话中粘贴:
安装 https://github.com/YPF1016696863/model-router 并且告诉我使用方法如果已经打开了本仓库,也可以使用本地安装提示:
请安装当前仓库的 Model Router skill:把 `skill/model-router` 复制到 Codex skills 目录 `model-router` 下;如果设置了 `CODEX_HOME`,目标是 `$CODEX_HOME/skills/model-router`,否则是 `~/.codex/skills/model-router`。复制后请运行可用的 skill 校验命令并报告安装路径和校验结果,不要修改 secrets,不要提交 git。手动方式:把这个目录中的 skill 文件夹复制到 Codex skills 目录:
skill/model-router然后在对话中调用:
使用 $model-router。
请先分析当前任务适合哪个模型。
如果当前环境支持 /model 或模型切换工具,请自动选择并切换。
如果不支持,请告诉我应该切换到哪个具体模型或模型类别。也可以用于具体任务:
使用 $model-router,然后帮我规划这个 SaaS 项目的架构。先不要写代码。使用 $model-router,然后修复这个仓库里的 TypeScript 构建错误。Cursor 推荐使用 Project Rule:
最简单方式是在 Cursor Agent 中粘贴:
安装 https://github.com/YPF1016696863/model-router 并且告诉我使用方法如果已经打开了本仓库,也可以使用本地安装提示:
请安装当前仓库的 Model Router Cursor 规则:创建 `.cursor/rules` 目录,把 `integrations/cursor/model-router.mdc` 复制为 `.cursor/rules/model-router.mdc`,保持 `alwaysApply: false`,不要改业务代码、secrets 或 git 提交。完成后请报告安装路径,并说明它应作为 Agent Requested 或手动规则使用。Antigravity 推荐先使用 Workspace Rule:
最简单方式是在 Antigravity Agent 中粘贴:
安装 https://github.com/YPF1016696863/model-router 并且告诉我使用方法如果已经打开了本仓库,也可以使用本地安装提示:
请安装当前仓库的 Model Router 到 Antigravity 工作区规则:创建 `.agents/rules` 目录,把 `integrations/antigravity/rules/model-router.md` 复制为 `.agents/rules/model-router.md`。如果当前 Antigravity 支持插件目录,也请说明如何把 `skill/model-router` 复制到插件的 `skills/model-router`,并把 `integrations/antigravity/plugin/plugin.json` 作为 manifest 使用。不要改业务代码、secrets 或 git 提交;完成后报告安装路径。如果平台不支持 Codex Skill:
skill/model-router/SKILL.md 发给模型。skill/model-router/references/zh-CN/routing-guide.md。/model 或读取可用模型列表。示例:
请遵守我附上的 Model Router workflow。
先根据我的任务判断应该使用哪个当前可用模型。
如果你可以执行 /model,请使用它列出并选择模型。
如果你不能执行 /model,请告诉我应该手动选择哪个模型。在复杂任务前先单独路由:
使用 $model-router。
这是一个架构规划任务,请先选择模型,再继续执行。在阶段切换时重新路由:
现在架构已经确定,接下来进入编码实现。
使用 $model-router 重新判断是否应该切换到编程模型。在高风险任务前要求暂停:
使用 $model-router。
这个任务涉及权限和生产数据,请先判断当前模型是否足够。
如果不适合,请先停下来告诉我应该切换到哪个模型。Codex 可以直接安装并加载这个 Skill。
其他 AI 工具也可以使用,只要给模型提供:
SKILL.md 作为主流程规则。references/zh-CN/routing-guide.md 作为模型选择矩阵。/model。英文用户可以改用 references/en/routing-guide.md。
这个仓库可以作为公开 Skill 仓库发布。发布前建议:
skill/model-router/SKILL.md 是否通过 Codex Skill 校验。MIT License. See LICENSE.
欢迎贡献。请阅读 CONTRIBUTING.md,了解贡献范围、双语 reference 规则、验证要求和 PR checklist。
Model Router is a reusable model-selection and model-switching skill for AI coding agents. It chooses the best currently available model before a task starts or when the task moves into a new phase.
It is designed for Codex, but the workflow can also be used with Cursor, Claude, ChatGPT, Windsurf, Roo Code, Cline, or other AI engineering agents by providing the SKILL.md and routing guide as context.
Use this skill to:
/model or another switching tool;Paste this into a new Codex conversation:
Install https://github.com/YPF1016696863/model-router and tell me how to use it.Then invoke it:
Use $model-router to inspect the available models, choose the best one for this task, and switch if the host allows it.Paste this into a new agent conversation:
Install https://github.com/YPF1016696863/model-router and tell me how to use it.If your agent platform cannot install from GitHub directly:
skill/model-router/SKILL.md.skill/model-router/references/en/routing-guide.md./model or inspect the available model list.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.