← 返回 Skills 市场
joyyyced

Auto Model Router

作者 JoyyyceD · GitHub ↗ · v0.1.1
cross-platform ⚠ suspicious
411
总下载
1
收藏
6
当前安装
2
版本数
在 OpenClaw 中安装
/install auto-model-router
功能描述
Automatically select and use the best AI model for any task based on task type. ALWAYS activate this skill at the start of a new task or when the user asks a...
使用说明 (SKILL.md)

Auto Model Router Skill

You have intelligent model routing. For every substantive task, follow this procedure.

Task Categories

Classify tasks into one of these categories:

Category When to use
coding Writing code, debugging, implementing features, architecture
code_review Reviewing existing code, security/performance analysis
math_reasoning Math problems, logic puzzles, quantitative analysis
writing_long Articles, reports, essays, long documents
writing_short Titles, slogans, social posts, short copy
translation Translating between languages
summarization Summarizing long texts, meeting notes
data_analysis Analyzing data, writing SQL, interpreting charts
image_understanding Analyzing or describing images
daily_chat Casual Q&A, simple questions, general assistance

Procedure

Check whether AUTO_MODEL_ROUTER_URL is set to determine which mode to use.


Mode A — Local (default, no router needed)

Use this when AUTO_MODEL_ROUTER_URL is NOT set.

Step 1 — Classify the task yourself

Read the user's task and determine the best category from the table above. Be decisive — pick one category.

Step 2 — Call the model

python3 ~/.claude/skills/auto-model-router/scripts/call_model.py "\x3Ccategory>" "\x3Cuser task text>"

Exit codes:

  • 3 — API key missing: tell the user which env var to set
  • 4 — Config not found: tell the user to run python3 scripts/setup.py
  • 5 — No routes configured at all: tell the user to run python3 scripts/setup.py

Step 3 — Present the result

Show the response naturally. Add a subtle footer: _[auto-model-router: used {category} → {model}]_


Mode B — Router (with learning)

Use this when AUTO_MODEL_ROUTER_URL is set.

Privacy note: Task text and an anonymous session ID are sent to the router at AUTO_MODEL_ROUTER_URL. This URL is always set by the user — the skill has no built-in remote endpoint. If the user has not explicitly set this variable, always use Mode A.

Step 1 — Get recommendation

python3 ~/.claude/skills/auto-model-router/scripts/recommend.py "\x3Cuser task text>" "\x3CUSER_ID>"
  • Capture stdout as the model response.
  • Extract TASK_ID from stderr (line starting with TASK_ID=).

Exit codes:

  • 2 — Router offline: fall back to Mode A automatically
  • 3 — API key missing: tell the user which env var to set

Step 2 — Present the result

Same as Mode A Step 3.

Step 3 — Collect feedback

Ask once after presenting the result:

"Was this response helpful? Reply 👍, 👎, or skip."

If 👍:

python3 ~/.claude/skills/auto-model-router/scripts/feedback.py "\x3CTASK_ID>" 1 "\x3CUSER_ID>"

If 👎:

python3 ~/.claude/skills/auto-model-router/scripts/feedback.py "\x3CTASK_ID>" -1 "\x3CUSER_ID>"

If skip, do nothing.


Changing Model Assignments

When the user says things like "switch to GPT-4o for translation" or "use DeepSeek for coding":

python3 ~/.claude/skills/auto-model-router/scripts/update_route.py \x3Ccategory> \x3Cprovider> \x3Cmodel>

Examples:

python3 ~/.claude/skills/auto-model-router/scripts/update_route.py translation openai gpt-4o
python3 ~/.claude/skills/auto-model-router/scripts/update_route.py coding deepseek deepseek-chat
python3 ~/.claude/skills/auto-model-router/scripts/update_route.py daily_chat google gemini-2.0-flash

Confirm to the user: "Done, {category} tasks will now use {model}."

First-time Setup

If config is missing, tell the user to run:

python3 ~/.claude/skills/auto-model-router/scripts/setup.py

Manual Invocation

/auto-model-router \x3Cyour task>

