query-clarifier — Claude Code subagent: setup and use
Checks a research request for ambiguity and scope, then decides whether the user should clarify it before research starts.
npx claude-code-templates@latest --agent deep-research-team/query-clarifierWhat query-clarifier does
This subagent reviews a research request before work begins. It looks for vague wording, competing interpretations, missing scope, unclear goals, and topics that are too broad. It then chooses whether to proceed, refine the request, or ask the user for clarification.
Its response is a JSON object containing the decision, confidence score, short reasoning, clarification questions, a revised query, and focus areas. The configured tools are Read, Write, and Edit. That keeps query-clarifier focused on shaping the research request rather than conducting the research itself.
For Claude Code, setup uses npx and the file .claude/agents/query-clarifier.md. The repository entry also provides agent paths for Codex and Cursor.
What it helps with
- check a query before research
- spot vague research wording
- narrow an overly broad topic
- ask focused clarification questions
- return a structured query assessment
Example prompts for the agent
- Review this research request and tell me whether clarification is needed: “Compare tools for data analysis.”
- Assess “Tell me about AI” and ask only the questions needed to make the research actionable.
- Return the query review as JSON using the subagent’s required structure.
How to install query-clarifier
1claude-code-templates
npx claude-code-templates@latest --agent deep-research-team/query-clarifier2Manually: put the files in place
.claude/agents/query-clarifier.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/query-clarifier.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/query-clarifier.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about query-clarifier
How do I install query-clarifier in Claude Code?
Run npx claude-code-templates@latest --agent deep-research-team/query-clarifier, then use .claude/agents/query-clarifier.md.
What does query-clarifier do?
It checks a research request for ambiguity, missing scope, and unclear goals. It then proceeds, refines the query, or asks for clarification.
Which tools does the subagent use?
Its configuration lists Read, Write, and Edit. The result is JSON with a decision, questions, a refined query, and focus areas.