prompt-clarifier
WHEN: Ambiguous prompts, vague requirements, missing context, unclear instructionsWHAT: Ambiguity detection + AskUserQuestion clarification + Interactive option selectionWHEN NOT: Clear detailed instructions → proceed directly
When & Why to Use This Skill
The Prompt Clarifier skill is a specialized utility designed to enhance Claude's interaction efficiency by proactively detecting and resolving ambiguous user prompts. It acts as an intelligent middleware that identifies vague requirements, missing technical context, or unclear instructions before the agent begins execution. By utilizing interactive 'AskUserQuestion' workflows and multi-choice selections, it ensures the agent operates with full context, significantly reducing guesswork and improving the accuracy of complex tasks like 'vibe coding' and automated software development.
Use Cases
- Refining Vague Development Requests: Automatically intercepts high-level prompts like 'build a website' to gather specific details on tech stacks (e.g., React vs. Vue), features, and project scope through interactive menus.
- Targeted Code Optimization: When a user asks to 'optimize this code,' the skill triggers a clarification step to determine if the priority is execution speed, memory usage, or code readability.
- Resolving Contextual Ambiguity: Identifies prompts with excessive pronouns or missing file references and asks the user for specific paths or definitions before proceeding with file-based operations.
- Interactive Requirement Gathering: Streamlines the project initiation phase by presenting users with structured options for features like authentication, database types, and deployment preferences.
| name | prompt-clarifier |
|---|---|
| description | | |
| WHEN | Ambiguous prompts, vague requirements, missing context, unclear instructions |
| WHAT | Ambiguity detection + AskUserQuestion clarification + Interactive option selection |
| WHEN NOT | Clear detailed instructions → proceed directly |
Prompt Clarifier Skill
Purpose
Detects ambiguous prompts and asks clarification questions using AskUserQuestion with interactive selections.
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
Workflow
Step 1: Acknowledge
Briefly acknowledge what the user is asking for.
Step 2: Use 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 manually
For missing features:
AskUserQuestion: "Select main features (multiple selection)"
Options:
- User auth/login
- Database CRUD
- File upload
- Real-time (WebSocket)
- Payment system
- Admin dashboard
multiSelect: true
For vague optimization:
AskUserQuestion: "What type of optimization do you need?"
Options:
- Execution speed/performance
- Memory usage reduction
- Bundle size reduction
- Code readability
For project scope:
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
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
Examples
Example 1: Vague Web Project
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]
Example 2: Vague Optimization
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]
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.
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