← 返回 Skills 市场
Prompt-Router
作者
aiwell0721
· GitHub ↗
· v1.0.0
· MIT-0
114
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install prompt-router
功能描述
基于文本匹配的快速路由引擎,为简单任务提供零 LLM 决策的快速路径。支持中英文混合输入,自动匹配技能/工具,低置信度时降级到 LLM 语义路由。
安全使用建议
This package appears to implement a useful local routing engine, but it also contains scripts and documentation that will: 1) collect and persist raw prompts and routing logs (which can contain sensitive data), 2) modify other skills' SKILL.md files (fix_skills.py, generate_metadata.py), and 3) provide automation to create PRs/publish and schedule recurring jobs. Before installing or enabling automated workflows: - Review the code paths that write files (fix_skills.py, generate_metadata.py, scripts/*) and decide whether you trust automatic edits to your skills directory. - Disable or inspect any cron/scheduling steps; do not add cron jobs until you verify behavior. - Check for any functions that perform network actions (create_pr, send_to_discord, send_email, create_issue) and ensure they require explicit credentials and you control them. - If you want the router but not the meta-editing/auto-update behavior, run only the router module (scripts/router.py / scripts/integration.py) and do not run fix/generate/auto-update scripts. - Run the skill in a sandbox or non-production workspace first, and audit the logs directory for sensitive content. If you want, I can point to the exact lines/functions that modify files or log prompts so you can inspect them further.
功能分析
Type: OpenClaw Skill
Name: prompt-router
Version: 1.0.0
The bundle provides a 'Prompt-Router' utility designed to optimize OpenClaw agent performance by using local text-matching to route tasks to specific skills, bypassing unnecessary LLM inference. It includes core logic for tokenization and scoring (scripts/router.py, scripts/scorer.py) and utility scripts (fix_skills.py, generate_metadata.py) that automatically update metadata in other skill files within the user's workspace (C:/Users/User/.openclaw/workspace/skills). While the modification of other files is a high-privilege action, it is functionally necessary for the tool's stated purpose of indexing the workspace, and no evidence of malicious intent, data exfiltration, or unauthorized network activity was found.
能力评估
Purpose & Capability
Name/description claim a local text-matching router. However the package includes utilities (fix_skills.py, generate_metadata.py) that modify other skills' SKILL.md files, plus docs/scripts for publishing and auto-PR creation. Automatically editing other skills' metadata and creating PRs/publishing is not strictly required for a routing decision engine and broadens the skill's authority over the agent ecosystem.
Instruction Scope
SKILL.md and other docs instruct collecting route logs (including raw prompts), creating cron jobs for daily/weekly/monthly automated analysis, auto-generating triggers and PRs, and modifying using-superpowers to call the router. The runtime integration script reads skills from a user workspace and returns matched prompt content. These instructions involve reading and writing local skill metadata and persistent logging of user prompts (potentially sensitive), which goes beyond a simple in-memory routing decision.
Install Mechanism
There is no install spec (code is shipped with the skill). That lowers supply-chain risk compared with remote downloads. The code writes/edits files on disk (e.g., SKILL.md in skills dir), which is expected given the provided scripts but still means the package is capable of modifying local files.
Credentials
The skill does not declare required environment variables or credentials, yet the docs and automation reference GitHub/ClawHub/Discord/email actions (creating PRs, publishing, sending alerts). Those operations would require tokens/credentials not declared by the skill. The code also hardcodes Windows-style absolute paths (C:/Users/User/.openclaw/...), meaning it assumes write access to the user's skills/workspace directories and may fail or behave unpredictably on other environments.
Persistence & Privilege
always:false (normal), but the repository includes scripts and docs that create persistent behaviors: scheduled cron jobs, local logs (~/.../output/prompt-router/logs/), and automated trigger updates that write changes to other skills and generate PRs. While these actions are not automatically run on install, the provided automation makes it straightforward to grant the skill lasting capability to modify the user's skills and to collect historical prompts.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install prompt-router - 安装完成后,直接呼叫该 Skill 的名称或使用
/prompt-router触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
prompt-router v1.0.0
- 首发版本,提供基于文本匹配的快速路由引擎
- 支持中英文混合输入与多字段加权评分算法
- 内置置信度阈值机制,高置信度零 LLM 决策,低置信度自动降级到 LLM
- 包含自定义同义词、路由日志与性能监控功能
- 高性能设计,单次路由决策延迟<5ms
- 附带开发、测试、配置等完整文档和最佳实践
元数据
常见问题
Prompt-Router 是什么?
基于文本匹配的快速路由引擎,为简单任务提供零 LLM 决策的快速路径。支持中英文混合输入,自动匹配技能/工具,低置信度时降级到 LLM 语义路由。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 114 次。
如何安装 Prompt-Router?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install prompt-router」即可一键安装,无需额外配置。
Prompt-Router 是免费的吗?
是的,Prompt-Router 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Prompt-Router 支持哪些平台?
Prompt-Router 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Prompt-Router?
由 aiwell0721(@aiwell0721)开发并维护,当前版本 v1.0.0。
推荐 Skills