← Back to Skills Marketplace
kevinzhj

Model Router Hook

by kevinZhj · GitHub ↗ · v4.0.0
cross-platform ✓ Security Clean
318
Downloads
0
Stars
2
Active Installs
1
Versions
Install in OpenClaw
/install model-router-hook
Description
智能模型路由系统,根据任务复杂度自动切换 AI 模型(fast/thinking)。 当需要: - 自动选择最优 AI 模型(简单任务用 k2p5,复杂任务用 thinking) - 根据用户意图智能路由(代码/分析/查询等) - 控制 API 成本(预算管理) - 学习用户偏好并自适应调整 使用场景: - 开发...
Usage Guidance
This skill appears to do what it claims: automatic model routing, cost tracking, and learning user preferences. Before installing, consider: 1) It stores user/session data and cost logs on disk at ~/.openclaw/workspace/memory/model-router/ — if that data would be sensitive in your environment, avoid or restrict it. 2) It may call a local OpenClaw CLI or import openclaw.tools to effect model switches; ensure you trust the local openclaw installation. 3) The code uses subprocess.run (only to call the OpenClaw CLI as provided), so verify there are no additional unexpected subprocess/network calls in the parts of the code not shown. If you need higher assurance, request a full review of the untruncated scripts/model_router.py to confirm there are no hidden network endpoints, telemetry, or arbitrary command execution paths.
Capability Analysis
Type: OpenClaw Skill Name: model-router-hook Version: 4.0.0 The skill bundle is classified as benign. Its primary function is to intelligently route AI models based on task complexity and manage costs, which aligns with its stated purpose in SKILL.md. While the `scripts/model_router.py` file uses `subprocess.run` to interact with the `openclaw` CLI for model switching, the arguments passed to these commands are hardcoded model identifiers ('kimi-coding/k2p5', 'kimi-coding/kimi-k2-thinking') and not user-controlled, mitigating shell injection risks. File operations are confined to the designated `~/.openclaw/workspace/memory/model-router/` directory for storing session and user memory, which is transparently documented and a legitimate use of local storage for a skill. No evidence of data exfiltration, persistence mechanisms, or prompt injection attempts against the agent was found.
Capability Assessment
Purpose & Capability
The name/description (model routing, cost control, user-preference learning) align with the code and SKILL.md. Declared storage paths, budget logic, intent signals, and OpenClaw integration are coherent with the stated functionality.
Instruction Scope
SKILL.md and code limit actions to routing decisions, local persistence (user/profile/session/cost records), cost estimation, and optionally calling OpenClaw to effect a model switch. The skill persistently stores user profiles and session memory under ~/.openclaw/workspace/memory/model-router/, which is expected for its cross-session learning feature but is a privacy consideration (it will retain user content and derived profiles).
Install Mechanism
No install spec — code files are included and executed by the agent environment. No external downloads or unusual installers are used.
Credentials
The skill does not request credentials or environment variables. It writes/reads local files under the user's home directory (as described in SKILL.md). It sets a local environment flag (_OPENCLAW_MODEL_OVERRIDE) as an integration fallback; this is reasonable for inter-process signaling but should be noted.
Persistence & Privilege
always=false and the skill is user-invocable (normal). The skill creates and updates persistent files (profiles, session memory, cost logs) across sessions. This persistent storage and cross-session learning are consistent with the feature set but increase privacy risk and attack surface (local files containing user data).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install model-router-hook
  3. After installation, invoke the skill by name or use /model-router-hook
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v4.0.0
Initial release of V4 with full P0-P5 + A-G optimizations
Metadata
Slug model-router-hook
Version 4.0.0
License
All-time Installs 2
Active Installs 2
Total Versions 1
Frequently Asked Questions

What is Model Router Hook?

智能模型路由系统,根据任务复杂度自动切换 AI 模型(fast/thinking)。 当需要: - 自动选择最优 AI 模型(简单任务用 k2p5,复杂任务用 thinking) - 根据用户意图智能路由(代码/分析/查询等) - 控制 API 成本(预算管理) - 学习用户偏好并自适应调整 使用场景: - 开发... It is an AI Agent Skill for Claude Code / OpenClaw, with 318 downloads so far.

How do I install Model Router Hook?

Run "/install model-router-hook" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Model Router Hook free?

Yes, Model Router Hook is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Model Router Hook support?

Model Router Hook is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Model Router Hook?

It is built and maintained by kevinZhj (@kevinzhj); the current version is v4.0.0.

💬 Comments