query

query is a command for coding agents from trapoom555/claude-paperloom. It costs 23 tokens per session (395 once invoked), scanned A, original, Apache-2.0.

A command for asking natural-language questions about a research vault. A research vault is a folder containing papers and extracted findings, with answers linked back to the relevant notes.

In plain words
What is it for?
Use it to search papers and findings, synthesize an answer, cite the supporting notes, and flag conflicting evidence.
Why use it?
It helps locate the most relevant research and shows which stored notes support each part of the answer.

Command

Part of the claude-paperloom plugin — 4 commands, 4 agents shipped together

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/trapoom555/claude-paperloom/query
Clone the repo
git clone --depth 1 https://github.com/trapoom555/claude-paperloom

Or install claude-paperloom, the plugin that ships this one along with the rest of its 4 commands, 4 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

README.md
[![agentmods](https://agentmods.dev/badge/commands/trapoom555/claude-paperloom/query.svg)](https://agentmods.dev/commands/trapoom555/claude-paperloom/query)
Your own site
<a href="https://agentmods.dev/commands/trapoom555/claude-paperloom/query"><img src="https://agentmods.dev/badge/commands/trapoom555/claude-paperloom/query.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 395 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00023 $0.00395
Opus 5 $0.00012 $0.00198
Sonnet 5 $0.00005 $0.00079
Haiku 4.5 $0.00002 $0.00040

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

Security

Grade A, and why

query 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 3d 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.

commands/query.md · 32 lines

What it actually says

/paperloom:query

$ARGUMENTS is a natural-language question about the vault's contents.

Vault path

Read vault_path from ${CLAUDE_PLUGIN_CONFIG:vault_path} (default ~/PaperLoom), expand ~ to an absolute path, and use that for every Read/Grep/Glob.

Steps

  1. Plan the search. Identify likely fields/authors/claim types from the question (e.g. "transformer complexity" → field nlp, complexity-analysis). Note key entities.

  2. Scan:

    • grep <vault>/papers/ and <vault>/findings/ for the key terms (titles, statements, frontmatter values).
    • Read the top candidates (papers: Key Takeaways + relevant sections; findings: statement + evidence).
  3. Synthesize. Answer the question. Cite every factual statement with a wikilink — e.g. [[2017-06-attention-is-all-you-need]] or [[finding-self-attention-is-O-n2]]. If findings conflict, say so and cite both sides.

  4. Log via the shared script:

    "${CLAUDE_PLUGIN_ROOT}/.venv/bin/python3" "${CLAUDE_PLUGIN_ROOT}/scripts/log.py" "<vault-path>" query "<one-line question>" "cited <n> files"
    

Guardrails

  • Never fabricate a citation. If you can't find evidence, say so and suggest which paper to ingest.
  • Prefer finding-level wikilinks over paper-level when a specific finding is relevant.
  • Keep answers tight. The user drills into the vault via the citations.
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. 3d ago First seen · 32 lines · 23 tokens per session scan A 5a34556d0752

Subscribe to this mod's changes

query is a command published in the GitHub repository trapoom555/claude-paperloom (95 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 23 tokens to every session and 395 once invoked, about $0.0001 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-30.