medrxiv-search

SKILL.md

medRxiv Search Skill

Search and retrieve medical preprints from medRxiv via the free Cold Spring Harbor Laboratory API (api.medrxiv.org). No API key, no signup, no cost. Covers all medRxiv preprints across 51 subject categories.

When to use this skill

Invoke this skill when the user wants to:

  • Find the latest preprints on a medical or clinical topic
  • Look up a specific paper by its DOI (get all versions)
  • Explore what research categories medRxiv covers
  • Search for clinical trial results, epidemiology studies, or public health data
  • Find unpublished or recently published research before it appears in journals
  • Get abstracts and metadata for medical research papers

Commands

Search preprints by keyword

bun run skills/medrxiv-search/cli/src/cli.ts search --query "<keywords>" [flags]

Key flags:

  • --query <text>required — keywords to match in title and abstract
  • --days <n> — date range to search (default: 30; use 7 for speed)
  • --max <n> — maximum results to return (default: 20)
  • --category <name> — filter by medRxiv category (use categories to list)
  • --format json|table|plain

The API does not support keyword search natively. The CLI fetches all papers in the date range and filters locally, ranking by keyword hit count. Use --days 7 for fast searches; --days 90 for comprehensive coverage.

Look up a paper by DOI

bun run skills/medrxiv-search/cli/src/cli.ts doi <doi> [--format json|plain]

Returns all versions of the paper. doi is the raw DOI string, e.g. 10.1101/2024.12.26.24319649.

List all categories

bun run skills/medrxiv-search/cli/src/cli.ts categories [--format json|plain]

Returns the 51 medRxiv subject categories you can pass to search --category.


How to use effectively

Fast search: Use --days 7 to limit the date window and get results quickly. The CLI must paginate through all papers in the range before filtering.

Targeted search: Combine --category with --query to narrow results. For example, to find epidemiology papers about obesity:

bun run skills/medrxiv-search/cli/src/cli.ts search \
  --query "obesity prevalence" \
  --category "epidemiology" \
  --days 30 \
  --max 10

DOI workflow: If the user provides or mentions a DOI, go straight to doi — it returns all versions instantly without any date-range fetching.

Category exploration: Use categories first to confirm the exact category name spelling before filtering with --category.

Natural workflow: search → doi

  1. Use search to find relevant papers and get their DOIs
  2. Use doi <doi> to get full metadata including all versions of a specific paper

Usage examples

Find recent COVID vaccine research

bun run skills/medrxiv-search/cli/src/cli.ts search \
  --query "COVID vaccine efficacy" \
  --days 30 \
  --max 10

Find epidemiology papers on diabetes (last 90 days)

bun run skills/medrxiv-search/cli/src/cli.ts search \
  --query "diabetes" \
  --category "epidemiology" \
  --days 90 \
  --max 20

Get all versions of a paper by DOI

bun run skills/medrxiv-search/cli/src/cli.ts doi 10.1101/2024.12.26.24319649

Browse available categories

bun run skills/medrxiv-search/cli/src/cli.ts categories --format plain

Quick search with table output

bun run skills/medrxiv-search/cli/src/cli.ts search \
  --query "heart failure" \
  --days 7 \
  --format table

Output formats

Format Best for
json Default — programmatic use, full metadata
table Quick human-readable overviews
plain Reading individual papers or categories

All errors are written to stderr as { "error": "...", "code": "..." } and the process exits with code 1.


Notes

  • Data from the free api.medrxiv.org REST API — no credentials required
  • Papers are paginated in batches of 100; the CLI fetches all pages automatically
  • Results are ranked by keyword hit count (most mentions = higher rank)
  • The url field gives the direct medRxiv link including version number
  • published field shows the journal DOI if the paper was later published, otherwise "NA"
Weekly Installs
2
GitHub Stars
19
First Seen
2 days ago
Installed on
amp2
cline2
opencode2
cursor2
kimi-cli2
codex2