Back to blog

AskUserQuestionTool Changed How I Use Claude Code

January 20, 20265 min readBy Will Ness
Share:

The easiest workflow upgrade you can make in Claude Code as a coding agent operator is to use the crap out of AskUserQuestionTool.

Claude Code has a few ways to gather context in order to complete its task:

  • Static context from CLAUDE.md, skills, commands, and other CC features
  • Dynamic context via WebSearch
  • Dynamic context via reading files and exploring the project

But people forget about one of the best sources of context.... YOU!!!

Interactive Demo
Here's an example prompt. See what questions Claude asks:
Your prompt
Build me a habit tracker app with:
- Daily habit check-ins
- Weekly progress view
- Streak tracking
- Reminder notifications

Interview me with 3 questions via AskUserQuestionTool before starting.

AskUserQuestionTool is the best way to gather context from the user because:

  1. Claude knows what gaps in context it has, and can ask you the questions it needs
  2. It gives you default answers to pick from which helps speed up the context gathering process

Don't just listen to me, here's a post from a developer that works on Claude Code:

Tweet from Thariq (@trq212): my favorite way to use Claude Code to build large features is spec based. Start with a minimal spec or prompt and ask Claude to interview you using the AskUserQuestionTool, then make a new session to execute the spec.

What is AskUserQuestionTool?

  • It's a tool that interrupts the conversation and asks you questions.
  • Supports either Select or Multiselect
  • Always has default options you can select (saves time from typing)
AskUserQuestionTool in Claude Code showing a multiple choice question about UI format with options for full-screen route, modal overlay, and slide-out panel

Why It Matters

Context is the most important thing in coding agents. In fact, it's the only thing that allows your coding agent to perform well.

If it doesn't know what a file's content is, how could it edit the file?

If it doesn't know what the users request is, how could it build the right thing?

For example, look at the difference between these two prompts:

Vague
Build a todo list application
Detailed
Build a todo list application with low/medium/high priority, due dates, titles, and markdown-compatible descriptions. Use TypeScript and React, and include unit tests.

This will result in VASTLY different action taken by the coding agent which will result in very different code.

But... it's also a lot of work to properly type out a comprehensive prompt. And, even then you may still forget stuff.

Instead, you can use an LLM (which essentially has a condensed version of all of the knowledge of the internet) to analyze what context you've given so far, and interview you for what's missing for it to do its work.


How To Use

  1. Include "AskUserQuestionTool" in your prompt instead of just "ask me questions" for consistent results.

  2. Add "one by one" so the coding agent will think in-between answering questions to pick the next best question. Otherwise Claude may ask you up to 5 questions at once, and often after you answer the first 2-3, the rest are outdated or irrelevant.

  3. Be specific about default answers. This is optional, but helpful when you need certain information to make a choice. For example, when asking about infrastructure choices, instruct Claude to include the price for each option.

  4. Trigger questions dynamically as the agent works. For example: "Find every blog article we've published, read it, then suggest new optimized titles to me with AskUserQuestionTool. Update the article with the new title. Repeat for every article."


7 Ways I Use AskUserQuestionTool

1. Better Feature Requirements

When I enter plan mode, I give Claude the general idea and ask it to interview me before creating the plan.

How it works:

  • Put Claude in plan mode (Shift+Tab to cycle modes)
  • Describe your feature at a high level
  • Ask Claude to interview you with X questions via AskUserQuestionTool
Example prompt
I want to add user authentication to this app.

Before creating a plan, interview me with 6 questions one by one via AskUserQuestionTool to understand my requirements.
Authentication method
Email/password·OAuth providers·Magic link·SSO/SAML
User data scope
Basic (email, name)·Standard (+ avatar, prefs)·Extended (profiles, metadata)
Session management
JWT tokens·Server sessions·Hybrid approach
Security level
Basic·Standard (+ rate limiting)·High (+ 2FA, audit logs)
Password policy
Minimal (8+ chars)·Standard (mixed case)·Strict (12+, special chars)
Existing infrastructure
Starting fresh·Migrating users·Adding to existing system

2. Create or Update Commands, Skills, and Sub-Agents

Instead of trying to write the perfect skill definition, let Claude ask what you need.

How it works:

  • Tell Claude what you want to create or update
  • Ask it to read the existing file first (if updating)
  • Have it interview you before making changes
Example prompt
I want to create a new code review sub-agent.

Read my existing sub-agents in .claude/agents/ for reference, then interview me with 5 questions one by one via AskUserQuestionTool about what I want this reviewer to focus on.
Review focus
Security·Performance·Code quality·All of the above
Feedback style
Gentle & supportive·Direct & concise·Linus Torvalds mode
Auto-fix capability
Suggest only·Auto-fix simple issues·Ask before each fix
Review scope
Changed files only·Related files too·Full codebase context
Integration
CLI only·Git hooks·PR comments via GitHub

