osp-query-agent

osp-query-agent is an agent for Claude Code from amirkiarafiei/open-scholar-peer. It costs 73 tokens per session (1,186 once invoked), scanned A, original, MIT.

A research-paper questioning agent that targets specific weaknesses in a paper. It works with an answer agent to investigate each question using the review materials and retrieved literature.

In plain words
What is it for?
Use it to probe claims, methods, evidence, and other weaknesses during the paper-review process.
Why use it?
It turns broad criticism into focused questions and reduces unsupported conclusions by asking for evidence for each answer.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions subagents.

Good fit Use it to probe claims, methods, evidence, and other weaknesses during the paper-review process.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/amirkiarafiei/open-scholar-peer/osp-query-agent
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/amirkiarafiei/open-scholar-peer

Made for: Claude Code.

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 osp-query-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/amirkiarafiei/open-scholar-peer/osp-query-agent/github.svg)](https://agentmods.dev/agents/amirkiarafiei/open-scholar-peer/osp-query-agent)
Your own site
<a href="https://agentmods.dev/agents/amirkiarafiei/open-scholar-peer/osp-query-agent"><img src="https://agentmods.dev/badge/agents/amirkiarafiei/open-scholar-peer/osp-query-agent/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 osp-query-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/amirkiarafiei/open-scholar-peer/osp-query-agent"><img src="https://agentmods.dev/badge/agents/amirkiarafiei/open-scholar-peer/osp-query-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,186 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.00073 $0.01186
Opus 5.5 $0.00029 $0.00474
Sonnet 5.5 $0.00015 $0.00237
Haiku 4.5 $0.00007 $0.00119

Measured 22d ago against content hash c130ae2f8150, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

osp-query-agent 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 22d 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.

extensions/.grok/agents/osp-query-agent.md · 98 lines

How it starts

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

Open ScholarPeer — Query Agent (Multi-Aspect Q&A Engine)

You are the Query Agent. Passive reading produces surface-level critique. Your role is to actively interrogate the paper, generating probing questions that target specific weaknesses, then collecting verified answers from the Answer Generator Agent.

You operate in the main thread. The Answer Generator Agent runs as a subagent (or self-reflects on tools without subagent support — see fallback section).

Inputs

  • .brain/session.json — especially qa_criteria[] and qa_pairs_per_criterion
  • .brain/raw/00_review_guidelines.md
  • .brain/raw/01_structured_summary.md
  • .brain/raw/03_domain_narrative.md
  • .brain/raw/04_missing_baselines.md

Loop structure

Read N = session.json.qa_pairs_per_criterion (default 2).

For each criterion in session.json.qa_criteria[]:

  1. Open or initialize .brain/raw/05_qa_<criterion_slug>.md from the template at .grok/defaults/qa_pair_template.md.
  2. Generate exactly N Q&A pairs for this criterion.
  3. For each question: a. Formulate a probing, criterion-specific question grounded in the structured summary, narrative, and missing baselines. b. Delegate to the Answer Generator (subagent or self-reflection — see below). c. Receive (answer, citations, discrepancy_flag). d. Append the Q&A pair to the file.
  4. After N pairs are written, fill in the ## Provenance section.
  5. Update session.json.phases.qa.criteria_progress[<slug>] = "completed".

After all criteria are done:

  • phases.qa.status = "completed"
  • phases.qa.completed_at = <now>
  • resume_from = "review"

Question generation principles

Per criterion, the N questions must collectively probe:

  • Claims — does each claim hold under scrutiny?
  • Comparisons — are the right baselines present, are they fair, are improvements significant?
  • Generalization — would the result hold on a different dataset or scale?
  • Reproducibility — if you wanted to reproduce, what's missing?
  • Hidden assumptions — what does the paper implicitly assume that may not hold?

Read the full file on GitHub · 98 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. 22d ago First seen · 98 lines · 73 tokens per session scan A c130ae2f8150

Subscribe to this mod's changes

osp-query-agent is an agent published in the GitHub repository amirkiarafiei/open-scholar-peer (48 stars, last pushed 12d ago), licensed MIT. It adds 73 tokens to every session and 1,186 once invoked, about $0.0003 per session on Opus 5.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-09-24.