SuperAPI AI Directory

prompt-pe

General & other

View repository

Updated 10-16 11:56

About this skill

Prompt PE (Prompt Concretization Enhancer)

Overview

This skill is only responsible for clarifying, concretizing, and structuring natural language requirements; it does not replace subsequent business skills, nor does it automatically enter any superPM workflow.

Core principle: clarify first, act later. Guessing definitely wastes effort; asking questions is efficient.

Common user problems:

  • Natural language is too general and lacks structured thinking
  • Treating AI as a "one-sentence universal magic tool"
  • Missing key information, leading to repeated communication, wasting tokens and time

When user requests are vague, AI tends to:

  • Make assumptions rather than ask questions
  • Explore rather than clarify
  • Speed up rather than slow down

This skill provides:

  1. Scenario recognition - Quickly identify the request type (feature development, UI design, image generation, etc.)
  2. Domain clarification templates - Structured question checklists for different scenarios
  3. Systematic framework - 5W1H dimensions + prioritized questioning strategy

The goal is:To help users fully clarify their needs and objectives at an early stage, with high efficiency, energy savings, enjoyable AI use, and token savings。

When to Use

Usage scenarios:

  • Single-sentence request with no context: "Make a login feature"
  • Missing key dimensions: Who uses it? What platform? Why? What constraints are there?
  • No success criteria: "Optimize the code," "Refactor the project"
  • Urgent + vague: "Quickly fix the bug," "Hurry up and optimize"
  • The user expects AI to automatically understand everything

Non-usage scenarios:

  • Requirements are clear and explicit, including sufficient context and constraints
  • The user explicitly states, "First let me see your suggestions"
  • The request is itself a clarifying question

Scenario Recognition

Quickly identify the request type and apply the corresponding clarification template:

Scenario type Keywords/Patterns Required questions dimensions
Feature development "Make a feature," "Write a module," "Implement XX" Platform, tech stack, authentication method, data storage
UI/interface design "Design an interface," "Make a page," "UI" Device, style, color scheme, interaction, user persona
Image generation "Draw a picture," "Generate an image," "AI drawing" Style, size, subject, background, color tone, purpose
Code optimization "Optimize code," "Improve performance" Goal (performance/readability/memory), current problem, success criteria
Bug fix "Fix the bug," "It's throwing an error," "There's a problem" Error message, reproduction steps, expected behavior, scope of impact
Refactor project "Refactor the project," "Optimize the architecture" Motivation, pain points, scope, constraints, success criteria
Data analysis "Analyze data," "Calculate XX" Data source, time range, dimensions, output format

After identification, immediately apply the corresponding clarification template (see the next section).

Domain-Specific Clarification Templates

🎯 Feature Development Scenario

Example: The user says "help me write a login feature"

Must-ask questions:

1. **平台**: Web、移动端(iOS/Android)、桌面应用?
2. **认证方式**: 用户名密码、OAuth(Google/微信/GitHub)、手机验证码、SSO?
3. **技术栈**: 前端框架(React/Vue/Angular)?后端(Node/Java/Go/Python)?
4. **功能范围**:
   - 仅登录?还是包含注册、登出、密码重置?
   - 是否需要"记住我"、多设备登录、单点登录?
5. **安全要求**: 2FA、密码复杂度、登录失败锁定、防暴力破解?
6. **数据存储**: 数据库类型(MySQL/MongoDB/PostgreSQL)?Session 还是 JWT?

Clarification efficiency comparison:

  • ❌ Not clarifying, doing it directly → Assume web + username/password → What the user wants is mobile OAuth → Complete rework
  • ✅ Clarify for 30 seconds → Confirm mobile + OAuth + JWT → Do it right the first time, saving hours

🎨 Image Generation Scenario

Example: The user says "help me draw a drawing"

Must-ask questions:

1. **主体内容**: 画什么?人物、风景、物品、抽象艺术?
2. **画面风格**: 写实、卡通、油画、水彩、赛博朋克、日系动漫、像素风?
3. **尺寸比例**: 竖版(9:16)、横版(16:9)、方形(1:1)?具体像素?
4. **色调配色**: 暖色调、冷色调、黑白、高饱和、莫兰迪色?
5. **背景**: 纯色、渐变、具体场景(海边/城市/森林)?
6. **细节要求**: 光线(日光/夕阳/霓虹)、视角(正面/侧面/俯视)?
7. **用途**: 头像、海报、插画、产品图?(影响风格和质量要求)

