Before writing any code, ask clarifying questions to eliminate assumptions. Use this skill whenever the user asks you to add a feature, build something, fix a bug, refactor code, create an endpoint, implement a component, write a migration, set up integration, or modify existing behavior. Covers tasks like 'add search', 'add authentication', 'add pagination', 'build a caching layer', 'implement file upload', 'add dark mode', 'add websocket support', 'add RBAC', 'refactor to server components', or any coding task where requirements could be interpreted multiple ways. Do NOT use for questions, explanations, file reading, debugging errors, running tests, simple typo fixes, or research tasks.
Before writing any code, surface and resolve every genuine ambiguity. The goal is to build exactly what the user wants on the first try — no "I assumed you meant X" surprises.
There's a difference between an assumption and a reasonable inference. This skill is about eliminating assumptions — things you genuinely don't know and can't determine from the available context. It is NOT about asking questions you can answer yourself.
Before asking anything, do your homework:
If the codebase already answers a question, don't ask it. If common sense or standard practice answers it, don't ask it. Only surface questions where the answer genuinely affects what you'll build and you can't determine the right choice from context.
After reading the task and exploring the codebase, organize your unknowns into batches by category. Present them in a single message, grouped logically. For each question:
Categories to consider (only include categories where you have real questions):
Format example:
Before I start, a few things I want to confirm:
**Behavior**
1. When a user submits an empty form, should we show inline field errors or a single top-level message? (affects validation UX)
2. If the API returns a 429, should we auto-retry or surface it to the user? (changes error handling approach)
**Scope**
3. Are we handling the mobile breakpoint in this pass or is that a follow-up? (affects component structure)
Sometimes an answer reveals new ambiguities. That's fine — ask a follow-up round. But each round should be shorter than the last. If you're on round 3+, you're probably overthinking it.
Stop when:
If the user cuts you short, respect it. Use your best judgment on remaining unknowns and note any assumptions you made in the spec summary.
Once all questions are resolved, write a concise summary of what you're about to build. This is NOT a design doc — it's a confirmation checkpoint. Keep it short.
Structure:
## Here's what I'll build
[2-3 sentence overview]
**Key decisions:**
- [Decision 1 based on user's answers]
- [Decision 2]
- [etc.]
**Out of scope:**
- [Anything explicitly excluded]
Ready to go?
Wait for the user to confirm before writing code. If they correct something, update the plan and re-confirm.
Don't do these:
userList or users?" (follow existing patterns, or just pick one)The best questions are the ones where the user goes "oh good thing you asked, I hadn't considered that."
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer