返回顶部
p

prompt-refiner

Use when user input is vague, underspecified, lacks boundaries or acceptance criteria, or would benefit from being reframed into a more executable prompt before work begins. Also use when user explicitly asks to optimize/refine/improve a prompt.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
59
下载量
1
收藏
概述
安装方式
版本历史

prompt-refiner

# prompt-refiner > A prompt is not just wording polish — it is task clarification, boundary setting, and verification shaping. Refine vague user prompts into clear, actionable, verifiable versions. Show the refined result and let the user confirm before execution. Works as a closed loop with `session-learner`, which captures user choice preferences over time. ## Quick Reference | Situation | Action | |-----------|--------| | Vague request | Refine first | | Complete prompt | Execute directly, no popup | | Substantial improvement | Show refined + popup choose | | No substantial improvement | Skip popup, execute original | | User says "just do it" | Auto-apply | | User says "only optimize" | Return refined, don't execute | ## Continue Modes 1. **Popup-confirm (default)** — Show refined prompt, popup to choose refined vs original, execute after choice 2. **Auto-apply** — When user says "just do it / skip confirmation", show refined then execute immediately 3. **Optimize-only** — When user only asks to refine without executing, return refined result only ## When NOT to Use - User input is already well-structured with clear goals, constraints, and acceptance criteria - Single-step operations (delete a line, rename a variable, change a single string) - Simple factual questions or explanations - User explicitly says "don't optimize" or "just do it" ## Workflow 1. Extract original prompt and current session context (goals, constraints, tech stack, errors, expected output). 2. Generate refined prompt, ensuring: - Core intent unchanged - Goals and boundaries explicit - Output format verifiable - Language concise, no fluff 3. Produce result based on Continue Mode. 4. After user makes a choice, generate a **learning signal** for `session-learner` — capture preference pattern, never record full prompt text. ## Refined Prompt Structure Include the following blocks as needed (trim, don't mechanically stack): - Goal - Context - Constraints / Non-goals - Execution Requirements - Output Format - Acceptance Criteria For detailed patterns and examples, see `references/prompt-patterns.md`. ## Output Templates ### A) Popup-confirm (default) **First, judge whether refinement adds real value.** If the refined prompt only tweaks wording without adding explicit goals/constraints/output format/acceptance criteria, and doesn't significantly reduce ambiguity, it has **no substantial optimization value**. - **No substantial value**: Don't popup, don't interrupt. Execute with the original prompt directly. - **Has substantial value**: Execute the two steps below. Do not skip or merge them. **Step 1 (required): Output the refined prompt as plain text in the chat area first.** > **Optimized Prompt** > <full refined prompt content> **Step 2 (required, after step 1): Call AskUserQuestion popup for user to choose.** Options: - A: Use refined prompt to continue (recommended) - B: Use original prompt to continue Forbidden: - Do not popup without showing the refined prompt content first - Do not put the refined prompt inside AskUserQuestion description as a substitute for step 1 - Steps 1 and 2 must be in the same response Execute after user chooses. ### B) Auto-apply > **Optimized Prompt** > <refined prompt> --- Then execute immediately. ### C) Optimize-only > **Optimized Prompt** > <refined prompt> Do not execute the task. ## Heuristics - Rewrite vague phrases ("optimize it / make it better / fix it up") into actionable steps with clear criteria. - Fill in missing inputs, boundary conditions, and completion definitions. - For code tasks: specify scope, verification method, expected deliverables. - For content tasks: specify audience, tone, length, structure constraints. - If critical context is missing, ask the minimum necessary clarification; otherwise proceed. ## Integration with session-learner - When user chooses refined or rejects it, this is a **preference signal** for `session-learner`. - `session-learner` should only summarize rules (e.g., "user prefers seeing refined version before confirming"), never record full prompt text. - Over time, `session-learner` builds a preference profile that makes `prompt-refiner` increasingly aligned with user habits. ## Priority Rules - When user explicitly specifies a flow, follow user instructions. - When no explicit instruction, use Popup-confirm.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 prompt-refiner-1775997680 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 prompt-refiner-1775997680 技能

通过命令行安装

skillhub install prompt-refiner-1775997680

下载 Zip 包

⬇ 下载 prompt-refiner v1.0.0

文件大小: 3.98 KB | 发布时间: 2026-4-13 11:38

v1.0.0 最新 2026-4-13 11:38
Initial release of prompt-refiner.

- Refines vague user prompts into clear, actionable, verifiable instructions before execution.
- Provides popup confirmation if the refinement adds significant value, letting the user choose between refined and original prompts.
- Supports auto-apply and optimize-only modes based on user instructions.
- Integrates with session-learner to learn user preferences without storing full prompt texts.
- Bypasses refinement for well-specified tasks or when instructed by the user.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部