Clarification example:

用户:帮我画一个画画

AI:我需要澄清几个关键点来精准创作:

1. **主体**: 人物、风景、还是抽象艺术?
2. **风格**: 写实、卡通、油画、赛博朋克、日系动漫?
3. **尺寸**: 竖版、横版、还是方形?
4. **色调**: 暖色、冷色、黑白、还是鲜艳色彩?
5. **用途**: 头像、海报、插画?(影响细节程度)

只需要回答这 5 个问题,我就能生成符合你期望的图像。

💻 UI/Interface Design Scenario

Example: The user says "design a login interface"

Must-ask questions:

1. **设备平台**: 桌面端、移动端、还是响应式?
2. **设计风格**: 极简风、Material Design、拟物化、扁平化、暗黑模式?
3. **配色方案**: 品牌色是什么?冷暖色调?用户群偏好?
4. **目标用户**: 年龄段、职业、技术水平?(影响界面复杂度)
5. **交互要求**: 表单验证实时反馈、Loading 动画、错误提示方式?
6. **品牌元素**: Logo、品牌字体、品牌色是否有规范?

⚡ Code Optimization Scenario

Example: The user says "help me optimize this code"

Must-ask questions:

1. **优化目标**:
   - 性能(响应速度)?
   - 内存占用?
   - 可读性/可维护性?
   - 代码体积?
   - 错误处理?
2. **当前问题**: 代码遇到了什么具体问题?性能瓶颈在哪?
3. **数据规模**: 处理的数据量级?并发量?
4. **成功标准**: 从多少秒优化到多少秒?内存降低多少?
5. **约束条件**: 是否允许重构?是否需要保持向后兼容?

🐛 Bug Fix Scenario

Example: The user says "this bug is serious, fix it quickly"

Must-ask questions:

1. **症状**: 错误信息是什么?用户看到什么?
2. **复现步骤**: 如何触发这个 bug?
3. **发生时间**: 什么时候开始的?最近有改动吗?
4. **影响范围**: 所有用户还是部分用户?生产环境还是测试环境?
5. **预期行为**: 正确的行为应该是什么?
6. **环境信息**: 浏览器版本、操作系统、服务器环境?

🔄 Project Refactoring Scenario

Example: The user says "help me refactor this project"

Must-ask questions:

1. **重构动机**: 为什么想重构?有什么具体痛点?
   - 性能问题?
   - 可维护性差?
   - 技术债务?
   - 架构不合理?
2. **重构范围**: 整个项目还是特定模块?
3. **约束条件**:
   - 时间限制?
   - 是否允许破坏性变更?
   - 是否需要保持 API 兼容?
4. **成功标准**: 重构后应该达到什么状态?

📊 Data Analysis Scenario

Example: The user says "help me analyze the user data"

Must-ask questions:

1. **数据源**: 数据从哪来?数据库、API、CSV文件?
2. **时间范围**: 分析哪个时间段的数据?
3. **分析维度**: 用户增长、活跃度、转化率、留存率?
4. **输出格式**: 报告、图表、CSV、还是自然语言总结?
5. **目标**: 分析的目的是什么?支持什么决策?

The Process

digraph clarification_process {
    rankdir=TB;
    node [shape=box, style=filled];

    "收到用户请求" [shape=ellipse, fillcolor="#c8e6c9"];
    "识别场景类型" [fillcolor="#e1bee7"];
    "识别模糊点" [fillcolor="#bbdefb"];
    "应用领域模板" [fillcolor="#e1bee7"];
    "系统化提问" [fillcolor="#bbdefb"];
    "用户回应?" [shape=diamond, fillcolor="#fff9c4"];
    "确认理解" [fillcolor="#bbdefb"];
    "开始行动" [shape=ellipse, fillcolor="#c8e6c9"];

    "收到用户请求" -> "识别场景类型";
    "识别场景类型" -> "识别模糊点";
    "识别模糊点" -> "应用领域模板";
    "应用领域模板" -> "系统化提问";
    "系统化提问" -> "用户回应?";
    "用户回应?" -> "确认理解" [label="是"];
    "用户回应?" -> "提供选项" [label="否/不完整" style=dashed];
    "提供选项" -> "用户回应?";
    "确认理解" -> "开始行动";
}

Step 0: Identify the scenario type (new)

Quickly categorize the request type:

  1. Check keywords - Feature development? Image generation? UI design? Code optimization?
  2. Match a domain template - Find the corresponding clarification question checklist
  3. Apply the template - Use domain-specific questions instead of generic 5W1H

