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

技能编辑器

编辑、完善或审查 AgentSkills。当需要创建新技能、对现有 SKILL.md 进行修改、清理/审计/整理技能文件时激活此技能。触发词:编辑技能, skill 注意事项, metadata 检查, 完善技能, 清理技能, 审计技能, skill 规范, 编写 skill, 新建技能

Registry SourceRecently Updated
Automation

全闭环管道

全闭环自动化管道 — Hunter→Skill Factory→Orchestrator→Dashboard→Profit。将Phase 1-3所有组件串联为自动运行的超级管道。核心能力:(1) 一键全流程 (2) 定时自动运行 (3) 异常自愈 (4) 利润报告

Registry SourceRecently Updated
Automation

智美人AI实战课

《智美人AI Agent实战课》配套技能——从0到1搭建AI Agent的完整课程体系。第01节:AI Agent基础概念+工具链搭建。课程内容含数字人讲解视频、实战代码、课后练习。覆盖:OpenClaw配置、技能安装、MCP工具、多Agent协同、变现实战。

Registry SourceRecently Updated
Automation

利润优化引擎

利润优化引擎 — 订单管理/计价/结算模拟。核心能力:(1) 订单管理 (2) 计价模型 (3) 成本追踪 (4) 利润计算

Registry SourceRecently Updated