prompt-optimizer

基于需求分级,自动重构提示词,从角色、背景、任务、约束、示例五维度优化并智能路由执行,支持多 Agent 并行。

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 41 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description (prompt optimization, agent routing) match the included rules, templates, and scripts. The skill injects prompt-optimization rules into OpenClaw memory and uses agent routing/feishu integration as described. Minor inconsistency: top-level registry metadata stated "No install spec — instruction-only", yet the package includes skill.json with an install section and install/verify scripts — this is explainable (packaged install helper present) but worth noting.
Instruction Scope
SKILL.md and scripts explicitly instruct writing/merging rules into ~/.openclaw/workspace/memory/agent-notes.md, backing up the original, and restarting the Gateway. The scripts also query OpenClaw config (channels.feishu.*) and list agents. There are no instructions to read unrelated user files, shell history, or to transmit data to external endpoints. The scope is appropriate for a rule-injection skill, but it does make persistent changes to agent behavior by editing your memory file.
Install Mechanism
No network download of arbitrary binaries is embedded in the package; install.sh and verify.sh are local scripts that call the platform (openclaw) and copy/append a rules file. Manual install suggests git clone from a GitHub URL (placeholder 'your-repo'). The install approach is low-to-moderate risk but depends on trusting the package source; the script does create backups before merging.
Credentials
The skill requests no environment variables or external credentials. skill.json lists dependencies on memory-core and feishu-plugin which align with the described Feishu streaming/cards integration; the scripts only read OpenClaw config keys and agent listings. No unrelated secrets or excessive credentials are requested.
Persistence & Privilege
The skill writes into the user's OpenClaw memory file and suggests restarting the gateway, which gives it a persistent effect on agent behavior. always is false (good). The package can therefore alter future agent responses until the user removes those rules — this is expected for a rules-injection skill but is a material privilege you should accept explicitly.
Assessment
This skill appears to do what it says (inject prompt-optimization rules and provide routing templates), but it will modify your OpenClaw workspace by appending rules to ~/.openclaw/workspace/memory/agent-notes.md and suggests restarting the gateway. Before installing: 1) Verify the package source (the repository/homepage in files point to placeholder URLs); prefer installing from a trusted registry entry. 2) Inspect rules/prompt-optimization.md yourself to ensure you agree with the injected behavior. 3) Note the installer makes a timestamped backup of your memory file, but keep your own backup if you rely on custom rules. 4) Confirm Feishu/OpenClaw config and plugin expectations (the skill checks streaming/card settings); no credentials are requested by the skill, but platform-level Feishu plugins may require tokens elsewhere. If you’re unsure about altering agent memory permanently, run the installation steps manually (review the file before appending) rather than using the automatic installer.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.1
Download zip
latestvk973hqyrgf56858hg6kavp62eh830425

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

Prompt 优化系统 Skill(V3.0)

让 AI 自动完成专业级 Prompt 重构,用户说人话即可

版本:V3.0
作者:向前
参考体系:PromptPilot 工程化 Prompt 优化体系
适用平台:OpenClaw + 飞书多 Agent 环境


安装方式

方式 1:自动安装(推荐)

openskills install prompt-optimizer-100

注意:clawhub.ai 上的 slug 为 prompt-optimizer-100,安装时请使用完整名称。

方式 2:手动安装

# 1. 下载 Skill 文件
git clone https://github.com/your-repo/prompt-optimizer.git

# 2. 复制规则文件
cp prompt-optimizer/rules/prompt-optimization.md ~/.openclaw/workspace/memory/agent-notes.md

# 3. 重启 Gateway
openclaw gateway --force

方式 3:Merge 模式(保留原有规则)

# 安装时选择 merge 模式
openskills install prompt-optimizer --merge

# 或手动合并
# 1. 备份原有规则
cp ~/.openclaw/workspace/memory/agent-notes.md ~/.openclaw/workspace/memory/agent-notes.md.bak

# 2. 追加新规则
cat prompt-optimizer/rules/prompt-optimization.md >> ~/.openclaw/workspace/memory/agent-notes.md

# 3. 重启 Gateway
openclaw gateway --force

核心功能

功能说明
需求分级自动判断 L1-L4 任务等级
Prompt 优化5 维度重构(角色/背景/任务/约束/示例)
Agent 路由单 Agent / 多 Agent 并行
执行保障自检清单 + Badcase 闭环
Merge 模式保留用户原有规则,增量更新

需求分级规则

等级关键词处理方式示例
L1 简单默认直接执行"写一篇 300 字文章"
L2 中等调研/分析/设计/规划展示优化思路 → 执行"调研一下竞品"
L3 复杂对比/选型/评审/架构多 Agent 并行 → 对比"技术选型方案"
L4 关键客户/发布/对外/重要显式确认 → 执行"生成客户方案 PPT"

角色使用规则

场景是否加角色示例角色
L1 简单❌ 不加-
L2 调研/分析✅ 加产品经理/分析师
L3 方案/选型✅ 加架构师/顾问
L4 交付✅ 加资深顾问

回复格式模板

L1 简单任务

【交付内容】
{content}

L2-L3 中等/复杂任务

📋 原始需求:{user_input}
🎯 优化思路:{optimization_summary}
🤖 执行 Agent:{agent_name}
⏱️ 耗时:{duration}秒

【交付内容】
{content}

L4 关键任务(确认阶段)

📋 原始需求:{user_input}

🎯 优化后的执行方案:
【任务】{task_description}
【维度】{dimensions}
【Agent】{agents}
【预计耗时】{duration}

请确认或修改:
- 回复"确认"立即执行
- 回复"补充 XXX"添加要求
- 回复"只要 XXX"简化范围

⏳ 等待确认...

安装后验证

运行验证脚本

./scripts/verify.sh

手动测试

测试用例输入预期输出
L1 测试"写一篇 300 字文章"直接执行,无优化思路
L2 测试"调研一下竞品"展示🎯优化思路 + 执行
L3 测试"技术选型方案"展示🎯优化思路 + 多 Agent 对比
L4 测试"生成客户方案 PPT"显式确认方案

配置要求

配置项要求验证命令
OpenClaw≥ 2026.3.8openclaw --version
飞书插件≥ 1.2.0openclaw plugins list
记忆系统已启用ls memory/
流式输出已开启openclaw config get channels.feishu.streaming

卸载方式

openskills uninstall prompt-optimizer

完整文档


更新日志

版本时间核心修改
V02026-03-16 初版初始方案(需求分级 + Agent 路由)
V12026-03-16 优化增加 L2-L3 展示优化思路
V22026-03-16 修正承认错误 + 增加自检机制
V32026-03-16 完善基于 PromptPilot 完善 + OpenClaw 融合

License

MIT License

Files

10 total
Select a file
Select a file to preview.

Comments

Loading comments…