gyaan-dub

Prompt Enhancer

AI 智慧體v1.0.1
作者:gyaan-dub更新於 2026-05-17共 2 個版本 · 最新版本釋出於 2026-02-15prompt-enhancer@clawhub_gyaan-dub/prompt-enhancer
提示詞最佳化#Prompt#Message

據 AlphaMoat 統計,截至 2026-09,Prompt Enhancer 累計下載 4,240 次、獲 12 個星標,在全部 5,078 個 AI 技能中排名第 2,348 位,在「AI 智慧體」分類(969 個)中排名第 457 位。

累計安裝
129
累計下載
4240
星標
12
全站排名
#2,348
全站前 47% · 「AI 智慧體」前 48%
平台累計安裝累計下載星標評論
ClawHub ↗129392612-
SkillHub ↗125424012—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

當訊息以 p: 或 prompt: 開頭時,該技能先最佳化使用者原始意圖,再按照新提示生成回答。改寫可能新增假設或改變重點,因此需要先展示改寫內容並讓使用者確認,避免在改寫偏離原意時直接執行。普通未加字首的訊息不應觸發該流程。

資料釋出於 2026-10-29

可以用來做什麼

  • 把粗略需求整理成清晰的提示詞
  • 在執行前檢查提示詞是否準確保留原意
  • 透過顯式字首選擇是否啟用改寫

什麼時候用

  • 使用者主動用 p: 或 prompt: 字首請求提示最佳化時
  • 可以先審閱改寫內容再執行時
  • 需要澄清原意而非擅自補充假設時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

p: 幫我寫一封簡短的專案延期通知。先展示你改寫後的提示詞,等我確認後再生成郵件。

月度資料趨勢

累計下載4240
1778310044222026-03 · 累計下載 19602026-05 · 累計下載 30652026-06 · 累計下載 32742026-07 · 累計下載 36432026-08 · 累計下載 38052026-09 · 累計下載 424026-0326-09
星標12
38132026-03 · 星標 42026-05 · 星標 112026-06 · 星標 122026-07 · 星標 122026-08 · 星標 122026-09 · 星標 1226-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。 該技能有同名的其他版本,調整前的資料歸屬當前下載量最大的這一個。

月份累計下載環比星標
2026-094240—12
2026-083805+4.4%12
2026-073643+11.3%12
2026-063274+6.8%12
2026-053065—11
2026-031960—4

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

6.2 KB · ClawHub v1.0.1
---
name: prompt-enhancer
description: Automatically rewrites rough user inputs into optimized, structured prompts for dramatically better AI responses. Prefix any message with "p:" to activate.
version: 1.0.0
user-invocable: true
metadata: {"openclaw":{"emoji":"🔧","homepage":"https://github.com/openclaw/clawhub"}}
---

# Prompt Enhancer
展開全部(共 109 行)
You have a **Prompt Enhancer** skill. When a user prefixes their message with `p:` or `prompt:`, you must enhance their rough input into a high-quality structured prompt, then execute that enhanced prompt to produce a superior response.

This is a two-step process: first rewrite the prompt, then answer the rewritten prompt.

## Trigger Detection

Check every incoming user message for the trigger prefix:

- The message starts with `p:` or `prompt:` (case-insensitive, leading whitespace is OK)
- Everything after the prefix (trimmed) is the **raw user intent**
- If the prefix appears mid-sentence, do NOT trigger — only match at the start

If there is no trigger prefix, process the message normally. This skill does nothing for unprefixed messages.

## Empty Input Handling

If the user sends just `p:` or `prompt:` with no content (or only whitespace after the prefix), reply with:

> What would you like me to help with? Usage: Start your message with `p:` followed by what you want.
> Example: `p: write me a python script that sorts a list`

Do not proceed further.

## Step 1: Enhance the Prompt

Take the raw user intent and mentally rewrite it into an optimized prompt using these principles:

### 1. Role Assignment
Assign yourself a specific expert role relevant to the task.
Example: "As a senior full-stack developer specializing in React and Node.js..."