安全使用建议
This skill's purpose (automatically choosing models) is plausible, but do not install or run the scripts referenced by SKILL.md until you verify their source. Actionable steps: - Ask the publisher for the repository or packaged code and review the scripts under ~/.claude/skills/auto-model-router/scripts before running them. - Do not set AUTO_MODEL_ROUTER_URL to an untrusted server: Mode B will send task text and a session ID to that URL. If you must use a router, host it yourself or inspect the router code. - Provide API keys only for providers you trust and only as needed. The skill marks them optional — you shouldn't have to supply all keys. - Resolve metadata mismatches with the publisher (version and the UI's [object Object] display) — metadata inconsistencies could indicate stale or poorly packaged skills. - If you cannot review the external scripts, treat this skill as untrusted and avoid running the commands that would execute arbitrary Python code on your machine.
功能分析
Type: OpenClaw Skill Name: auto-model-router Version: 0.1.1 The skill requests access to multiple sensitive AI provider API keys (OpenAI, Anthropic, etc.) and implements a 'Router Mode' that sends user task text to an external endpoint (AUTO_MODEL_ROUTER_URL). While the documentation claims this is user-configured, the instructions command the agent to 'ALWAYS activate' the skill for every task, effectively intercepting all user input. Because the core logic resides in Python scripts (e.g., call_model.py, recommend.py) that are referenced but not provided in the bundle, the security of the API key handling and the potential for unauthorized data exfiltration cannot be fully verified.
能力评估
Purpose & Capability
The name and description (model routing across multiple providers) align with the declared optional API keys for Anthropic, OpenAI, DeepSeek, MiniMax, and Google — those credentials are reasonable for a multi-provider router.
Instruction Scope
The SKILL.md instructs the agent to run several Python scripts under ~/.claude/skills/auto-model-router/scripts/*. No code files are bundled with the skill (instruction-only), so those scripts are not provided by this package. The instructions also require a <USER_ID> value but do not specify where the agent should obtain it. Mode B will send task text (and an anonymous session ID) to the user-provided AUTO_MODEL_ROUTER_URL — this is documented, but it is a clear data-exfiltration surface if the URL points to an untrusted endpoint. Overall the runtime steps assume external/local artifacts and identifiers that are not included or explained.
Install Mechanism
There is no install spec (instruction-only), which minimizes what the skill itself writes to disk, but the instructions expect a preinstalled script tree and a setup.py to configure routes. Because no code is bundled, you must obtain and inspect those scripts separately before running them.
Credentials
The declared env vars (multiple provider API keys plus an optional router URL and router API key) are proportionate to a multi-provider model router and are marked optional in the SKILL.md. However the registry summary shown to the evaluator contained malformed entries (displayed as [object Object]) and the manifest versions differ (registry shows version 0.1.1 while SKILL.md is 0.2.0), indicating metadata inconsistencies that should be resolved.
Persistence & Privilege
The skill is not set to always:true and does not request system-wide config paths. It can be invoked by the agent, which is the platform default; there is no indication it modifies other skills or requires elevated persistence.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install auto-model-router
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /auto-model-router 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.1
- Added explicit documentation for required and optional environment variables (API keys) in the skill metadata. - Included provider-specific API key fields for Anthropic, OpenAI, DeepSeek, MiniMax, and Google models. - Documented privacy details for both local (Mode A) and router (Mode B) modes in the metadata. - Clarified that AUTO_MODEL_ROUTER_URL and learning mode are always opt-in and user-controlled. - No changes to core logic—documentation and metadata only.
v0.1.0
- Major update: Introduces a structured workflow for automatically selecting the best AI model per task. - Adds explicit task categories (e.g., coding, math_reasoning, translation, daily_chat) to guide model selection. - Supports two modes: local (self-classify tasks) and router-based (AI-assisted routing with feedback learning). - Integrates user feedback to improve future routing when the router is configured. - Allows users to customize model assignments for each category using simple commands. - Provides better error handling and clear setup instructions for first-time users.
元数据
Slug auto-model-router
版本 0.1.1
许可证
累计安装 7
当前安装数 6
历史版本数 2
常见问题

Auto Model Router 是什么?

Automatically select and use the best AI model for any task based on task type. ALWAYS activate this skill at the start of a new task or when the user asks a... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 411 次。

如何安装 Auto Model Router?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install auto-model-router」即可一键安装,无需额外配置。

Auto Model Router 是免费的吗?

是的,Auto Model Router 完全免费(开源免费),可自由下载、安装和使用。

Auto Model Router 支持哪些平台?

Auto Model Router 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Auto Model Router?

由 JoyyyceD(@joyyyced)开发并维护,当前版本 v0.1.1。

💬 留言讨论