Agent skill

Pubmed

by lamm-mit in lamm-mit/scienceclaw

Search PubMed for scientific literature and retrieve abstracts

Apache-2.0Auto-check passedResearch & Science

Install Pubmed

skills CLI
$ npx skills add lamm-mit/scienceclaw --skill pubmed -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install lamm-mit/scienceclaw pubmed --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/lamm-mit/scienceclaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/pubmed .claude/skills/pubmed && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pubmed
GitHub stars
244
Token cost
~817 tokens
SKILL.md length
244 words
Files
4 (incl. scripts, references)
Skills in repo
85
Repo updated
First seen
Licence
Apache-2.0

At a glance

Search PubMed for scientific literature and retrieve abstracts

  • Tasks that involve Academic paper search
  • SKILL.md covers Overview, Usage, Parameters and Search Syntax, plus 3 more sections
  • Runs Python scripts from its folder; calls python3; needs NCBI_API_KEY
  • Tasks that involve Citation management

What it does

Pubmed is an agent skill from lamm-mit/scienceclaw. Search PubMed for scientific literature and retrieve abstracts

Its SKILL.md is about 820 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `references/ncbi-api.md` and `scripts/pubmed_search.py`).

It sits in Research & Science, covering Academic paper search and Citation management. It works with PubMed, LaTeX and NCBI. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Academic paper search
  • Tasks that involve Citation management

Example prompts

  • “/pubmed”

Requirements

  • Python 3
  • A credential in NCBI_API_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit ab9aba1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • NCBI_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pubmed loads about 817 tokens when it runs, and up to ~2.2k if it reads all its reference files. Until then it costs about 17 tokens; SKILL.md has 244 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~17
When it runs · the whole SKILL.md, loaded when a task matches
~817
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from lamm-mit/scienceclaw at commit ab9aba1, republished under its Apache-2.0 licence (© lamm-mit). 244 words, ~817 tokens.

Download SKILL.mdSave it as .claude/skills/pubmed/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
pubmed
description
Search PubMed for scientific literature and retrieve abstracts

Search the PubMed database for scientific literature, retrieve abstracts, and format citations.

Overview

PubMed is a free database of biomedical literature from MEDLINE, life science journals, and online books. This skill uses NCBI's E-utilities API to search and fetch articles.

Usage

bash
python3 {baseDir}/scripts/pubmed_search.py --query "CRISPR gene editing"
Search with filters:
bash
python3 {baseDir}/scripts/pubmed_search.py --query "cancer immunotherapy" --year 2024 --max-results 20
Get full abstracts:
bash
python3 {baseDir}/scripts/pubmed_search.py --query "machine learning drug discovery" --format detailed
Export citations:
bash
python3 {baseDir}/scripts/pubmed_search.py --query "protein folding" --format bibtex
Fetch specific article by PMID:
bash
python3 {baseDir}/scripts/pubmed_search.py --pmid 35648464

Parameters

ParameterDescriptionDefault
--querySearch query (supports PubMed syntax)Required*
--pmidSpecific PubMed ID to fetch-
--max-resultsMaximum number of results10
--yearFilter by publication year-
--year-startStart year for date range-
--year-endEnd year for date range-
--authorFilter by author name-
--journalFilter by journal name-
--formatOutput format: summary, detailed, bibtex, jsonsummary
--sortSort by: relevance, date, first_authorrelevance

*Required unless --pmid is provided

Search Syntax

PubMed supports advanced search operators:

  • AND/OR/NOT: Combine terms (cancer AND therapy)
  • Phrases: Use quotes ("breast cancer")
  • Field tags: [Title], [Author], [Journal], [MeSH]
  • Wildcards: * for truncation (immun*)
Examples:
cancer[Title] AND therapy[Title]
"machine learning"[Title/Abstract]
Smith J[Author] AND 2024[Date - Publication]
Nature[Journal]
CRISPR[MeSH Terms]

Examples