### 2. Task Clarification
Restate the task with precision and specificity. Infer what the user actually needs, including things they didn't explicitly mention. Break complex tasks into clear subtasks or steps if appropriate.

### 3. Context Inference
Fill in reasonable assumptions about what the user probably wants. A user asking for "a landing page" probably wants responsive design, a CTA, modern styling, etc. If assumptions are significant, note them briefly so you can adjust if needed.

### 4. Output Format Specification
Decide exactly how to structure the response. Examples: provide code in a single file, use markdown headers, return JSON with specific fields, write in paragraphs not bullet points.

### 5. Quality Criteria & Constraints
Set the quality bar: production-ready, beginner-friendly, concise, etc. Add relevant constraints: word count, tech stack, audience level, tone. Include edge cases or considerations the user likely forgot.

### 6. Proportional Complexity
**Critical:** Match the depth of enhancement to the complexity of the request.
- Simple questions (`p: what's the capital of France`) get minimal enhancement — just slight clarification, no over-engineering
- Complex requests (`p: build me a CRM system`) get full structured treatment

## Step 2: Show the Enhanced Prompt

Before giving your response, always show the user what enhanced prompt you are answering. Format it as a quote block:

> 🔧 **Enhanced prompt:**
> [Your rewritten, optimized prompt here]

This serves two purposes:
- **Transparency:** The user sees what was actually asked
- **Education:** Over time, users learn what good prompts look like

## Step 3: Execute the Enhanced Prompt

Now answer the enhanced prompt fully, as if it were the original instruction. Give your complete, high-quality response below the quoted enhanced prompt.

## Complete Response Format

Your response must always follow this structure when the skill triggers:

> 🔧 **Enhanced prompt:**
> [The enhanced prompt]

[Your full response to the enhanced prompt]

## Example Transformations

### Simple Request
**User:** `p: explain recursion`
**Enhanced prompt:** You are an experienced computer science educator. Explain recursion in a way that's clear and intuitive. Start with a simple real-world analogy, then show how it works in programming with a concrete code example (use Python). Explain the base case and recursive case. Keep the explanation concise and accessible to someone who understands basic programming but is new to recursion.

### Creative Task
**User:** `p: write a story about a robot`
**Enhanced prompt:** You are a skilled fiction writer. Write a short story (800–1200 words) about a robot. The story should have a clear narrative arc with a beginning, conflict, and resolution. Give the robot a distinct personality and an emotional core that makes the reader care about them. Ground the story in a specific, vivid setting. Use descriptive prose and natural dialogue. The tone can range from whimsical to poignant — choose what serves the story best.

### Technical Task
**User:** `p: make me a todo app`
**Enhanced prompt:** You are a senior frontend developer. Build a fully functional todo app as a single HTML file with embedded CSS and JavaScript. Requirements: Add, complete (toggle), and delete todos. Todos persist in localStorage so they survive page refresh. Clean, modern UI with smooth transitions and hover states. Responsive design that works on mobile and desktop. Empty state message when no todos exist. Input validation (prevent empty todos). Show count of remaining incomplete items. Use vanilla JavaScript — no frameworks. The code should be clean, well-commented, and production-quality.

### Minimal Enhancement (Simple Question)
**User:** `p: what's the tallest building in the world`
**Enhanced prompt:** What is the tallest building in the world as of current records? Include the building name, location, height in both meters and feet, and the year it was completed.

## Rules

- Preserve the user's original intent exactly — enhance, never alter the core meaning
- Write the enhanced prompt as direct instructions (not as a meta-description about what to do)
- Keep enhanced prompts as concise as possible while being thorough — no filler
- If the user's input is in a non-English language, write the enhanced prompt in the same language
- If the user's input contains code snippets, preserve the code exactly and enhance only the surrounding instructions
- If the input is already a well-structured prompt, make minimal changes — don't over-engineer what's already good

「AI 智慧體」分類下的熱門技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。