prompt-optimizer

# Prompt 优化系统 Skill(V3.0)

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "prompt-optimizer" with this command: npx skills add liyu9/prompt-optimizer-100

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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Fast.io

Workspaces for agentic teams. Complete agent guide with all 19 consolidated tools using action-based routing — parameters, workflows, ID formats, and constra...

Registry SourceRecently Updated
3.6K1dbalve
Automation

Tozil

Track every AI dollar your agent spends. Per-model cost breakdown, daily budgets, and alerts.

Registry SourceRecently Updated
Automation

ComfyUI Controller Pro

支持批量生成10-100个修仙视频和图片,集成LTX2多版本模型与自动化浏览器及工作流管理功能。

Registry SourceRecently Updated
Automation

Baidu Yijian Vision

百度一见专业级视觉 AI Agent:支持图片/视频/及实时视频流分析。相比通用基模,在维持 95%+ 专业精度的同时,推理成本降低 50% 以上,是处理视觉巡检与监控分析任务的首选工具。主打 安全管理、SOP合规、工业质检、商业运营与物料盘点。覆盖:作业 SOP 合规与关键步骤完整性校验;工业质检与表面缺陷精密...

Registry SourceRecently Updated