3. Align on Tech Stack

Once you have requirements, let Claude propose technology options through structured questions.

How it works:

  • Share your project requirements
  • Ask Claude to propose tech stack options via AskUserQuestionTool
  • Get clear tradeoffs for each choice
Example prompt
I'm building a real-time dashboard app. Here are the requirements: [paste requirements]

Propose tech stack options to me one by one via AskUserQuestionTool. For each decision (frontend framework, state management, data fetching, etc.), give me 3-4 options with tradeoffs.
Frontend framework
React·Vue·Svelte·Solid
Real-time approach
WebSockets·Server-Sent Events·Polling·Supabase Realtime
State management
Zustand·Redux Toolkit·Jotai·Context API
Charting library
Recharts·D3.js·Chart.js·Tremor
Deployment target
Vercel·AWS·Self-hosted·Cloudflare

4. Create a Comprehensive PRD

Writing a full PRD from scratch takes forever. Let Claude interview you instead.

How it works:

  • Voice dictate or type out your rough idea
  • Ask Claude to interview you to fill in the gaps
  • Get a polished PRD at the end
Example prompt
You are an expert PRD creator and product designer.

Here's my rough idea: [paste your notes]

Interview me with 8 questions one by one via AskUserQuestionTool to gather the context you need, then create a comprehensive PRD.
Target users
Developers·Small businesses·Enterprise·Consumers
Success metrics
User signups·Revenue·Engagement·Custom KPIs
MVP scope
Bare minimum·Core features·Full vision
Timeline pressure
Ship fast·Balanced·Quality over speed
Technical constraints
None·Existing stack·Budget limits·Team skills

5. Update CLAUDE.md Based on Frustrations

Did you just spend 20 minutes correcting Claude? Turn that frustration into a permanent fix.

How it works:

  • After a frustrating back-and-forth, ask Claude to analyze what went wrong
  • Have it propose CLAUDE.md changes via AskUserQuestionTool
  • Pick the fixes that make sense
Example prompt
You are an expert AI agent designer.

Read our CLAUDE.md file and look back at this conversation. Identify what went wrong and propose changes to prevent it.

For each proposed change, use AskUserQuestionTool to give me options on how to fix the behavior.
Issue category
Wrong assumptions·Missing context·Style mismatch·Tool misuse
Fix scope
Add new rule·Modify existing·Add examples·Remove rule
Enforcement level
Soft suggestion·Strong preference·Hard requirement
Examples needed
None·One example·Multiple examples·Good/bad comparison

6. Plan Project Documentation

Instead of guessing what docs to write, let Claude interview you about what's actually needed.

How it works:

  • Ask Claude to analyze your project structure
  • Have it propose documentation priorities via AskUserQuestionTool
  • Get docs that actually matter
Example prompt
Analyze this codebase and identify what documentation would be most valuable.

Interview me with 5 questions one by one via AskUserQuestionTool about our documentation needs, then create a prioritized list of docs to write.
Primary audience
New developers·API consumers·End users·All stakeholders
Format preference
README files·Dedicated docs site·Inline comments·Video tutorials
Priority areas
Getting started·API reference·Architecture·Contributing guide
Maintenance plan
Update with each PR·Periodic reviews·User-reported gaps only
Documentation depth
Quick reference·Comprehensive guide·Interactive examples

7. Brainstorming

Instead of Claude picking one approach, have it generate multiple options and let you choose.

How it works:

  • Describe what you're trying to build or decide
  • Ask Claude to generate several options
  • Have it present them via AskUserQuestionTool so you can pick
Example prompt
I need to add a user settings page to this app.

Suggest 5 different design approaches for this feature, then present them to me with AskUserQuestionTool so I can pick the direction.
Layout approach
Single page with tabs·Multi-page sections·Modal overlay·Sidebar navigation
Setting categories
Profile, Security, Notifications·Account, Preferences, Privacy·Custom categories
Save behavior
Auto-save on change·Save button per section·Global save button
Advanced settings
Hidden by default·Separate advanced tab·Inline with warnings·No advanced settings
Mobile layout
Accordion sections·Bottom sheet·Full-screen pages·Same as desktop

Start Here

AskUserQuestionTool turns Claude into an interviewer that fills your context gaps automatically. No more guessing what details to include in your prompts.

Pick one use case from this list. Try it on your next feature. You'll never go back to writing comprehensive prompts from scratch.

My recommendation: start with feature requirements (#1). Next time you're planning a feature, ask Claude to interview you before creating the plan. See how different the output is.

Want more like this? Get my best AI tips in your inbox.

Will Ness
Written byWill Ness

Former Amazon engineer, current startup founder and AI builder. I write about using AI effectively for work.

Recommended Articles