Ask clarifying questions using AskUserQuestion tool when requirements are unclear to prevent assumptions and misunderstandings. Use when facing ambiguous requirements, missing information, or trade-off decisions before implementation.
Uses AskUserQuestion tool to ask clarifying questions when requirements are ambiguous, missing information, or need trade-off decisions before implementation. Triggers on unclear requirements, missing critical details, or when multiple valid approaches exist.
/plugin marketplace add binee108/nine-step-workflow-plugin/plugin install nine-step-workflow@lilylab-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Always ask when:
Never assume - Always ask!
The AskUserQuestion tool provides a structured way to ask questions with clear options.
AskUserQuestion({
questions: [
{
question: "Clear question text?",
header: "Short label (max 12 chars)",
multiSelect: false, // true if multiple selections allowed
options: [
{
label: "Option 1",
description: "What this option means and its implications"
},
{
label: "Option 2",
description: "Another choice with trade-offs"
}
]
}
]
})
Request: "Add validation to {{ENTITIES}}"
"Implementing {{field1}} and {{field2}} validation with min/max rules..."
AskUserQuestion({
questions: [
{
question: "Which fields need validation?",
header: "Fields",
multiSelect: true, // User can select multiple fields
options: [
{
label: "{{field1}}",
description: "Primary identifier field"
},
{
label: "{{field2}}",
description: "Numeric value field"
},
{
label: "{{field3}}",
description: "Status field"
}
]
},
{
question: "What validation rules for {{field1}}?",
header: "{{field1}} Rule",
multiSelect: false,
options: [
{
label: "Range check",
description: "Validate min/max values (strict bounds)"
},
{
label: "Format check",
description: "Validate format/pattern only"
},
{
label: "Both",
description: "Range and format validation"
}
]
},
{
question: "How should validation failures be handled?",
header: "Error Handle",
multiSelect: false,
options: [
{
label: "Exception",
description: "Throw exception immediately (fail fast)"
},
{
label: "Error object",
description: "Return error object (allow recovery)"
},
{
label: "Collect all",
description: "Validate all fields, return all errors"
}
]
}
]
})
Request: "Add authentication"
Using AskUserQuestion:
AskUserQuestion({
questions: [
{
question: "Which authentication method should be implemented?",
header: "Auth Method",
multiSelect: false,
options: [
{
label: "JWT tokens",
description: "Stateless, scalable, good for APIs (recommended for microservices)"
},
{
label: "Session-based",
description: "Traditional, stateful, server-side sessions (simpler for monoliths)"
},
{
label: "OAuth2",
description: "Third-party auth (Google, GitHub, etc.), more complex setup"
},
{
label: "API keys",
description: "Simple, for service-to-service auth only"
}
]
},
{
question: "What should be protected by authentication?",
header: "Protection",
multiSelect: true, // Can protect multiple areas
options: [
{
label: "All endpoints",
description: "Everything requires auth (most secure, may impact public APIs)"
},
{
label: "User resources",
description: "Only user-specific data (balance security and accessibility)"
},
{
label: "Admin only",
description: "Administrative routes only (least restrictive)"
}
]
},
{
question: "Where should credentials be stored?",
header: "Storage",
multiSelect: false,
options: [
{
label: "Database",
description: "Full control, your infrastructure (requires secure hashing)"
},
{
label: "External (Auth0)",
description: "Managed service, easier but external dependency"
},
{
label: "In-memory cache",
description: "Fast but lost on restart (dev/testing only)"
}
]
}
]
})
Request: "Improve performance"
Using AskUserQuestion:
AskUserQuestion({
questions: [
{
question: "What is the primary performance target?",
header: "Target",
multiSelect: false,
options: [
{
label: "Response time",
description: "Reduce latency, faster user experience (< 200ms target)"
},
{
label: "Throughput",
description: "Handle more concurrent requests (> 1000 req/s)"
},
{
label: "Memory usage",
description: "Reduce RAM consumption (< 512MB target)"
},
{
label: "All of above",
description: "Comprehensive optimization (most effort required)"
}
]
},
{
question: "Which operations are currently slow?",
header: "Bottleneck",
multiSelect: true,
options: [
{
label: "Database queries",
description: "Slow SQL, N+1 problems, missing indexes"
},
{
label: "API calls",
description: "External service latency, no caching"
},
{
label: "File processing",
description: "Large file I/O, inefficient parsing"
}
]
}
]
})
Request: "Handle edge cases"
Using AskUserQuestion:
AskUserQuestion({
questions: [
{
question: "What edge cases need handling?",
header: "Edge Cases",
multiSelect: true,
options: [
{
label: "Empty input",
description: "User provides no data or blank fields"
},
{
label: "Null values",
description: "Missing or undefined data in system"
},
{
label: "Concurrent access",
description: "Multiple users modifying same resource"
},
{
label: "Network failures",
description: "External service unavailable or timeout"
}
]
},
{
question: "How should errors be handled?",
header: "Strategy",
multiSelect: false,
options: [
{
label: "Fail fast",
description: "Throw exception immediately (explicit errors, debugging easier)"
},
{
label: "Graceful degradation",
description: "Use defaults, continue operation (better UX, may hide issues)"
},
{
label: "Retry with backoff",
description: "Auto-retry with delays (good for transient failures)"
},
{
label: "Log and continue",
description: "Record error, proceed (background jobs, non-critical)"
}
]
}
]
})
Request: "Update database schema"
Using AskUserQuestion:
AskUserQuestion({
questions: [
{
question: "How should existing data be handled?",
header: "Migration",
multiSelect: false,
options: [
{
label: "Auto-migrate",
description: "Migrate data automatically on deployment (safe, recommended)"
},
{
label: "Manual migration",
description: "Provide script, admin runs it (more control, manual step)"
},
{
label: "Drop & recreate",
description: "Delete old data (dev/test only, NOT for production)"
}
]
},
{
question: "What are backwards compatibility requirements?",
header: "Compatibility",
multiSelect: false,
options: [
{
label: "Fully compatible",
description: "Old code must work (safest, may limit changes)"
},
{
label: "Grace period",
description: "Deprecation warnings, 1-2 releases to migrate (balanced)"
},
{
label: "Breaking change OK",
description: "Can break old code (fastest, requires coordination)"
}
]
},
{
question: "When should the migration be applied?",
header: "Timing",
multiSelect: false,
options: [
{
label: "Immediate",
description: "Next deployment (for small changes, low traffic)"
},
{
label: "Maintenance window",
description: "Scheduled downtime (for large migrations, high impact)"
},
{
label: "Gradual rollout",
description: "Phased migration (for critical systems, zero downtime needed)"
}
]
}
]
})
Ask up to 4 questions at once for complex scenarios:
AskUserQuestion({
questions: [
{
question: "Question 1?",
header: "Header 1",
multiSelect: false,
options: [...]
},
{
question: "Question 2?",
header: "Header 2",
multiSelect: false,
options: [...]
},
{
question: "Question 3?",
header: "Header 3",
multiSelect: true, // Multiple selections allowed
options: [...]
},
{
question: "Question 4?",
header: "Header 4",
multiSelect: false,
options: [...]
}
]
})
Based on previous answers, ask follow-up questions:
// First question
AskUserQuestion({
questions: [{
question: "Do you want to enable caching?",
header: "Caching",
multiSelect: false,
options: [
{ label: "Yes", description: "Enable caching for better performance" },
{ label: "No", description: "No caching needed" }
]
}]
})
// If answer is "Yes", ask follow-up:
if (answer === "Yes") {
AskUserQuestion({
questions: [{
question: "Which caching strategy?",
header: "Strategy",
multiSelect: false,
options: [
{ label: "Redis", description: "Distributed cache, scalable" },
{ label: "In-memory", description: "Fast but per-instance" },
{ label: "CDN", description: "Edge caching for static assets" }
]
}]
})
}
The plugin-setup skill uses this skill extensively for configuration:
// plugin-setup calls this skill
Skill("interactive-questions")
// Then uses AskUserQuestion for all setup questions
AskUserQuestion({
questions: [
{ question: "Project type?", ... },
{ question: "Issue tracker?", ... },
...
]
})
When requirements are unclear during planning:
// In project-planner agent
if (requirementsUnclear) {
Skill("interactive-questions")
AskUserQuestion({
questions: [{
question: "Which approach do you prefer?",
header: "Approach",
multiSelect: false,
options: [
{ label: "Option A", description: "Pros and cons..." },
{ label: "Option B", description: "Trade-offs..." }
]
}]
})
}
Be Specific: Vague questions get vague answers
Provide Context: Explain why it matters
Limit Options: 2-4 options ideal
Use Clear Labels: 1-5 words max
Actionable Descriptions: Explain what each option does
Group Related Questions: Ask them together
For detailed patterns, see reference.md For more examples, see examples.md
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.