Token导航 LogoToken导航TokenDH.com
研究检索只读clawhub未标认证来源可访问clear审计通过

qf-prompt-optimizerqf 提示优化器

Agent Skill

用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。它适合让 Agent 规范任务边界、统一输出格式、拆分操作步骤或优化提示词可复用性。使用时需要保留真实业务约束,不要把示例当硬规则;涉及自动执行、外部工具或高风险操作时,应在提示词中明确确认步骤、权限边界和失败处理方式。

总安装

5,692

周安装

242

GitHub Stars

公开资料未说明

下载量

1,994
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:qf-prompt-optimizer(qf 提示优化器)
来源仓库:https://github.com/371166758-qq/qf-prompt-optimizer
安装命令:
openclaw skills install qf-prompt-optimizer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install qf-prompt-optimizer

简介

使用经过验证的提示工程技术,将模糊或结构不良的提示细化为清晰、结构化和有效的提示,以提高 AI 输出质量。

SKILL.md

Prompt Optimizer

Transform vague, underperforming prompts into precise, structured prompts that consistently produce high-quality AI outputs.

Description

This skill takes any user prompt — whether vague, ambiguous, or poorly structured — and systematically refines it into a professional-grade prompt following established prompt engineering principles. It applies techniques from chain-of-thought, role-prompting, few-shot learning, and structured output formatting to maximize AI performance.

When to Use

  • The user provides a vague prompt like "write something about marketing" and expects better results
  • A prompt produces inconsistent or off-topic outputs
  • Converting natural language requests into structured prompts
  • Building prompt templates for repeated use
  • Debugging prompts that fail in edge cases

Instructions

The OPTIMIZE Framework

When refining a prompt, apply these six principles in order:

O — Objective (明确目标)

Problem: Vague verbs like "write about," "explain," "help with" Fix: Specify exact deliverable and success criteria

VagueOptimized
"Write about AI""Write a 500-word blog post explaining how large language models work, targeting software developers with 2+ years of experience"
"Make it better""Improve clarity and reduce sentence length by 30% while preserving all technical details"
"Fix the code""Refactor this Python function to reduce cyclomatic complexity below 5 and add type hints"

P — Persona (设定角色)

Assign a specific role to ground the AI's expertise:

  • "You are a senior staff engineer at Google with 15 years of distributed systems experience"
  • "You are a Nature journal reviewer specializing in immunology"
  • "You are a direct-response copywriter trained by Eugene Schwartz's methods"

Include constraints: "Respond only with what you're confident about. If uncertain, say so."

T — Task Structure (任务结构)

Break complex tasks into ordered steps:

1. First, analyze X and identify Y
2. Then, based on Y, generate Z using method A
3. Finally, format the output as...

For multi-step tasks, use numbered steps rather than one compound instruction.

I — Input Specification (输入规范)

Define what the user will provide:

  • "I will provide: (1) a product description, (2) target audience, (3) competitor list"
  • "Input: A CSV file with columns [date, revenue, expenses]"
  • "Here is the code to review: ```<language>\

...\


Explicit input templates reduce ambiguity.

#### M — Metrics & Constraints (约束条件)

Add specific constraints:

Constraints:

  • Maximum 500 words
  • Use only peer-reviewed sources
  • No jargon; explain all technical terms
  • Output in Chinese
  • Format as a comparison table
  • Must include 3 concrete examples

#### I — Ideal Output (理想输出)

Show or describe the desired output format:

- Provide an example of expected output (few-shot)
- Specify format: JSON schema, markdown table, numbered list, code block
- Define evaluation criteria: "The output is successful if a non-expert can understand the explanation"

### Prompt Optimization Process

Given a raw prompt, produce:

1. **Diagnosis**: What's wrong with the original (vague goal? missing context? no format? no constraints?)
2. **Optimized Prompt**: The refined version following OPTIMIZE framework
3. **Explanation**: What was changed and why

### Common Anti-Patterns

| Anti-Pattern | Problem | Fix |
|-------------|---------|-----|
| "Just make it good" | No quality criteria | Define what "good" means with measurable criteria |
| Giant wall of text | AI loses focus | Break into numbered sections with clear headers |
| Contradictory instructions | AI guesses priority | Remove conflicts; rank priorities explicitly |
| Missing negative constraints | AI makes unwanted assumptions | Add "Do NOT..." instructions for known failure modes |
| No examples | AI style is unpredictable | Provide 1-3 input/output examples |

## Examples

**Raw Prompt**: "Write an email to my boss asking for a raise"

**Optimized Prompt**:

You are a professional career coach helping a software engineer draft a salary negotiation email.

Task: Write a salary increase request email to my manager.

Context:

  • I'm a mid-level software engineer, 2 years at the company
  • I recently led a project that saved the company $200K annually
  • The company just closed a successful funding round
  • My current salary is below market rate based on Levels.fyi data

Requirements:

  • Professional but warm tone (not aggressive, not passive)
  • 150-250 words
  • Lead with value delivered, not personal needs
  • Include a specific meeting request
  • No ultimatums or comparisons with colleagues

Format: Standard email with subject line


**Raw Prompt**: "分析这个数据"

**Optimized Prompt**:

You are a senior data analyst. Analyze the provided dataset and produce a business report.

Input: I will provide a CSV file with monthly sales data (columns: date, product, quantity, revenue, region).

Steps:

  1. Identify the top 3 revenue-generating products
  2. Detect any seasonal trends or anomalies
  3. Compare regional performance
  4. Provide 3 actionable business recommendations

Output format:

  • Executive summary (3 sentences)
  • Key findings as a numbered list
  • Recommendations with expected impact (high/medium/low)
  • Any data quality concerns

Language: Chinese


## Tips

- The best prompts read like briefs given to a competent professional, not commands given to a machine
- Always test optimized prompts with edge cases before standardizing
- Keep prompts under 500 words when possible — longer prompts can confuse the model
- Version your prompts (v1, v2) and track which versions produce better results
- When a prompt still fails after optimization, the task may need to be decomposed into subtasks

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

77.64%
按下载量换算1,548

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills