refine

refine is a command for coding agents from nguyenvanduocit/research-kit. It costs 15 tokens per session (470 once invoked), scanned A, original, from a forked repository, MIT.

A command for narrowing and clarifying a research project before planning how to investigate it. It asks structured questions about scope, assumptions, missing details, and constraints.

In plain words
What is it for?
It helps refine the research scope, questions, assumptions, constraints, and success criteria before methodology design.
Why use it?
It helps prevent an unclear research question from leading to wasted work or unsuitable methods.

Command

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.

agentmods
npx agentmods add commands/nguyenvanduocit/research-kit/refine
Clone the repo
git clone --depth 1 https://github.com/nguyenvanduocit/research-kit

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 refine

README.md
[![agentmods](https://agentmods.dev/badge/commands/nguyenvanduocit/research-kit/refine.svg)](https://agentmods.dev/commands/nguyenvanduocit/research-kit/refine)
Your own site
<a href="https://agentmods.dev/commands/nguyenvanduocit/research-kit/refine"><img src="https://agentmods.dev/badge/commands/nguyenvanduocit/research-kit/refine.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 470 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin fork From a forked repository.
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 $0.00015 $0.00470
Opus 5 $0.00008 $0.00235
Sonnet 5 $0.00003 $0.00094
Haiku 4.5 $0.00002 $0.00047

Measured 4d ago against content hash 7292cbaaa319, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

refine 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 4d 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.

templates/commands/refine.md · 56 lines

How it starts

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

User Input

$ARGUMENTS

Outline

This command helps refine the research definition by asking targeted questions to clarify ambiguous areas, narrow scope, or identify hidden assumptions. Run this after /research.define and before /research.methodology.

  1. Load the research definition from research/###-topic-name/definition.md

  2. Identify areas needing clarification:

    • Ambiguous scope boundaries
    • Unclear research questions
    • Missing context or constraints
    • Undefined terminology
    • Unstated assumptions
    • Ethical considerations not addressed
    • Resource/time constraints not specified
  3. Generate targeted questions (maximum 5-8 questions):

    • Each question should be specific and actionable
    • Focus on high-impact clarifications
    • Avoid trivial details
    • Group related questions
    • Prioritize by: scope impact > methodology impact > resource impact > technical details
  4. Present questions to user in an interactive format

  5. Update research definition based on answers:

    • Refine scope section
    • Clarify research questions
    • Document assumptions explicitly
    • Add constraints section if needed
    • Update success criteria based on clarifications
  6. Output summary:

    • Number of clarifications addressed
    • Updated sections in definition
    • Key decisions documented
    • Next step: Proceed to /research.methodology to design the research approach

Question Types:

  • Scope Boundaries: "Should this research cover X or is that out of scope?"
  • Depth vs Breadth: "Should we go deep on X or cover X, Y, Z at high level?"
  • Time Period: "What time period should this research focus on?"
  • Geographic/Domain: "Should this be limited to specific regions/domains?"
  • Source Types: "Should we prioritize academic sources, industry reports, or both?"
  • Ethical: "Are there ethical considerations around data sources or topics?"
  • Resource Constraints: "What's the target depth - quick overview vs comprehensive analysis?"

Read the full file on GitHub · 56 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. 4d ago First seen · 56 lines · 15 tokens per session scan A 7292cbaaa319

Subscribe to this mod's changes

refine is a command published in the GitHub repository nguyenvanduocit/research-kit (20 stars, last pushed 5mo ago), licensed MIT. It adds 15 tokens to every session and 470 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It comes from a forked repository.