Search recent papers on a topic:
bash
python3 {baseDir}/scripts/pubmed_search.py --query "AlphaFold protein structure" --year 2024 --max-results 15
Search by author:
bash
python3 {baseDir}/scripts/pubmed_search.py --query "CRISPR" --author "Doudna JA"
Get BibTeX for citations:
bash
python3 {baseDir}/scripts/pubmed_search.py --query "deep learning genomics" --format bibtex --max-results 5
Combine multiple filters:
bash
python3 {baseDir}/scripts/pubmed_search.py --query "COVID-19 vaccine" --year-start 2023 --year-end 2024 --sort date

Output Formats

Summary

Compact list with title, authors, journal, and year.

Detailed

Full abstract, author affiliations, MeSH terms, and DOI.

BibTeX

Citation format for LaTeX documents.

JSON

Machine-readable format with all metadata.

Notes

  • NCBI E-utilities have rate limits; heavy usage should use an API key
  • Set NCBI_EMAIL environment variable for better rate limits
  • Set NCBI_API_KEY for up to 10 requests/second (vs 3/second without)
  • Results are returned by relevance by default

© lamm-mit, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in skills/pubmed of lamm-mit/scienceclaw.

  • SKILL.md
  • references/ncbi-api.md
  • scripts/__pycache__/pubmed_search.cpython-313.pyc
  • scripts/pubmed_search.py

Open the folder on GitHubat commit ab9aba1

Compare with similar skills

Pubmed next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pubmed compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pubmed this skilllamm-mit/scienceclaw244—~817Automated safety check: PassApache-2.0
Search LitAperivue/medsci-skills329—~4.7kAutomated safety check: PassMIT
Citation Managementneflibata-feng/MyArxiv-Agent12620 repos~8.1kAutomated safety check: NotesMIT
Nature Academic Searchjing1312/nature-figure-skill167—~1.3kAutomated safety check: NotesMIT
Literature DownloaderLucaswangzcx/literature-downloader-skill236—~1.4kAutomated safety check: PassMIT
PubMed REST API Searchdavila7/claude-code-templates32k15 repos~3.9kAutomated safety check: PassMIT

Similar skills

  • Search Lit

    Aperivue/medsci-skills

    A skill your agent uses when finding papers or building a reference list.

    329 GitHub stars~4.7k tokensUpdated 3 days ago
    Research & ScienceAuto-check passed
  • Citation Management

    neflibata-feng/MyArxiv-Agent

    Comprehensive citation management for academic research. An agent skill from neflibata-feng/MyArxiv-Agent.

    126 GitHub starsUsed in 20 repos~8.1k tokens
    Research & ScienceAuto-check: notes
  • Nature Academic Search

    jing1312/nature-figure-skill

    Multi-source literature search, citation verification, MeSH search strategy, citation file management (.nbib/.ris/.bib conversion), and reference management (BibTeX, related articles, ID conversion)…

    167 GitHub stars~1.3k tokensUpdated 1 mo ago
    Research & ScienceAuto-check: notes
  • Literature Downloader

    Lucaswangzcx/literature-downloader-skill

    中文文献检索、筛选、批量采集和合法全文获取助手。用于用户需要查找论文、下载可合法获取的 PDF/HTML/XML 全文、生成关键词和检索式、查询 DOI/PMID、筛选高影响因子或高分区期刊、检查开放获取、做引用链扩展、批量文献候选表、下载日志、去重清单、Zotero/BibTeX 整理,或解决文献难下载问题;禁止绕过付费墙、盗版下载、共享账号或规避版权限制。

    236 GitHub stars~1.4k tokensUpdated 5 mo ago
    Research & ScienceAuto-check passed
  • PubMed REST API Search

    davila7/claude-code-templates

    Searches PubMed directly through its E-utilities REST API, with guidance on Boolean and MeSH query syntax, batch retrieval and citation data.

    32k GitHub starsUsed in 15 repos~3.9k tokens
    Research & ScienceAuto-check passed
  • Literature Review

    Norman-bury/research-writing-skill

    A skill your agent uses when writing literature review sections - guides searching, organizing, and synthesizing academic sources

    3.4k GitHub stars~2.2k tokensUpdated 4 mo ago
    Research & ScienceAuto-check: notes

More from lamm-mit/scienceclaw

All 85 skills in this repo
  • Fred Economic Data

    lamm-mit/scienceclaw

    Query FRED (Federal Reserve Economic Data) API for 800,000+ economic time series from 100+ sources.

    244 GitHub starsUsed in 4 repos~3k tokens
    Auto-check passed
  • Drug Research

    lamm-mit/scienceclaw

    Generates comprehensive drug research reports with compound disambiguation, evidence grading, and mandatory completeness sections.

    244 GitHub starsUsed in 3 repos~1.7k tokens
    Auto-check passed
  • Imaging Data Commons

    lamm-mit/scienceclaw

    Query and download public cancer imaging data from NCI Imaging Data Commons using idc-index.

    244 GitHub starsUsed in 5 repos~11k tokens
    Auto-check passed
  • Rowan

    lamm-mit/scienceclaw

    Cloud-based quantum chemistry platform with Python API. An agent skill from lamm-mit/scienceclaw.

    244 GitHub starsUsed in 4 repos~3.1k tokens
    Auto-check: warnings
  • Infographics

    lamm-mit/scienceclaw

    Create professional infographics using Nano Banana Pro AI with smart iterative refinement.

    244 GitHub starsUsed in 6 repos~4.4k tokens
    Auto-check: notes
  • Disease Research

    lamm-mit/scienceclaw

    Generate comprehensive disease research reports using 100+ ToolUniverse tools.

    244 GitHub stars~946 tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Pubmed

What does Pubmed do?

Search PubMed for scientific literature and retrieve abstracts. Pubmed is an agent skill from lamm-mit/scienceclaw.

When should I use Pubmed?

Pubmed fits situations like: tasks that involve Academic paper search; tasks that involve Citation management.

How do I install Pubmed in Claude Code?

Run `npx skills add lamm-mit/scienceclaw --skill pubmed -a claude-code`. Or copy the skill folder (skills/pubmed in lamm-mit/scienceclaw) into .claude/skills/pubmed in your project. Claude Code loads it when a task matches its description.

How do I install Pubmed in Codex?

Run `npx skills add lamm-mit/scienceclaw --skill pubmed -a codex`. Or copy the skill folder (skills/pubmed in lamm-mit/scienceclaw) into .agents/skills/pubmed in your project. Codex loads it when a task matches its description.

Can I use Pubmed in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lamm-mit/scienceclaw --skill pubmed -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pubmed, .gemini/skills/pubmed, .github/skills/pubmed and .opencode/skills/pubmed in your project.

What does Pubmed need to run?

Going by SKILL.md and its folder, Pubmed needs Python for the scripts in its folder, the command-line tools its instructions call (python3) and credentials named NCBI_API_KEY. Our summary lists: Python 3; A credential in NCBI_API_KEY.

Does Pubmed access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Pubmed safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Pubmed use?

Pubmed is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pubmed use?

About 817 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.4k tokens, read only when the agent opens those files.

What are the alternatives to Pubmed?

Skills that share tags, products or a category with Pubmed: Search Lit (Aperivue/medsci-skills, 329 stars), Citation Management (neflibata-feng/MyArxiv-Agent, 126 stars), Nature Academic Search (jing1312/nature-figure-skill, 167 stars) and Literature Downloader (Lucaswangzcx/literature-downloader-skill, 236 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pubmed?

lamm-mit (a GitHub user) maintains it in lamm-mit/scienceclaw, which has 244 GitHub stars. The repository holds 85 skills in this directory. The repository was last updated on August 21, 2026.

Source: lamm-mit/scienceclaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.