ask-user
Pattern for effectively interacting with users to gather information or get decisions. Use when you need user input.
When & Why to Use This Skill
The Ask User skill is a critical interaction pattern designed to bridge the gap between autonomous agent action and user intent. It enables Claude to move beyond guesswork by providing a structured framework for clarifying requirements, presenting multi-choice decisions, and gathering necessary context. By implementing a 'human-in-the-loop' approach, this skill ensures AI alignment, reduces the risk of wasted computational effort, and improves the accuracy of complex task execution through proactive communication.
Use Cases
- Requirement Clarification: Narrowing down vague user requests by asking specific, targeted questions rather than making broad assumptions.
- Architectural Decision Making: Presenting multiple technical options (e.g., choosing between JWT or Session-based authentication) with pros and cons for the user to decide.
- Safety and Confirmation: Acting as a guardrail to confirm high-impact or irreversible actions before the agent proceeds with execution.
- Structured Data Collection: Using batched questions to efficiently gather multiple configuration parameters or environment details in a single interaction.
- Scope Management: Determining if an agent should handle edge cases or stick to a primary request when project boundaries are unclear.
| name | ask-user |
|---|---|
| description | Pattern for effectively interacting with users to gather information or get decisions. Use when you need user input. |
| allowed-tools | AskUserQuestion |
Ask User Skill
Pattern for effective user interaction.
When to Load This Skill
- You need to clarify requirements
- You need user to make a decision
- You have options to present
Principles
1. Be Specific, Not Open-Ended
Bad: "What do you want?" Good: "Should authentication use JWT or sessions?"
2. Offer Options When Possible
AskUserQuestion(
questions: [
{
question: "Which authentication method should we use?",
header: "Auth method",
options: [
{ label: "JWT", description: "Stateless, good for APIs" },
{ label: "Sessions", description: "Stateful, good for web apps" }
],
multiSelect: false
}
]
)
3. Provide Context
Explain WHY you're asking:
- What decision depends on this
- What trade-offs exist
- What you recommend and why
4. Batch Related Questions
Ask related questions together:
questions: [
{ question: "Auth method?", ... },
{ question: "Token expiry?", ... },
{ question: "Refresh token?", ... }
]
When to Ask vs Decide
ASK when:
- Multiple valid approaches with different trade-offs
- User preference matters
- Scope is unclear
- Risk of wasted work
DECIDE when:
- Clear best practice exists
- Low impact choice
- Easily reversible
- Standard convention applies
Question Types
Clarification
"You mentioned 'fast' - do you mean response time < 100ms or just faster than current?"
Confirmation
"I understand you want X, Y, and Z. Is this correct?"
Decision
"Option A has [pros/cons]. Option B has [pros/cons]. Which do you prefer?"
Scope
"Should this also handle [related case] or just [original request]?"