← 返回 Skills 市场
A.I. Smart Router
作者
c0nSpIc0uS7uRk3r
· GitHub ↗
· v0.1.2
2477
总下载
3
收藏
13
当前安装
3
版本数
在 OpenClaw 中安装
/install smart-router
功能描述
Expertise-aware model router with semantic domain scoring, context-overflow protection, and security redaction. Automatically selects the optimal AI model using weighted expertise scoring (Feb 2026 benchmarks). Supports Claude, GPT, Gemini, Grok with automatic fallback chains, HITL gates, and cost optimization.
安全使用建议
This skill appears mostly consistent with a multi-provider model router, but there are several red flags you should address before installing: 1) The metadata claims only ANTHROPIC_API_KEY is required, but the code expects additional optional provider keys and uses router/log state env vars that aren't declared — don't export credentials you don't intend to use. 2) The SKILL.md contains prompt-injection patterns (e.g., 'ignore-previous-instructions', 'system-prompt-override'); review the SKILL.md and all code for any instructions that attempt to change the agent's system prompt or execute unbounded commands. 3) The HITL gate references Telegram notifications but no TELEGRAM_TOKEN is declared — find where notifications are sent and verify you control that endpoint. 4) Because the skill can read/write ~/.openclaw state and invoke sessions_spawn (spawning sub-agents), run it in an isolated environment or sandbox (or inspect and strip the code) if you decide to try it. 5) If you trust the author and want to proceed, at minimum: (a) audit the code for external network calls/endpoints, (b) remove or neutralize any prompt-override directives, (c) only set provider keys you intend to allow, and (d) run it with least privilege and logging enabled so you can observe behavior. If you want, provide the omitted files or the rest of SKILL.md and I can re-scan for external endpoints, Telegram logic, or other undisclosed behaviors.
功能分析
Type: OpenClaw Skill
Name: smart-router
Version: 0.1.2
The OpenClaw Smart Router skill bundle is classified as benign. It implements a sophisticated AI model routing system with strong emphasis on security and transparency. Key indicators for this classification include a robust `InputSanitizer` in `router_gateway.py` that actively blocks API keys, private keys, and PII, and performs unicode normalization and control character stripping. The `references/security.md` explicitly disclaims arbitrary code execution (e.g., `eval`, `exec`, shell commands from input) and this is consistently upheld by the Python code, which relies on regex, dictionary lookups, and OpenClaw's `sessions_spawn` API for delegation. File operations are confined to standard application state and log directories (`~/.openclaw/router-state`, `~/.openclaw/logs`), and there are no unauthorized network calls or persistence mechanisms. The `SKILL.md` and `README.md` are descriptive and do not contain prompt injection instructions against the agent.
能力评估
Purpose & Capability
Name/description match the included code: router, context guard, compactor, executor, dashboard are coherent with a model-routing skill. However the skill metadata declares ANTHROPIC_API_KEY as required while the README/SKILL.md insists the router works with "at least one provider" (Anthropic should be optional). The package also claims optional provider keys (OPENAI/GOOGLE/XAI) but only Anthropic is required — this mismatch is unexplained.
Instruction Scope
SKILL.md and code instruct the agent to read and write state/log files under ~/.openclaw (router-state, logs), run compaction, and call sessions_spawn to delegate to sub-agents. Those file and process operations are reasonable for a router, but the SKILL.md contains prompt-injection patterns (e.g., 'ignore-previous-instructions', 'system-prompt-override') which indicate the runtime instructions themselves may attempt to manipulate prompts or the agent's instruction context. The README also mentions a HITL Telegram notification but no TELEGRAM token is declared — unclear where notifications are sent. Several env/config names (ROUTER_STATE_DIR, ROUTER_LOGS_DIR, openclaw.json/openclaw auth profiles) are used but not declared in requires.env.
Install Mechanism
No install spec is declared (instruction-only), and the README instructs copying/cloning the folder into the skills directory. That is low-risk compared with arbitrary download/executable installers. Code is provided (so files will run on-host), but there is no remote installer URL or archive extraction to flag.
Credentials
The registry metadata requires only ANTHROPIC_API_KEY, yet the code and SKILL.md clearly expect (and offer) optional provider keys for OpenAI/Google/xAI and refer to other envs (ROUTER_STATE_DIR, ROUTER_LOGS_DIR). The HITL/Telegram behavior references notifications without declaring a TELEGRAM_TOKEN. In short: the declared required envs are incomplete/ inconsistent with runtime behavior, and the skill will access file-system paths and optional credentials not listed as required.
Persistence & Privilege
always:false (good). The skill persists state and logs under ~/.openclaw and can modify its own state files (circuit breaker, logs, archives). It also can invoke sessions_spawn to create sub-agents — this is expected for a router but increases blast radius if the skill is malicious. There is no request to modify other skills or system-wide configs, and it doesn't force permanent inclusion.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install smart-router - 安装完成后,直接呼叫该 Skill 的名称或使用
/smart-router触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.2
Smart-router 0.1.2 introduces state management and improved context handling.
- Added persistent state documentation (STATE.md) to clarify router behavior across sessions.
- Implemented context guard logic in new context_guard.py for enhanced context-overflow protection.
- Updated routing logic in router_gateway.py to integrate state and context checks.
- Documentation (README.md, SKILL.md) updated to reflect new features and version bump.
v0.1.1
smart-router v0.1.1
- Major rewrite with new semantic routing engine and security features.
- Added expertise-weighted model selection using Feb 2026 benchmarks.
- Introduced context-overflow protection and automatic Gemini escalation for large input.
- Implemented security credential redaction for sensitive data.
- Added circuit breaker, persistent state handling, and HITL (human-in-the-loop) gating.
- Expanded codebase with essential modules: router logic, semantic detection, state management, logging, and dashboard.
v0.1.0
A.I. Smart-Router 0.1.0
- Initial release of intelligent AI model routing for multi-provider setups.
- Automatically classifies user intent, task complexity, and special cases to select the best model.
- Supports Claude, GPT, Gemini, and Grok, with fallback chains and cost optimization.
- Operates silently by default; use `[show routing]` to view routing decisions.
- Includes auto-switching with user notifications when a model becomes unavailable.
元数据
常见问题
A.I. Smart Router 是什么?
Expertise-aware model router with semantic domain scoring, context-overflow protection, and security redaction. Automatically selects the optimal AI model using weighted expertise scoring (Feb 2026 benchmarks). Supports Claude, GPT, Gemini, Grok with automatic fallback chains, HITL gates, and cost optimization. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2477 次。
如何安装 A.I. Smart Router?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install smart-router」即可一键安装,无需额外配置。
A.I. Smart Router 是免费的吗?
是的,A.I. Smart Router 完全免费(开源免费),可自由下载、安装和使用。
A.I. Smart Router 支持哪些平台?
A.I. Smart Router 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 A.I. Smart Router?
由 c0nSpIc0uS7uRk3r(@c0nspic0us7urk3r)开发并维护,当前版本 v0.1.2。
推荐 Skills