prompt-clarifier
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePrompt Clarifier Skill
Prompt Clarifier Skill
Purpose
用途
Detects ambiguous prompts and asks clarification questions using AskUserQuestion with interactive selections.
检测模糊的提示,并使用AskUserQuestion工具提出澄清问题,同时提供交互式选项。
When to Use
适用时机
Activate when:
- Prompt seems ambiguous or lacks necessary details
- User wants to create/build something without specifying technical details
- Vague instructions like "fix this", "optimize", or "improve" without context
- Excessive pronouns ("this", "that", "it") without clear references
在以下情况激活:
- 提示看起来模糊或缺少必要细节
- 用户想要创建/构建某物但未指定技术细节
- 模糊指令如“修复这个”、“优化”或“改进”但无上下文
- 过度使用代词(“这个”、“那个”、“它”)且无明确指代
Detection Criteria
检测标准
Consider prompt ambiguous if it:
- Is very short (< 5 words) and lacks context
- Mentions project type without specifying:
- Technology stack
- Main features
- Project scope
- Contains optimization requests without specifying aspect:
- Performance/speed
- Memory usage
- Code readability
- Bundle size
- References code/files without paths
- Uses vague verbs without specifying target
若提示符合以下任一情况,则判定为模糊:
- 非常简短(少于5个单词)且缺乏上下文
- 提及项目类型但未指定:
- 技术栈
- 主要功能
- 项目范围
- 包含优化请求但未指定优化方向:
- 性能/速度
- 内存使用
- 代码可读性
- 包体积
- 引用代码/文件但未提供路径
- 使用模糊动词但未指定目标
Workflow
工作流程
Step 1: Acknowledge
步骤1:确认
Briefly acknowledge what the user is asking for.
简要确认用户的需求。
Step 2: Use AskUserQuestion
步骤2:调用AskUserQuestion
Present targeted questions with multiple-choice options.
Example Question Patterns:
For missing tech stack:
AskUserQuestion: "Which tech stack would you like to use?"
Options:
- React + TypeScript + Node.js
- Vue + JavaScript + Express
- Vanilla JS + Python + FastAPI
- I'll specify manuallyFor missing features:
AskUserQuestion: "Select main features (multiple selection)"
Options:
- User auth/login
- Database CRUD
- File upload
- Real-time (WebSocket)
- Payment system
- Admin dashboard
multiSelect: trueFor vague optimization:
AskUserQuestion: "What type of optimization do you need?"
Options:
- Execution speed/performance
- Memory usage reduction
- Bundle size reduction
- Code readabilityFor project scope:
AskUserQuestion: "What's the project scale?"
Options:
- Simple prototype/MVP
- Medium-scale project
- Large enterprise-level
- Not sure (recommend for me)提出针对性问题并提供多选选项。
示例问题模板:
针对缺失技术栈的情况:
AskUserQuestion: "Which tech stack would you like to use?"
Options:
- React + TypeScript + Node.js
- Vue + JavaScript + Express
- Vanilla JS + Python + FastAPI
- I'll specify manually针对缺失功能的情况:
AskUserQuestion: "Select main features (multiple selection)"
Options:
- User auth/login
- Database CRUD
- File upload
- Real-time (WebSocket)
- Payment system
- Admin dashboard
multiSelect: true针对模糊优化请求的情况:
AskUserQuestion: "What type of optimization do you need?"
Options:
- Execution speed/performance
- Memory usage reduction
- Bundle size reduction
- Code readability针对项目范围的情况:
AskUserQuestion: "What's the project scale?"
Options:
- Simple prototype/MVP
- Medium-scale project
- Large enterprise-level
- Not sure (recommend for me)Step 3: Provide Guidance
步骤3:提供指导
After receiving answers, proceed with enhanced context.
收到用户回复后,基于补充的上下文继续执行。
Response Template
回复模板
When detecting ambiguity:
- Acknowledge: "Got it. I'll help you with [request]."
- Explain: "To provide better results, I have a few questions."
- Ask: Use AskUserQuestion with relevant options
- Proceed: Start implementation with full context
检测到模糊提示时:
- 确认:“好的,我将帮你处理[需求]。”
- 说明:“为了提供更优质的结果,我有几个问题需要确认。”
- 提问:调用AskUserQuestion并提供相关选项
- 执行:在获取完整上下文后开始实施
Examples
示例
Example 1: Vague Web Project
示例1:模糊的Web项目请求
User: "Build me a website"
Response:
Got it. I'll help you build a website.
For better results, I have a few questions.
[Use AskUserQuestion]
1. Tech stack selection
2. Main features selection
3. Project scope
[After answers, proceed with implementation]用户:“帮我做一个网站”
回复:
好的,我将帮你搭建网站。
为了提供更优质的结果,我有几个问题需要确认。
[调用AskUserQuestion]
1. 技术栈选择
2. 主要功能选择
3. 项目规模
[收到回复后,开始实施]Example 2: Vague Optimization
示例2:模糊的优化请求
User: "Optimize this code"
Response:
I'll help optimize your code.
First, let me understand what type of optimization you need.
[Use AskUserQuestion for optimization type]
[Ask for file path if not specified]
[Proceed with targeted optimization]用户:“优化这段代码”
回复:
我将帮你优化代码。
首先,请告诉我你需要哪种类型的优化。
[调用AskUserQuestion确认优化类型]
[若未指定文件路径,询问文件路径]
[开始针对性优化]Best Practices
最佳实践
- Keep questions focused: Ask only what's necessary
- Provide sensible defaults: Include common choices
- Allow custom input: Include "Other" option
- Be conversational: Don't make it feel like a form
- Group related questions: Ask related questions together
- Proceed efficiently: Once you have enough context, start working
- 问题聚焦:仅询问必要信息
- 提供合理默认选项:包含常见选择
- 支持自定义输入:提供“其他”选项
- 保持对话式语气:不要让用户感觉像是在填表单
- 分组相关问题:将相关问题放在一起询问
- 高效执行:获取足够上下文后立即开始工作
Integration with Hook
钩子集成
Works with UserPromptSubmit hook. When you see:
<!-- VIBE CODING ASSISTANT: PROMPT CLARIFICATION NEEDED -->Automatically activate this skill and use AskUserQuestion.
可与UserPromptSubmit钩子配合使用。当你看到:
<!-- VIBE CODING ASSISTANT: PROMPT CLARIFICATION NEEDED -->自动激活该Skill并调用AskUserQuestion。
Notes
注意事项
- Enhances vibe coding by ensuring sufficient context
- Interactive selections make it easy to provide details
- Don't ask unnecessary questions if prompt is clear
- 通过确保上下文充足来提升vibe编码体验
- 交互式选项让用户轻松提供细节
- 如果提示清晰,不要询问不必要的问题