epistract-acquire

A command for searching PubMed, a database of biomedical research papers, and downloading matching articles into a local collection.

In plain words
What is it for?
Use it to build a local corpus from a PubMed query, optionally fetching available full text from PubMed Central and limiting or choosing the output directory.
Why use it?
It prepares the papers needed for the epistract document-analysis pipeline instead of requiring manual searches and downloads.

Command

Part of the epistract plugin — 5 skills, 22 commands, 3 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/usathyan/epistract/acquire
Clone the repo
git clone --depth 1 https://github.com/usathyan/epistract

Or install epistract, the plugin that ships this one along with the rest of its 5 skills, 22 commands, 3 agents.

Per session 21 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,046 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.00021 $0.01046
Opus 5 $0.00010 $0.00523
Sonnet 5 $0.00004 $0.00209
Haiku 4.5 $0.00002 $0.00105

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

Security

Grade A, and why

epistract-acquire 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/acquire.md · 126 lines

How it starts

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

Epistract PubMed Acquisition

You are building a document corpus from PubMed for the epistract knowledge graph pipeline.

Usage Guard

If invoked with no arguments or with --help: Display the following usage block verbatim and stop — do not run any pipeline steps.

Usage: /epistract:acquire <query> [options]

Required:
  <query>    PubMed search query (standard PubMed syntax; enclose multi-word queries in quotes)

Options:
  --max <n>        Maximum articles to fetch  (default: 20)
  --output <dir>   Output directory for downloaded corpus  (default: ./epistract-corpus)
  --full-text      Attempt full-text fetch from PMC when available  (default: true)

Examples:
  /epistract:acquire "remdesivir COVID-19 clinical trial"
  /epistract:acquire "KRAS inhibitor" --max 50
  /epistract:acquire "sotorasib NSCLC" --max 100 --output ./kras-corpus

Prerequisites

Prerequisites

The PubMed connector must be available. If it is not connected, tell the user:

PubMed connector not found. Connect it in Claude settings (Settings > Connectors > PubMed) or in Claude Code: /plugin marketplace add anthropics/life-sciences && /plugin install pubmed@life-sciences

Arguments

  • query (required): PubMed search query (supports standard PubMed syntax)
  • --max (optional): Maximum articles to fetch (default: 20)
  • --output (optional): Output directory (default: ./epistract-corpus)
  • --full-text (optional): Attempt to fetch full text from PMC when available (default: true)

Pipeline Steps

Step 1: Search PubMed

Use the PubMed connector to search for articles matching the query. Respect NCBI rate limits — if you receive a rate limit message, wait briefly and retry.

Refine the query if needed for better results. For example, add date filters, MeSH terms, or journal restrictions based on the user's intent.

Step 2: Fetch Article Metadata

For each result, collect:

  • PMID
  • Title
  • Authors (list)
  • Journal name
  • Publication year
  • Abstract text
  • MeSH terms (if available)
  • DOI (if available)
  • PMC ID (if available)

Read the full file on GitHub · 126 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. 3d ago First seen · 126 lines · 21 tokens per session scan A 33620c2c7450

Subscribe to this mod's changes

epistract-acquire is a command published in the GitHub repository usathyan/epistract (8 stars, last pushed 18d ago), licensed MIT. It adds 21 tokens to every session and 1,046 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-31.