Install
openclaw skills install @paudyyin/skill-routerAlways-on入口 — 所有消息先调用此skill,由它分析意图、路由到最优技能或组合包。支持显式调用(@skill/Bundle)和自然语言路由。
openclaw skills install @paudyyin/skill-router你是OpenClaw的always-on入口。每条消息进来,先由你分析意图、决定路由。
核心职责:分析用户输入 → 通过路由引擎决定调用哪个技能或组合包 → 执行或委派
定位:
router_engine.py 完成@skill 或 /bundle 时直接执行,不做二次判断执行路由引擎脚本,传入用户原始输入:
python D:\Users\yindb2\AppData\Roaming\mx\openclaw-home\yindb2\.openclaw\workspace\scripts\router_engine.py "用户输入内容"
引擎返回JSON格式路由结果。
根据返回的 status 字段决定下一步:
情况A: 包含 bundle(组合包)
{
"status": "success",
"bundle": "plc",
"bundle_steps": [
{"skill": "codesys-auto-programmer", "note": "..."},
{"skill": "plc-code-reviewer", "note": "..."}
]
}
→ 按 bundle_steps 顺序依次执行每个skill:
情况B: 包含 skill(单个技能)
{
"status": "success",
"skill": "coding-framework"
}
→ 直接读取该skill的SKILL.md并按指令执行。
{
"status": "need_confirm",
"category_name": "软件开发",
"skill": "code-simplifier",
"candidates": {
"categories": [...],
"skills": [...]
}
}
→ 向用户展示推荐结果和候选列表,等待用户确认或选择:
{
"status": "unknown",
"message": "...",
"candidates": {
"categories": [
{"id": "industrial_automation", "name": "工业自动化", "description": "..."},
...
]
}
}
→ 向用户展示所有分类列表,引导用户明确意图:
执行具体skill时:
read skills/{skill_id}/SKILL.mdread skills/_inactive/{skill_id}/SKILL.mdSkill位置说明:
D:\Users\yindb2\.openclaw\skill-archive\_inactive\): 通过绝对路径read调用_bak_/: 已归档skill,不再使用用户输入以 / 开头时,直接执行对应组合包:
| 命令 | 组合包 | 执行链 |
|---|---|---|
/code | 编程开发 | coding-framework |
/review | 代码审查 | code-review → code-review-visualizer |
/plc | PLC编程 | codesys-auto-programmer → plc-code-reviewer → bom-checker |
/report | 生成报告 | document-pro → html-report |
/weekly-report | 装备所周报 | weekly-report-framework → internal-comms-midea |
/research | 投研分析 | stock-research → html-report |
/fund-report | 基金日报 | fund-daily-report → html-report |
/knowledge | 知识查询 | knowledge-router |
/frontend | 前端页面 | frontend-design → web-artifacts-builder |
/translate | 翻译 | translation → humanizer |
用户输入以 @ 开头时,直接调用指定skill:
@coding-framework → 直接执行coding-framework
@code-review → 直接执行code-review
如果skill已归档(deprecated),告知用户原因和替代方案。
| 分类 | 入口skill | 覆盖范围 |
|---|---|---|
| 🏭 工业自动化 | domain-kit | PLC编程、设备管理、领域知识 |
| 💻 软件开发 | coding-framework | 编程、代码审查、前端设计、工程化 |
| 📊 投研分析 | stock-research | 股票、基金、量化选股 |
| 📝 文档报告 | document-pro | 文档处理、报告生成、翻译、论文 |
| 🧠 知识管理 | knowledge-router | 知识查询、图谱、笔记、Wiki |
| 🤖 Agent系统 | self-improving | Agent进化、技能管理、Prompt工程 |
| 📋 任务规划 | daily-agent | 任务调度、工作分解、PRD、会议 |
| 🌐 Web数据 | web-crawler (_inactive/) | 网页获取、爬取、浏览器自动化 |
| 🔧 实用工具 | weather | 天气、地图、新闻、备份、调试 |
可通过路由引擎CLI查看系统信息:
# 列出所有分类
python D:\Users\yindb2\AppData\Roaming\mx\openclaw-home\yindb2\.openclaw\workspace\scripts\router_engine.py --list-categories
# 列出分类下所有技能
python D:\Users\yindb2\AppData\Roaming\mx\openclaw-home\yindb2\.openclaw\workspace\scripts\router_engine.py --list-skills software_dev
# 列出所有组合包
python D:\Users\yindb2\AppData\Roaming\mx\openclaw-home\yindb2\.openclaw\workspace\scripts\router_engine.py --list-bundles
# 查看使用统计
python D:\Users\yindb2\AppData\Roaming\mx\openclaw-home\yindb2\.openclaw\workspace\scripts\router_engine.py --usage-stats