How to Get AI Coding Assistants to Ask Clarifying Questions Before Generating Code
Problem
When I asked Codex to implement a feature, it would immediately dump a complete plan with all the wrong assumptions:
Here's my implementation plan:
1. Create a new UserService class with dependency injection2. Add caching layer using Redis3. Implement rate limiting4. Create REST endpoints with JWT authentication5. Add comprehensive logging6. Write unit tests with 80% coverageI never asked for caching. I never mentioned Redis. I didn’t need JWT auth. And now I’m stuck deleting code I don’t understand, trying to explain to Codex what I actually wanted.
The revision cycles would repeat endlessly. Each attempt, Codex would add more “helpful” features I never requested.
What Happened?
I found a Reddit post that captured exactly what I was experiencing. Someone posted about trying a skill called “grill-me” and getting a 90% success rate with Codex planning.
The core issue: AI coding assistants default to generating immediately rather than clarifying first. They fill gaps with guesses, add features you didn’t ask for, and create context mismatches.
The Solution
The grill-me skill is tiny - just 5 sentences:
Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
Ask the questions one at a time.
If a question can be answered by exploring the codebase, explore the codebase instead.This pattern changes the AI’s behavior from “generate immediately” to “interview first, then implement.”
How It Works
I tried the skill. Instead of dumping a plan, Codex now asks:
Codex: Should the user service handle authentication, or should that be a separate concern? I recommend keeping them separate - auth changes frequently and you don't want user management coupled to it.
Me: Separate makes sense.
Codex: Good. For user storage, should we use the existing PostgreSQL database or create a new one? I see from your codebase that you're already using Postgres for the product catalog. Recommended: use the same instance with a new schema.
Me: Same instance is fine.
Codex: For the API layer, your codebase uses FastAPI. Should I follow the same pattern, or did you have something else in mind?The dialogue feels natural. Codex surfaces context I hadn’t considered. Decisions get made collaboratively. And when it finally generates code, it matches what I actually wanted.
Why This Works
The skill has three key components:
“Interview me relentlessly” - Sets the mode. The AI knows it’s in questioning mode, not generating mode.
“Ask the questions one at a time” - Prevents the AI from dumping 20 questions at once. This creates actual dialogue.
“If a question can be answered by exploring the codebase, explore instead” - Reduces redundant back-and-forth. The AI can self-answer many questions by reading your code.
Here’s what the behavior change looks like:
┌─────────────────────┐ ┌─────────────────────┐│ Without grill-me │ │ With grill-me │├─────────────────────┤ ├─────────────────────┤│ Prompt → Generate │ │ Prompt → Interview ││ ↓ │ │ ↓ ││ Assumptions │ │ Clarify ││ ↓ │ │ ↓ ││ Revision Loop │ │ Generate ││ ↓ │ │ ↓ ││ Frustration │ │ Success │└─────────────────────┘ └─────────────────────┘Alternative Approaches
If you don’t have the grill-me skill installed, you can achieve similar results with inline prompts:
"Brainstorm with me about this feature before implementing"
"Let's discuss the design first. Ask me clarifying questions one at a time."
"Before coding, interview me about the requirements. Make recommendations for each question."One Reddit user mentioned a ChatGPT pre-refinement workflow:
- Discuss and refine the idea in ChatGPT
- Ask ChatGPT to generate a prompt for Codex that includes all decisions
- Paste that prompt into Codex
Creating Your Own Skill
I created a simplified version for my workflow:
---name: clarify-firstdescription: Ask clarifying questions before generating code. Use when planning features or making architectural changes.---
# Clarify First Skill
## Instructions
Before implementing anything, interview me about my requirements.
1. Ask questions one at a time2. For each question, provide your recommended answer with reasoning3. Explore the codebase to answer questions when possible4. Continue until we reach shared understanding5. Only then, generate the implementation plan
## When to Use
- Adding new features- Refactoring existing code- Architectural decisions- Bug fixes where root cause is unclearThe Result
After using grill-me for a few weeks, I noticed:
- Fewer wrong assumptions
- Less unwanted work to delete
- Easier code review
- Actually saving tokens through fewer revision cycles
Someone in the Reddit thread asked about token usage: “Doesn’t all that back-and-forth cost more tokens?” The answer was counterintuitive - it saves tokens because you avoid revision cycles. One revision cycle costs more than a focused interview.
Summary
In this post, I showed how the grill-me skill pattern changes AI coding assistants from immediate generators to thoughtful interviewers. The key insight is that a tiny 5-sentence prompt can fundamentally change AI behavior. For complex features where assumptions matter, this approach prevents the revision-cycle hell that many of us experience.
Final Words + More Resources
My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me
Here are also the most important links from this article along with some further resources that will help you in this scope:
- 👨💻 grill-me skill page
- 👨💻 Matt Pocock's skills repository
- 👨💻 Reddit Discussion: I tried the grill-me skill and it completely changed how I plan with Codex
Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!
Comments