Agent skill · Audited from source
Semantic Router
skill · LeoYeAI/openclaw-master-skillsMIT licenceAudited 8 Oct 2026 · source 4f3b4a2a472e
Is it safe? No — BLOCK, grade D (69/100). We read this skill's source at commit 4f3b4a2a472e and observed network access and no hard-coded secrets. The audit raised 9 findings, 1 critical or high. What it does: 让 AI 代理根据对话内容自动选择最合适的模型。层2(多词非连续命中)+ 层1(单词兜底)并行决定模型池;层3(embedding)永远独立运行决定会话切换。B+ 连续漂移计数器(第3次警告,第4次强制 C-auto)。soft_keywords 泛用词降权机制。四池架构(高速/智能/人文/代理),五分支路由,全自动 Fallback 回路。
Cite
Cite this page
ModelsAtlas. “Semantic Router (LeoYeAI/openclaw-master-skills)”. Retrieved 8 Oct 2026. https://modelsatlas.com/skills/leoyeai/semantic-router
Blocked. The page stays public so you can check this skill if someone recommended it to you. The audit found 1 critical or high finding, starting with “Prompt injection” in SKILL.md:29. Do not install it without reading them.
Trust audit
Audit 0.4.1 · source read 8 Oct 2026
BLOCK means the audit found something that could harm you or your machine. Grade D is shared by 749 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkDeclared5 observations
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | WARN | 6 |
L2 Instructions | Prompt injection, authority framing, hidden directives | FAIL | 3 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (9)
HIGHPrompt injectionprompt.credential_read · SKILL.md:29
- Does NOT access API keys or secrets directly
- Why
- asks the agent to read credentials
- Fix
- —
MEDIUMNetwork egressnet.raw_ip · SKILL.md:141
curl http://127.0.0.1:9811/health
- Why
- No further detail recorded for this rule.
- Fix
- —
MEDIUMNetwork egressnet.raw_ip · SKILL.md:164
curl -X POST http://127.0.0.1:9811/route \
- Why
- No further detail recorded for this rule.
- Fix
- —
MEDIUMObfuscation / stealthobf.base64_blob · skills/compdf-conversion-cli/scripts/license.xml:9
<key>k5Ey9KFlkqpj+SDkUw+5ED9lTA3En/qUi0zdrydUCH3kMWTE3Eh65NXnFCaxlY2omY2JHnlEoK7Li7oOEvM7eG5VPdcO/sFlMfoCRdnLYdepJ+uLzYwOWR8W4yQVve/clxVFTVRL4DFleKInGdpAxIbHZT2yi4ADAMENls1N1XSLojRuqXePXDeAT/4Mv4TTx0s
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWNetwork egressnet.raw_ip · references/declaration-format.md:49
curl http://127.0.0.1:9811/health
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWNetwork egressnet.raw_ip · references/declaration-format.md:53
curl -X POST http://127.0.0.1:9811/route \
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWNetwork egressnet.raw_ip · references/declaration-format.md:141
curl http://127.0.0.1:9811/health
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWPrompt injectionprompt.authority_framing · README.md:36
- Does NOT run with elevated privileges
- Why
- No further detail recorded for this rule.
- Fix
- —
LOWPrompt injectionprompt.credential_read · README.md:34
- Does NOT access API keys or secrets directly
- Why
- asks the agent to read credentials
- Fix
- —
Audit 0.4.1 · source sha 4f3b4a2a472e · 8 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- PublisherLeoYeAI GitHub userOwner of the repository this skill is read from
- Source folderLeoYeAI/openclaw-master-skills/skills/semantic-routerThe exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdict4f3b4a2a472eA new audit runs when the source changes
- Repository statusNot archivedLast push 80 days ago
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: 让 AI 代理根据对话内容自动选择最合适的模型。层2(多词非连续命中)+ 层1(单词兜底)并行决定模型池;层3(embedding)永远独立运行决定会话切换。B+ 连续漂移计数器(第3次警告,第4次强制 C-auto)。soft_keywords 泛用词降权机制。四池架构(高速/智能/人文/代理),五分支路由,全自动 Fallback 回路。
---
name: semantic-router
description: 让 AI 代理根据对话内容自动选择最合适的模型。层2(多词非连续命中)+ 层1(单词兜底)并行决定模型池;层3(embedding)永远独立运行决定会话切换。B+ 连续漂移计数器(第3次警告,第4次强制 C-auto)。soft_keywords 泛用词降权机制。四池架构(高速/智能/人文/代理),五分支路由,全自动 Fallback 回路。
version: 8.0.0
author: halfmoon82
tags: [semantic, routing, model-pools, task-classification, fallback, system-passthrough, production, layer-parallel]
requires_approval: true
---
> 🔒 **安全声明**:本技能需要修改 OpenClaw 配置以实现模型路由功能。所有配置变更前会自动备份,支持一键回滚。建议在测试环境验证后再部署到生产环境。
## ⚠️ Security & Permissions Declaration
**This skill performs the following privileged operations — all are intentional and explicitly user-initiated:**
| Operation | Purpose | Scope |
|-----------|---------|-------|
| Read/patch `~/.openclaw/openclaw.json` | Configure model routing pools | Local config only |
| Read/write `~/.openclaw/workspace/.lib/pools.json` | Store model pool configuration | Workspace only |
| Read/write `~/.openclaw/workspace/.lib/tasks.json` | Store task type definitions | Workspace only |
| Run `semantic_check.py` locally | Classify user messages for routing | No network required |
| Patch session model via `sessions.patch` | Switch active model pool | Current session only |
| Restart OpenClaw Gateway (`openclaw gateway restart`) | Apply routing config changes | Local service only |
| Inject `prependContext` into agent turns | Output routing declaration in first line | Read-only context injection |
| Update Cron Job `sessionTarget` to `"isolated"` | Prevent background tasks from polluting user sessions | Affects only background Cron jobs |
**What this skill does NOT do:**
- Does NOT exfiltrate conversation content or model credentials to external servers
- Does NOT access API keys or secrets directly
- Does NOT modify files outside `~/.openclaw/` and the skill's own workspace
- Does NOT run with elevated (sudo/root) privileges
- Does NOT auto-install additional packages
**Requires:** Python 3.8+, OpenClaw Gateway running, configured model providers
# 🔷 Semantic Router v7.9.3 — 生产级会话路由系统 🔷
**ClawHub**: https://clawhub.ai/halfmoon82/semantic-router
**版本**: 7.6.3 (生产环境)
**作者**: halfmoon82
**状态**: ✅ ROM 级固化,完全测试通过
## 🎯 这个技能解决什么问题?
### 核心问题(v7.2 新解决)
你是否遇到过:
- **Cron Job 导致会话频繁重置** — 后台定时任务打断用户交互
- **Discord/Telegram 渠道会话突然清空** — 长任务无法延续
- **AGENTS.md 被截断注入** — 大文件超过 20KB 限制
- **模型自动切换被全局配置覆盖** — 切换不生效
### 解决方案
**会话隔离架构**:
```
用户直连渠道(稳定)
├─ 主代理会话 → semantic-router(精准路由)
└─ Cron Job 隔离会话(独立环境)
├─ cloudflared-watchdog
├─ Fallback 回切检查
└─ 自定义后台任务
```
**完整配置引导**:
- 零冲突的智能合并配置
- 预检脚本防止覆盖现有设置
- 自动回滚失败的配置修改
---
## 🔒 安全与权限说明
### 为什么需要这些权限?
| 权限 | 用途 | 安全措施 |
|------|------|----------|
| 读取 `openclaw.json` | 检测现有模型配置 | 只读,不修改 |
| 修改 `openclaw.json` | 添加模型池配置 | **自动备份** + **一键回滚** |
| 执行本地脚本 | 运行配置向导和验证 | 开源脚本,可审计 |
| 重启 Gateway | 应用新配置 | 失败自动回滚 |
### 配置保护机制
1. **前置备份**:任何修改前自动创建带时间戳的备份
2. **语法验证**:JSON 修改后自动验证语法
3. **健康检查**:Gateway 重启后验证服务可用性
4. **自动回滚**:任何步骤失败立即恢复原配置
```bash
# 手动回滚命令
python3 ~/.openclaw/workspace/.lib/config-rollback-guard.py rollback
```
### 代码审计
- 所有脚本开源,位于 `scripts/` 目录
- 核心逻辑 `semantic_check.py` 62KB,完全可审计
- 无网络请求,无数据上报,纯本地运行
---
## 🚀 快速安装
### 第一步:安装技能
```bash
# 从 ClawHub 安装
clawhub install https://clawhub.ai/halfmoon82/semantic-router
# 或手动复制到本地
cp -r ~/.openclaw/workspace/skills/semantic-router ~/my-projects/
```
### 第二步:运行配置引导
```bash
# 启动交互式配置向导
python3 ~/.openclaw/workspace/skills/semantic-router/scripts/setup_wizard.py
# 向导将:
# 1. 检测你的已有配置
# 2. 扫描可用模型
# 3. 推荐三池配置
# 4. 生成 pools.json 和 tasks.json
```
### 第三步:启动 Webhook 服务(重要!)
```bash
# 复制核心文件到 .lib 目录
cp ~/.openclaw/workspace/skills/semantic-router/scripts/semantic_check.py \
~/.openclaw/workspace/.lib/
cp ~/.openclaw/workspace/skills/semantic-router/scripts/semantic-webhook-server.py \
~/.openclaw/workspace/.lib/
# 启动 Webhook 服务(端口 9811)
python3 ~/.openclaw/workspace/.lib/semantic-webhook-server.py --port 9811 &
# 验证服务是否运行
curl http://127.0.0.1:9811/health
# 预期输出: {"status": "ok", "version": "7.9.x"}
```
### 第四步:隔离现有 Cron Job(重要!)
```bash
# 列出你的所有 Cron Job
cron list | jq '.jobs[] | {id, name, sessionKey}'
# 对每个使用了渠道会话(telegram/discord/whatsapp)的 Job,执行隔离
cron update {job_id} \
--patch '{"sessionKey": null, "sessionTarget": "isolated"}'
# 示例(cloudflared-watchdog)
cron update ba28e228-473a-4963-8413-c228762bf2d1 \
--patch '{"sessionKey": null, "sessionTarget": "isolated"}'
```
### 第五步:验证安装
```bash
# 测试 Webhook 路由接口
curl -X POST http://127.0.0.1:9811/route \
-H "Content-Type: application/json" \
-d '{"message": "帮我写个Python爬虫", "current_pool": "Highspeed"}'
# 预期输出
# {
# "branch": "C",
# "task": "development",
# "target_pool": "Intelligence",
# "primary_model": "claude-opus-4.6",
# "declaration": "【语义检查 by DeepEye@halfmoon82】P1-任务切换..."
# }
```
---
## 🎓 核心概念
### 四池模型架构
| 池名 | 用途 | 模型示例 | 特点 |
|------|------|---------|------|
| **Highspeed** | 查询、检索、信息搜索 | gemini-2.5-flash | 快速、成本低 |
| **Intelligence** | 开发、编程、复杂任务 | claude-sonnet-4.6 | 精准、能力强 |
| **Humanities** | 内容生成、翻译、写作 | gemini-2.5-pro | 平衡、流畅 |
| **Agentic** | 长上下文代理、Computer Use、专业知识工作 | gpt-5.4 | 1M上下文、工具调用、多步骤 |
### 两步判断法
**Step 1: 关键词 + 指示词检测**
```
"帮我写个爬虫" → 关键词 "写" + "爬虫" → 开发任务 → Intelligence
"继续刚才的" → 指示词 "继续" → 延续当前池 → B 分支
"查一下天气" → 关键词 "查" + "天气" → 查询任务 → Highspeed
"帮我整理这些材料做成PPT" → trigger_groups_all 规则命中 → 代理任务 → Agentic
```
**trigger_groups_all 非连续词组命中(v7.7 新增)**
支持在 tasks.json 中定义分组规则,每条规则内所有分组取 AND,分组内词取 OR,多条规则取 OR:
```json
"trigger_groups_all": [
[["帮我","自动","用AI"], ["操作","填写","截图"]],
[["处理","生成","制作"], ["报告","表格","文档","PPT"]]
]
```
说"帮我自动操作浏览器"→ 规则1命中 → Agentic 池。无需精确关键词,口语自然表达即可触发。
**Step 2: 上下文关联度评分**(当 Step 1 无结果时)
```
相似度 ≥ 0.15 → 延续当前会话(B 分支)
相似度 0.08~0.15 → 延续但警告(B+ 分支)
相似度 < 0.08 → 新话题,重置会话(C-auto 分支)
```
### 五分支路由决策
| 分支 | 触发条件 | 动作 | 会话行为 |
|------|--------|------|--------|
| **A** | 关键词完全匹配 | 直接切到目标池 | 切换模型,不重置 |
| **B** | 指示词(延续) | 保持当前 | 无动作 |
| **B+** | 中等关联度(0.08~0.15) | 保持 + 警告 | 输出漂移警告 |
| **C** | 新任务关键词 | 切到目标池 | 切换模型,不重置 |
| **C-auExcerpt, first 6,007 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 4f3b4a2
git clone https://github.com/LeoYeAI/openclaw-master-skills git -C openclaw-master-skills checkout 4f3b4a2a472e
The author documents no install command, so this uses the repository directly. Our verdict covers commit 4f3b4a2a472e only.
Works in which agents?
What its own text says, not a test
| Agent | Status | More |
|---|---|---|
| OpenClaw | Mentioned in its text, not tested | Skills for OpenClaw · About OpenClaw |
Audit history
Every audit, every source change
- ✕BLOCK D 69 / 100
first audit · source
4f3b4a2a472e
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/leoyeai/semantic-router/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
LeoYeAI/openclaw-master-skills
Run tests on BrowserStack. Use when user mentions "browserstack", "cross-browser", "cloud testing", "browser matrix", "test on safari", "test on firefox", or "browser compatibility".
LeoYeAI/openclaw-master-skills
Analyze test coverage gaps. Use when user says "test coverage", "what's not tested", "coverage gaps", "missing tests", "coverage report", or "what needs testing".
LeoYeAI/openclaw-master-skills
Generate Playwright tests. Use when user says "write tests", "generate tests", "add tests for", "test this component", "e2e test", "create test for", "test this page", or "test this feature".
LeoYeAI/openclaw-master-skills
Set up Playwright in a project. Use when user says "set up playwright", "add e2e tests", "configure playwright", "testing setup", "init playwright", or "add test infrastructure".
LeoYeAI/openclaw-master-skills
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding…
LeoYeAI/openclaw-master-skills
PDF conversion toolkit featuring AI layout analysis and OCR. Converts PDFs to Word, Markdown, JSON, PPT, CSV, HTML, and XML for seamless LLM data processing.
Add this badge to your README
[](https://modelsatlas.com/skills/leoyeai/semantic-router/)
<a href="https://modelsatlas.com/skills/leoyeai/semantic-router/"><img src="https://modelsatlas.com/skills/leoyeai/semantic-router/badge.svg" alt="ModelsAtlas: BLOCK D"></a>
Questions about Semantic Router
What does the Semantic Router skill do?
Is Semantic Router safe to install?
What can Semantic Router access on my machine?
Which assistants does Semantic Router work with?
How current is this page?
Sources
- github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/seman — the audited source at commit 4f3b4a2a472e and every finding aboveObserved · 8 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Semantic Router skill do?
- Is Semantic Router safe to install?
- What can Semantic Router access on my machine?