PubMed Skill
Search and retrieve biomedical literature from the NCBI PubMed database via the E-utilities REST API. Access 35+ million citations from MEDLINE, life sciences journals, and online books. No authentication required.
When to use this skill
Invoke this skill when the user wants to:
- Search PubMed for papers on any biomedical or life sciences topic
- Find clinical trials, systematic reviews, meta-analyses, or RCTs on a specific condition or treatment
- Retrieve abstracts or full citation details for one or more PMIDs
- Look up a specific paper by author, journal, year, volume, and page number
- Find papers using MeSH terms, field tags, or advanced Boolean queries
- Get the full bibliographic record for a known article (journal, volume, pages, DOI, PMC ID)
- Explore what the medical literature says about a drug, disease, or intervention
Commands
Search PubMed for articles
bun run skills/pubmed-database/cli/src/cli.ts search --query "<query>" [flags]
Key flags:
--query <q> — required; full PubMed query syntax supported (Boolean, MeSH, field tags, date ranges, wildcards)
--max <n> — number of results (default 20)
--start <n> — offset for pagination (default 0)
--sort <order> — relevance (default), pub_date, first_author
--limit <n> — client-side cap
--format json|table|plain
Returns { meta: { total, returnedCount, retstart }, results: [{ pmid, title, authors, source, pubDate, doi }] }.
Fetch abstracts by PMID
bun run skills/pubmed-database/cli/src/cli.ts fetch --ids <pmids> [--format text|medline]
--ids — comma-separated PMIDs (required)
--format text (default) — abstract text; medline — MEDLINE tagged format
Returns plain text (not JSON).
Full record for a single PMID
bun run skills/pubmed-database/cli/src/cli.ts detail <pmid> [--format json|plain]
Returns complete bibliographic record including volume, issue, pages, DOI, PMC ID, publication types, citation count.
Find PMID from partial citation
bun run skills/pubmed-database/cli/src/cli.ts cite-match \
[--journal <j>] [--year <y>] [--volume <v>] [--page <p>] [--author <a>]
Returns { results: [{ citation, pmid, found }], rawResponse }.
How to use effectively
Natural workflow: search → fetch or detail.
- Use
search to find relevant PMIDs for a topic.
- Call
fetch --ids <pmid> to read the full abstract.
- Call
detail <pmid> for complete bibliographic metadata (journal, volume, DOI, PMC ID, citation count).
Use PubMed query syntax in --query for precise results:
- MeSH terms:
diabetes mellitus, type 2[mh]
- Publication type:
AND systematic review[pt]
- Date range:
AND 2020:2024[dp]
- Title/abstract:
AND insulin resistance[tiab]
- Free full text:
AND free full text[sb]
Pagination: Use --start to page through results. --max is the page size (how many PMIDs ESearch retrieves).
Unknown PMID for a paper? Use cite-match with whatever citation details you have — journal, year, volume, page.
Usage examples
What are the latest RCTs on GLP-1 drugs for obesity?
bun run skills/pubmed-database/cli/src/cli.ts search \
--query "GLP-1[tiab] AND obesity[mh] AND randomized controlled trial[pt] AND 2022:2024[dp]" \
--max 5 --sort pub_date --format table
Get the abstract for PMID 38123456
bun run skills/pubmed-database/cli/src/cli.ts fetch --ids 38123456
Full bibliographic record for a PMID
bun run skills/pubmed-database/cli/src/cli.ts detail 20536893 --format plain
Find the PMID for a known journal article
bun run skills/pubmed-database/cli/src/cli.ts cite-match \
--journal "N Engl J Med" --year 2021 --volume 385 --page 1487
Systematic reviews on COVID-19 long-term effects
bun run skills/pubmed-database/cli/src/cli.ts search \
--query "(long covid[tiab] OR post-acute covid[tiab]) AND systematic review[pt]" \
--max 5 --format table
Search by author
bun run skills/pubmed-database/cli/src/cli.ts search \
--query "Fauci AS[au] AND 2020:2024[dp]" --max 5
Output formats
| Format |
Best for |
json |
Default — data processing, reading fields programmatically |
table |
Quick human-readable overviews |
plain |
Single-record views (detail) |
Reference files
Extended documentation is in references/:
references/api_reference.md — full E-utilities API docs
references/search_syntax.md — PubMed query syntax, field tags, Boolean operators
references/common_queries.md — example queries for diseases, study types, populations
All errors are written to stderr as { "error": "...", "code": "..." } with exit code 1.
1---2name: pubmed-database3description: Make sure to use this skill whenever the user asks about biomedical or life sciences literature, medical research, clinical trials, systematic reviews, meta-analyses, drug studies, or any topic that might be in PubMed or MEDLINE — even if they don't mention PubMed explicitly. Also invoke for questions about specific PMIDs, DOIs, journal articles, abstracts, or citation lookups. Trigger phrases include: pubmed, medline, ncbi, biomedical research, medical literature, clinical trial, systematic review, meta-analysis, randomized controlled trial, RCT, MeSH terms, PMID, biomedical journal, life sciences paper, find article by author, find study on, search medical literature, evidence-based medicine, drug efficacy study, cancer research papers, diabetes research, cardiovascular study, neurology research, infectious disease literature, genomics paper, CRISPR study, COVID-19 research, vaccine efficacy study, find papers on, what does the literature say about, research on treatment of, studies on, cite this paper, loo4---56# PubMed Skill78Search and retrieve biomedical literature from the NCBI PubMed database via the E-utilities REST API. Access 35+ million citations from MEDLINE, life sciences journals, and online books. No authentication required.910## When to use this skill1112Invoke this skill when the user wants to:1314- Search PubMed for papers on any biomedical or life sciences topic15- Find clinical trials, systematic reviews, meta-analyses, or RCTs on a specific condition or treatment16- Retrieve abstracts or full citation details for one or more PMIDs17- Look up a specific paper by author, journal, year, volume, and page number18- Find papers using MeSH terms, field tags, or advanced Boolean queries19- Get the full bibliographic record for a known article (journal, volume, pages, DOI, PMC ID)20- Explore what the medical literature says about a drug, disease, or intervention2122## Commands2324### Search PubMed for articles2526```bash27bun run skills/pubmed-database/cli/src/cli.ts search --query "<query>" [flags]28```2930Key flags:31- `--query <q>` — **required**; full PubMed query syntax supported (Boolean, MeSH, field tags, date ranges, wildcards)32- `--max <n>` — number of results (default 20)33- `--start <n>` — offset for pagination (default 0)34- `--sort <order>` — `relevance` (default), `pub_date`, `first_author`35- `--limit <n>` — client-side cap36- `--format json|table|plain`3738Returns `{ meta: { total, returnedCount, retstart }, results: [{ pmid, title, authors, source, pubDate, doi }] }`.3940### Fetch abstracts by PMID4142```bash43bun run skills/pubmed-database/cli/src/cli.ts fetch --ids <pmids> [--format text|medline]44```4546- `--ids` — comma-separated PMIDs (required)47- `--format text` (default) — abstract text; `medline` — MEDLINE tagged format4849Returns plain text (not JSON).5051### Full record for a single PMID5253```bash54bun run skills/pubmed-database/cli/src/cli.ts detail <pmid> [--format json|plain]55```5657Returns complete bibliographic record including volume, issue, pages, DOI, PMC ID, publication types, citation count.5859### Find PMID from partial citation6061```bash62bun run skills/pubmed-database/cli/src/cli.ts cite-match \63 [--journal <j>] [--year <y>] [--volume <v>] [--page <p>] [--author <a>]64```6566Returns `{ results: [{ citation, pmid, found }], rawResponse }`.6768---6970## How to use effectively7172**Natural workflow: `search` → `fetch` or `detail`.**731. Use `search` to find relevant PMIDs for a topic.742. Call `fetch --ids <pmid>` to read the full abstract.753. Call `detail <pmid>` for complete bibliographic metadata (journal, volume, DOI, PMC ID, citation count).7677**Use PubMed query syntax in `--query`** for precise results:78- MeSH terms: `diabetes mellitus, type 2[mh]`79- Publication type: `AND systematic review[pt]`80- Date range: `AND 2020:2024[dp]`81- Title/abstract: `AND insulin resistance[tiab]`82- Free full text: `AND free full text[sb]`8384**Pagination**: Use `--start` to page through results. `--max` is the page size (how many PMIDs ESearch retrieves).8586**Unknown PMID for a paper?** Use `cite-match` with whatever citation details you have — journal, year, volume, page.8788---8990## Usage examples9192### What are the latest RCTs on GLP-1 drugs for obesity?9394```bash95bun run skills/pubmed-database/cli/src/cli.ts search \96 --query "GLP-1[tiab] AND obesity[mh] AND randomized controlled trial[pt] AND 2022:2024[dp]" \97 --max 5 --sort pub_date --format table98```99100### Get the abstract for PMID 38123456101102```bash103bun run skills/pubmed-database/cli/src/cli.ts fetch --ids 38123456104```105106### Full bibliographic record for a PMID107108```bash109bun run skills/pubmed-database/cli/src/cli.ts detail 20536893 --format plain110```111112### Find the PMID for a known journal article113114```bash115bun run skills/pubmed-database/cli/src/cli.ts cite-match \116 --journal "N Engl J Med" --year 2021 --volume 385 --page 1487117```118119### Systematic reviews on COVID-19 long-term effects120121```bash122bun run skills/pubmed-database/cli/src/cli.ts search \123 --query "(long covid[tiab] OR post-acute covid[tiab]) AND systematic review[pt]" \124 --max 5 --format table125```126127### Search by author128129```bash130bun run skills/pubmed-database/cli/src/cli.ts search \131 --query "Fauci AS[au] AND 2020:2024[dp]" --max 5132```133134---135136## Output formats137138| Format | Best for |139|--------|----------|140| `json` | Default — data processing, reading fields programmatically |141| `table` | Quick human-readable overviews |142| `plain` | Single-record views (`detail`) |143144---145146## Reference files147148Extended documentation is in `references/`:149- `references/api_reference.md` — full E-utilities API docs150- `references/search_syntax.md` — PubMed query syntax, field tags, Boolean operators151- `references/common_queries.md` — example queries for diseases, study types, populations152153All errors are written to **stderr** as `{ "error": "...", "code": "..." }` with exit code `1`.