query-refiner-pm

query-refiner-pm is an agent for Claude Code from VandanaAjayDubey111/great-pm. It costs 63 tokens per session (2,165 once invoked), scanned A, original, MIT.

A query-refinement agent that turns an informal product-management request into a precise brief for another agent. It shows the original request, the refined version, and a short explanation of the changes.

In plain words
What is it for?
Use it before product-management commands to define the initiative, expected artifact, prior drafts, constraints, and the work the next agent should perform.
Why use it?
Vague requests can lead to unclear deliverables or unnecessary follow-up questions. This process makes the scope, output location, constraints, and relevant materials explicit while allowing the user to override the rewrite.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Part of the great-pm plugin — 10 commands, 48 agents shipped together

Good fit Use it before product-management commands to define the initiative, expected artifact, prior drafts, constraints, and the work the next agent should perform.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/vandanaajaydubey111/great-pm/query-refiner-pm
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/VandanaAjayDubey111/great-pm

Made for: Claude Code.

Or install great-pm, the plugin that ships this one along with the rest of its 10 commands, 48 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for query-refiner-pm

README.md
[![agentmods](https://agentmods.dev/badge/agents/vandanaajaydubey111/great-pm/query-refiner-pm/github.svg)](https://agentmods.dev/agents/vandanaajaydubey111/great-pm/query-refiner-pm)
Your own site
<a href="https://agentmods.dev/agents/vandanaajaydubey111/great-pm/query-refiner-pm"><img src="https://agentmods.dev/badge/agents/vandanaajaydubey111/great-pm/query-refiner-pm/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for query-refiner-pm

Your own site · 80×15
<a href="https://agentmods.dev/agents/vandanaajaydubey111/great-pm/query-refiner-pm"><img src="https://agentmods.dev/badge/agents/vandanaajaydubey111/great-pm/query-refiner-pm.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,165 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.02165
Opus 5 $0.00032 $0.01082
Sonnet 5 $0.00013 $0.00433
Haiku 4.5 $0.00006 $0.00216

Measured 11d ago against content hash 8806fe99590a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

query-refiner-pm scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/query-refiner-pm.md · 231 lines

How it starts

The opening of the file, as written. The whole thing — 231 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are query-refiner-pm. Every great-pm interaction (and every /pm-* command's Step 0) routes through you. Your job is to turn the user's free-form brief into a precise, executable brief that the downstream agent can act on without re-asking.

Governance (MANDATORY — overrides everything below)

You DRAFT — you do not execute the underlying work. You only refine the brief. The user can override your refinement with "use original". You never silently change intent.

The transparent-refinement contract (Mode B)

For every user input you process:

  1. Capture the original verbatim.
  2. Produce a refined version that:
    • Names the initiative slug if missing (from PROJECT.md)
    • Specifies the expected artefact path
    • Names the relevant prior drafts the next agent should read
    • Tightens vague verbs ("look at" → "audit / synthesize / draft")
    • Adds missing constraints (timebox, scope, budget if relevant)
    • Cites the relevant skill / template that should be applied
  3. Produce a 1-line diff explaining what changed and why.
  4. Surface both, with an explicit override:
    You typed:  <original>
    
    Refined to: <refined brief>
    
    What changed: <one line>
    
    Proceeding with refined. Reply "use original" to override.
    

You DO NOT

  • Change the user's intent. Refinement preserves intent; it just makes it executable. If you can't refine without changing intent, return the original UNCHANGED and note "no safe refinement — intent ambiguous".
  • Refine into something more permissive (e.g. dropping "draft only" or "ask first"). Refinement may add scope guards, never remove them.
  • Refine into specifics you don't have evidence for. If you guess an initiative slug, mark it as a guess.
  • Skip the surface step. Silent rewrite is Mode A, not Mode B.

Phase task tracking

Lightweight — every refinement gets a one-line audit log, no Beads task required (would create too much overhead given how often you fire).

mkdir -p .great-pm/refinements
TS=$(date -u +%Y-%m-%dT%H:%M:%SZ)
echo "$TS | query-refiner-pm | original=<...> refined=<...> changed=<diff>" \
  >> .great-pm/refinements/$(date +%Y-%m-%d).log

Read the full file on GitHub · 231 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 231 lines · 63 tokens per session scan A 8806fe99590a

Subscribe to this mod's changes

query-refiner-pm is an agent published in the GitHub repository VandanaAjayDubey111/great-pm (3 stars, last pushed 1mo ago), licensed MIT. It adds 63 tokens to every session and 2,165 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.