Example:

用户:帮我写一个登录需求

AI 内部识别:功能开发场景 → 认证类功能 → 应用"功能开发模板"
立即问:平台?认证方式?技术栈?
(而非泛泛地问"什么功能?")

Efficiency improvement:

  • Generic 5W1H: Random questions, may miss key dimensions
  • Scenario identification + domain template: Precise questions, covering all key points of that scenario

Step 1: Identify ambiguities

Pause immediately, do not act. Ask yourself:

  1. Who - User? End user? Team?
  2. What - What exactly needs to be done? Tech stack? Platform?
  3. Why - Goal? Pain point? Background?
  4. Where - Which module? Which file? Which environment?
  5. When - Timeline? Priority?
  6. How - Success criteria? Constraints? Preferences?

Missing any key dimension = clarification needed.

Step 2: Ask systematically

Ask in order of priority:

  1. Goals and constraints(Why, What) - Most critical, determines direction
  2. Context and scope(Where, Who) - Narrows the scope of exploration
  3. Time and priority(When) - Affects implementation strategy
  4. Methods and preferences(How) - Detail options

Question template:

为了更好地帮助你,我需要澄清几个关键点:

1. [目标] - 你希望通过这个实现什么?/ 主要痛点是什么?
2. [约束] - 有什么技术栈/平台/时间限制吗?
3. [范围] - 这是针对 [具体范围] 吗?
4. [成功标准] - 什么样的结果算成功?

Do not ask all the questions at once. 2-3 key questions are enough, then go deeper based on the answers.

Step 3: Resist Pressure

Pressure signals:

  • The user says "quick", "hurry", "right now"
  • The user shows impatience
  • Time is tight

Wrong reaction:

  • ❌ Speed up exploration, skip clarification
  • ❌ Respond with urgent language: "Start immediately! 🔥"
  • ❌ Make assumptions: "I guess it's..."

Correct reaction:

  • ✅ Slow down: "Precisely because it's urgent, I need all the more to confirm the direction to avoid doing it wrong"
  • ✅ Use calm language: "I need to quickly confirm a few key points to ensure getting it right the first time"
  • ✅ Emphasize efficiency: "Clarifying the problem saves rework time later"

Urgency = greater need for systematization, not less.

Step 4: Avoid Assumptions

Common assumption traps:

Vague request Common AI assumption Question that should be asked
"Optimize the code" Performance optimization Optimization goal? Performance/readability/memory/error handling?
"Refactor the project" Code refactoring/fixing issues Refactoring motivation? What's the pain point? The goal?
"Make a login" Web login page Platform? Authentication method? Tech stack?
"Fix the bug" Guess the bug location Error message? Reproduction steps? Expected behavior?

Self-check questions:

  • Am I guessing the user's intent?
  • Am I assuming a tech stack/platform/constraints?
  • Am I making decisions based on "common sense"?

If unsure, ask. Don't guess.

Step 5: Time Efficiency

Clarification-first principle:

❌ 错误流程:探索代码 → 猜测意图 → 做假设 → 行动
✅ 正确流程:澄清需求 → 定向探索 → 确认理解 → 行动

Time comparison:

  • Scenario 3 baseline: after 528 seconds of exploration, only then ask "What is the refactoring goal?"
  • Correct approach: first ask "What are the goals and pain points of the refactoring?" (10 seconds) → targeted exploration based on the answer (30 seconds) = 40 seconds total

10 seconds of clarification saves 500 seconds of blind exploration.

Clarification Framework

5W1H Question Checklist

Why - highest priority

  • What is the goal?
  • What is the pain point?
  • Why do this?

What

  • What specifically needs to be done?
  • What is the tech stack/platform?
  • What is the feature scope?

Who

  • Who uses it?
  • Who maintains it?
  • Who decides?

Where

  • Which module/file?
  • Which environment (development/testing/production)?
  • Which platform (Web/mobile/desktop)?

When

  • Timeline?
  • Priority?
  • Deadline?

How

  • What is the success criterion?
  • What constraints are there?
  • What preferences are there?

Questioning strategy

Don't bombard the user all at once. Do it in stages:

  1. First-round clarification(2-3 key questions):

    • Why: goal/pain point
    • What: core need
    • Key constraints: time/tech stack
  2. Dig deeper based on the answer:

    • After the user answers, ask targeted follow-up questions
    • Gradually refine understanding
  3. Confirm understanding:

    • Restate the need: "So what you need is..."
    • List key points for confirmation
    • Clarify the next step

Example:

用户:做个登录功能

AI:我需要澄清几个关键点:
1. 平台:Web、移动端还是桌面应用?
2. 认证方式:用户名密码、OAuth、手机验证码?
3. 技术栈:有偏好的框架吗?

用户:Web,React,用户名密码就行

AI:明白了,你需要一个 React Web 应用的用户名密码登录功能。是否需要:
- 记住我功能?
- 密码重置?
- 第三方登录集成?

用户:先做基础登录就行

AI:好的,我将创建一个基础的 React 登录组件,包含:
- 用户名密码输入
- 表单验证
- 登录接口调用
开始实现。

Common Mistakes

❌ Mistake 1: Explore first, clarify later

Baseline case: The user said "refactor the project," and the agent spent 528 seconds exploring the code, found the documentation exceeded the limit, and then asked "Do you want to fix the document length issue?"

Problem: Wasted time exploring and assumed the refactoring goal.

Correct approach: First ask "What is the goal of the refactoring? What are the pain points?" (10 seconds), then explore in a targeted way based on the answer.


❌ Mistake 2: Respond to urgent requests with urgent language

Baseline case: The user said "fix it quickly," and the agent responded "Starting the urgent fix immediately! 🔥"

Problem: Reinforced the user's stress instead of easing it.

Correct approach: "Precisely because it is urgent, I need to confirm the problem even more to avoid fixing the wrong place. Please tell me: what is the error message? When did it start?"


❌ Mistake 3: Assuming the meaning of "optimize"

Baseline case: The user said "optimize the code," and the agent assumed performance optimization was needed.

Problem: "Optimize" could mean readability, memory usage, error handling, code size...

Correct approach: "What is the optimization goal? Performance, readability, or something else?"


❌ Mistake 4: Ask random questions instead of being systematic

Baseline case: The agent asked "Do you want to add an authentication feature or create a new web app?"

Problem: Made assumptions (web app) instead of systematically exploring all dimensions.

Correct approach: First ask about the platform and scenario, then ask about technical details.


❌ Mistake 5: Only asking without confirming

Baseline case: The agent asked questions, and after the user answered, it directly started acting.

Problem: Did not restate for confirmation, so there may have been a misunderstanding.

Correct approach: After the user answers, restate: "So what you need is..., right?" Then act.

Real-World Impact

Time value of the clarification framework:

Scenario No clarification (blind action) With clarification (targeted action) Time saved
Refactor project 528s exploration + re-clarification 10s clarification + 30s exploration 488s (92%)
Optimize code Assume performance optimization → rework Clarify goal → get it right the first time Avoid rework
Urgent fix Guess bug location → fix the wrong place Quickly clarify symptoms → precise fix Avoid wrong changes

Spend 10-30 seconds clarifying to save hours of rework.

Examples

Example 1: Optimize request

User: "Quickly help me optimize this code, I need it right away"

❌ Wrong response: "Okay, I'll immediately help you optimize performance!" [assumes performance optimization]

✅ Correct response:

我理解时间紧迫。为了确保一次性做对,请快速告诉我:

1. 优化目标:性能(速度)、内存占用、还是可读性?
2. 当前问题:这段代码有什么具体痛点?

只需要 10 秒回答,我就能精准优化。

Example 2: Login feature

User: "Make a login feature"

❌ Wrong response: [starts writing a web login form]

✅ Correct response:

我需要澄清几个关键点:

1. 平台:Web、移动端(iOS/Android)、还是桌面应用?
2. 认证方式:用户名密码、OAuth(微信/Google)、手机验证码?
3. 技术栈:有偏好的框架吗(React/Vue/Angular 等)?

这些信息将决定实现方案。

Example 3: Refactor project

User: "Help me refactor this project"

❌ Wrong response: [starts exploring the entire codebase, looking for "refactoring opportunities"]

✅ Correct response:

在开始重构前,我需要了解:

1. **重构动机**:为什么想重构?有什么具体的痛点吗?
   - 性能问题?
   - 可维护性差?
   - 技术债务?

2. **重构范围**:整个项目还是特定模块?

3. **约束条件**:时间、资源、是否允许破坏性变更?

这些信息将帮助我制定最合适的重构策略。

Example 4: Image generation (new scenario)

User: "Help me draw a drawing"

❌ Wrong response: [generates an image in the default style] → user is dissatisfied → repeated attempts → wasted tokens

✅ Correct response:

我需要澄清几个关键点来精准创作:

1. **主体内容**:人物、风景、还是抽象艺术?
2. **画面风格**:写实、卡通、油画、赛博朋克、日系动漫?
3. **尺寸比例**:竖版(9:16)、横版(16:9)、还是方形(1:1)?
4. **色调配色**:暖色调、冷色调、黑白、高饱和?
5. **用途**:头像、海报、插画?(影响细节程度)

只需要回答这 5 个问题,我就能生成完全符合你期望的图像,避免反复尝试浪费 token。

Efficiency comparison:

  • ❌ No clarification → generate 5-10 times → user is only then satisfied → waste 50-100k tokens
  • ✅ Clarify for 20 seconds → generate once → fully meets the requirement → consumes only 5-10k tokens

Example 5: Bug fix (urgent)

User: "This bug is very serious, users are complaining, fix it quickly"

❌ Wrong response: "Start emergency fix immediately! 🔥" [blindly searches the code]

✅ Correct response:

我理解严重性。正因为紧急,我更需要快速确认几个关键信息,避免改错地方:

1. **症状**:错误信息是什么?用户看到什么?
2. **发生时间**:什么时候开始的?最近有改动吗?
3. **影响范围**:所有用户还是部分用户?

只需要 30 秒回答,我就能精准定位问题。

Prompt PE output contract

After completing clarification, prioritize outputting an enhanced prompt that can be directly handed to a subsequent AI or business skill for execution, rather than merely restating the user's original words.

When information is insufficient

  • First determine whether the missing information would change the solution, implementation, or acceptance results.
  • Ask only the 3-5 questions with the highest current value, ordered by impact priority.
  • Do not repeatedly ask about information that is already clear; do not collect irrelevant background just for completeness.
  • If there are multiple reasonable directions, provide brief options and explain what each option would affect.
  • Do not arbitrarily fill in key facts that would change the business meaning; you may propose "assumptions to be confirmed."

When information is sufficient

Use the following structure to output the enhanced prompt:

## 角色
执行任务时需要具备的专业角色或能力。

## 目标
需要解决的问题,以及期望达到的结果。

## 背景
业务背景、用户背景、当前现状和已有材料。

## 具体任务
需要执行的明确动作、处理范围和优先级。

## 关键实体与术语
涉及的用户、对象、模块、系统、平台、指标、专业术语及其定义。

## 约束条件
时间、技术栈、预算、兼容性、风格、范围、禁用事项和其他限制。

## 输出要求
语言、格式、结构、详细程度,以及是否需要表格、代码、图表或文件。

## 验收标准
什么结果算完成,如何验证质量合格。

## 非目标
本次明确不处理的事项,防止范围膨胀。

Then add:

  1. Added entities and terminology: list the key objects identified from the original requirement or confirmed by the user.
  2. Assumptions adopted: clarify what is temporarily assumed in order to move the task forward.
  3. Risks to be confirmed: list unresolved issues that may still affect the execution results.

The enhanced prompt should faithfully preserve the user's original intent; if the key objective cannot be confirmed, guesses must not be written as established facts.

Red Flags - STOP and Clarify

When the following signals appear,pause immediately and clarify:

  • ✋ The user says "quickly," "hurry," "right away" → go slower, be more systematic
  • ✋ A single-sentence request with no context → ask 5W1H
  • ✋ You find yourself "guessing" the user's intent → Stop, ask directly
  • ✋ You are about to "explore the code to take a look" → Ask about the goal first, then explore
  • ✋ You assumed the tech stack/platform/constraints → Verify assumptions
  • ✋ The user's answer is incomplete → Keep asking follow-up questions, do not assume

Remember: clarification is not a waste of time, blind action is.

Quick Reference

Scenario Key clarification questions
"Build a feature" Platform? Tech stack? Authentication method? Feature scope?
"Draw a picture" Subject? Style? Size? Color tone? Purpose?
"Design an interface" Device? Style? Color scheme? Target users?
"Optimize code" Goal? Current problem? Success criteria?
"Refactor the project" Motivation? Pain points? Scope? Constraints?
"Fix a bug" Symptoms? Error message? Reproduction steps? Scope of impact?
"Analyze data" Data source? Time range? Dimensions? Output format?
"Quickly/hurry" Why is it urgent? What is the most critical thing?

Process: Identify the scenario → Apply the domain template → Ask systematically → Confirm understanding → Act