Agent skill

Pubmed Database

by google-deepmind in google-deepmind/science-skills

Search PubMed for scientific literature, including published clinical trials.

Apache-2.0Auto-check: notesResearch & Science

Install Pubmed Database

skills CLI
$ npx skills add google-deepmind/science-skills --skill pubmed-database -a claude-code

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

GitHub CLI
$ gh skill install google-deepmind/science-skills pubmed-database --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/google-deepmind/science-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/pubmed_database .claude/skills/pubmed-database && 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-database
GitHub stars
3.2k
Used in
2 other repos
Token cost
~2.1k tokens
SKILL.md length
918 words
Files
11 (incl. scripts, references)
Skills in repo
40
Repo updated
First seen
Licence
Apache-2.0

At a glance

Search PubMed for scientific literature, including published clinical trials.

  • Works in 5 steps: uv: Read the uv skill and follow its… → User Notification: If… → .env file: Make sure the .env file… → …
  • Tasks that involve Academic paper search
  • SKILL.md covers Prerequisites, Core Rules, Structure of the skill folder and CLI Usage, plus 2 more sections
  • Runs Python scripts from its folder; calls jq and uv; needs NCBI_API_KEY

What it does

Pubmed Database is an agent skill from google-deepmind/science-skills. Search PubMed for scientific literature, including published clinical trials. Fetch abstracts and full text. Link published research to biological databases (gene, protein, nucleotide, PubChem) to discover associations between papers and specific compounds or genes. Verify medical spelling, match raw citations, and cache result sets for bulk processing. Interfaces NCBI E-utilities and PMC BioC APIs.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 12 other files, including scripts and reference files (for example `references/advanced-linking.md`, `references/advanced-search.md` and `references/bulk-workflows.md`).

It sits in Research & Science, covering Academic paper search and Clinical and healthcare research. It works with PubMed and NCBI. The repository describes itself as: GDM Science Skills to speed up agentic scientific workflows with better grounding and higher token efficiency. Integrate insights from AlphaGenome, AFDB, UniProt and 30+ other… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Academic paper search
  • Tasks that involve Clinical and healthcare research

Example prompts

  • “/pubmed-database”

Requirements

  • Python 3
  • A credential in NCBI_API_KEY

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. uv: Read the uv skill and follow its Setup instructions to ensure
  2. User Notification: If .licenses/pubmed_database_LICENSE.txt does not
  3. .env file: Make sure the .env file exists in your home directory.
  4. NCBI_API_KEY (optional): Raises the NCBI E-utilities rate limit from 3
  5. USER_EMAIL (optional): Identifies the caller to NCBI (recommended by

What it can do on your machine

Read from SKILL.md and the folder at commit 6883275. 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 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • jq
    • uv

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

  • Network

    Links to these hosts (documentation or services it may open):

    • ncbi.nlm.nih.gov
    • pubmed.ncbi.nlm.nih.gov

    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 Database loads about 2.1k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 105 tokens; SKILL.md has 918 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:24
    3.  **`.env` file**: Make sure the `.env` file exists in your home directory.

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 google-deepmind/science-skills at commit 6883275, republished under its Apache-2.0 licence (© google-deepmind). 918 words, ~2,083 tokens.

Download SKILL.mdSave it as .claude/skills/pubmed-database/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
pubmed-database
description
Search PubMed for scientific literature, including published clinical trials. Fetch abstracts and full text. Link published research to biological databases (gene, protein, nucleotide, PubChem) to discover associations between papers and specific compounds or genes. Verify medical spelling, match raw citations, and cache result sets for bulk processing. Interfaces NCBI E-utilities and PMC BioC APIs.

PubMed API

Prerequisites

  1. uv: Read the uv skill and follow its Setup instructions to ensure uv is installed and on PATH.
  2. User Notification: If .licenses/pubmed_database_LICENSE.txt does not already exist in the workspace root directory then (1) prominently notify the user to check the terms at https://pubmed.ncbi.nlm.nih.gov/disclaimer/ and https://www.ncbi.nlm.nih.gov/home/about/policies/ and to always check the license of the papers retrieved by the skill for any restrictions, then (2) create the file recording the notification text and timestamp.
  3. .env file: Make sure the .env file exists in your home directory. Create one if it does not exist.
  4. NCBI_API_KEY (optional): Raises the NCBI E-utilities rate limit from 3 to 10 requests/second. The skill works without it, but a key is recommended if the user plans many queries or encounters a 429 error. You can register for a key for free at https://www.ncbi.nlm.nih.gov/account/settings/. You MUST use the safe credentials protocol in the credentials skill to check for and request this key if this skill looks relevant to the user's request.
  5. USER_EMAIL (optional): Identifies the caller to NCBI (recommended by their Terms of Use). You MUST use the safe credentials protocol in the credentials skill to check for and request this credential if this skill looks relevant to the user's request.

This skill provides CLI access to the NCBI PubMed and PubMed Central APIs via scripts/pubmed_api.py — a single CLI with 10 functions covering search, fetch, linking, full text, spelling, discovery, citation matching, and caching.

Core Rules

  • API Use: Always use the provided wrapper scripts/pubmed_api.py which manages rate limits automatically and prevents API abuse. Setting the NCBI_API_KEY environment variable raises the rate limit from 3 to 10 requests/second. Querying the API any other way (e.g. via curl, wget, or hand-written code) is strictly forbidden.
  • JSON Processing: Use jq to filter and transform JSON output (or python equivalents if jq is not available) to prevent hallucinations and context overflow.
  • Temporary Files: To avoid polluting the working directory with JSON files, use a temporary directory inside the current directory. When running multiple agents or tasks in parallel, ensure each uses a unique subdirectory name (e.g., tmp_$TASK_ID/) to avoid file collisions.
  • Notification: If this skill is used, ensure this is mentioned in the output AND list the URLs of all papers that were used in producing the output.

Structure of the skill folder

  • SKILL.md - This file
  • scripts/pubmed_api.py - The skill CLI
  • references/ - Directory with detailed function specifications
    • advanced-linking.md
    • advanced-search.md
    • bulk-workflows.md
    • citation-matching.md
    • cross-database-linking.md
    • fetch-and-resolve.md
    • search-and-discovery.md
    • utilities.md

CLI Usage

bash
uv run scripts/pubmed_api.py <output_file> <function_name> <required_args> [--flag value ...]
  • Positional Arguments: Arguments are positional; list arguments are passed as comma-separated strings without spaces (e.g. "35113657,31234568").
  • Flag Options: Optional arguments can be passed as --flag value instead of positional args.
  • Output Handling: On success, JSON is written to output_file. On error, the process exits with a non-zero code and no output file is written.
Example Usage
bash
uv run scripts/pubmed_api.py ./search_results.json search_pubmed "BRCA1" --max_results 5
cat ./search_results.json | jq '.[]' -r
uv run scripts/pubmed_api.py ./abstracts.json fetch_article_abstracts "35113657"
cat ./abstracts.json | jq '.[0].title' -r

Essential Recipes

Join PMIDs for the next call (most common chaining pattern):

bash
cat ./search_results.json | jq -r 'join(",")'

Slim abstracts to essential fields and truncate long abstracts:

bash
cat ./abstracts.json | jq '[.[] | {pmid, title, snippet: (.abstract // "")[:500]}]'

Filter by keyword (null-safe):

bash
cat ./abstracts.json | jq '[.[] | select((.title // "") | contains("Review"))]'
Show full SKILL.md (426 more words)Show less
Context Management & Accuracy

When processing larger result sets (>10 abstracts):

  1. Filter Early: Use jq to verify keywords in abstracts before reading the full JSON into context.
  2. Slimming: Extract only title and abstract fields unless explicitly instructed otherwise. Author lists and metadata contribute to noise.
  3. Bulk Operations (N > 10): Avoid fetching or processing IDs one-by-one. The API and History Server are designed for bulk retrieval. Fetch all data in a single turn and use shell pipelines to slim the results before reading into context. This prevents turn exhaustion and context overflow.
  4. Grounding: Never use internal knowledge to provide specific identifiers (PMIDs, CIDs, Gene IDs) if no results are found. Report the tool's output accurately to ensure results are grounded in the current database state.
  5. Search Termination: When asked to find papers that may not exist, limit exploration to 3–5 high-quality, varied search queries. If no results match after these attempts, conclude that no papers meet the criteria rather than continuing to iterate — unless explicitly instructed to be thorough.

Functions

⚠️ MANDATORY: You MUST read the linked reference file for a function group before calling any function in that group. The tables below only describe what each function does — not how to call it. Argument names, argument order, flags, and output schemas are only documented in the reference files. Do NOT guess or infer arguments from function names. If you call a function without first reading its reference, you will produce incorrect invocations.

  • search_pubmed: Find PMIDs matching a free-text or structured NCBI query.
  • global_database_discovery: Count how many records match a query across every NCBI database.
Fetch & Resolve
  • fetch_article_abstracts: Retrieve metadata and abstracts for a batch of PMIDs.
  • get_full_text_pmc: Retrieve open-access full text from PMC.
  • fetch_database_summary: Resolve opaque UIDs from any NCBI database into human-readable metadata.
Cross-Database Linking
  • find_linked_biological_data: Find records in other NCBI databases linked to a source record.
  • discover_available_links: List all available ELink linknames for a given record.
Bulk Workflows

When working with more than ~10 PMIDs, avoid processing IDs one-by-one. Upload them to the NCBI History Server via cache_results_history to get a session handle (webenv + query_key), then pass that handle to fetch_article_abstracts or find_linked_biological_data for a single bulk call. Chain with jq shell pipelines to slim results before reading into context. This prevents turn exhaustion and context overflow. See the reference for complete workflow recipes (search→fetch, cross-db exploration, citation resolution, and bulk retrieval with data slimming).

  • cache_results_history: Upload PMIDs to the NCBI History Server for bulk retrieval.
Utilities
  • verify_medical_spelling: Spell-check biomedical terms before searching.
  • match_raw_citations: Resolve incomplete bibliographic citations to PMIDs.

© google-deepmind, 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 10 other files (scripts, references) in skills/pubmed_database of google-deepmind/science-skills.

  • SKILL.md
  • references/advanced-linking.md
  • references/advanced-search.md
  • references/bulk-workflows.md
  • references/citation-matching.md
  • references/citation.bib
  • references/cross-database-linking.md
  • references/fetch-and-resolve.md
  • references/search-and-discovery.md
  • references/utilities.md
  • scripts/pubmed_api.py

Open the folder on GitHubat commit 6883275

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in google-deepmind/science-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Pubmed Database 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 Database compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pubmed Database this skillgoogle-deepmind/science-skills3.2k2 repos~2.1kAutomated safety check: NotesApache-2.0
Medical Research ToolkitFreedomIntelligence/OpenClaw-Medical-Skills3.1k1 repos~2.4kAutomated safety check: PassNone
PubMed REST API Searchdavila7/claude-code-templates32k15 repos~3.9kAutomated safety check: PassMIT
Journal Skillsaipoch/medical-research-skills2k—~1.7kAutomated safety check: PassMIT
Pubmed Databasejaechang-hits/SciAgent-Skills3701 repos~4.4kAutomated safety check: PassCC-BY-4.0
Scientific DB Pubmed Databaseaffaan-m/ECC274k1 repos~1.2kAutomated safety check: PassMIT

Similar skills

  • Medical Research Toolkit

    FreedomIntelligence/OpenClaw-Medical-Skills

    Query 14+ biomedical databases for drug repurposing, target discovery, clinical trials, and literature research.

    3.1k GitHub starsUsed in 1 repo~2.4k tokens
    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
  • Journal Skills

    aipoch/medical-research-skills

    Recommends target journals for manuscript submission by analyzing the paper topic/abstract and the journal distribution of similar PubMed literature; use when users ask for journal…

    2k GitHub stars~1.7k tokensUpdated 20 days ago
    Research & ScienceAuto-check passed
  • Pubmed Database

    jaechang-hits/SciAgent-Skills

    Programmatic PubMed access via NCBI E-utilities REST API. An agent skill from jaechang-hits/SciAgent-Skills.

    370 GitHub starsUsed in 1 repo~4.4k tokens
    Research & ScienceAuto-check passed
  • Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

    274k GitHub starsUsed in 1 repo~1.2k tokens
    Research & ScienceAuto-check passed
  • Mining Pubmed Literature

    maziyarpanahi/openmed

    Searches and fetches PubMed and PMC via NCBI E-utilities (ESearch then EFetch/ESummary) to gather biomedical evidence and build text corpora.

    5.5k GitHub stars~1.7k tokensUpdated yesterday
    Research & ScienceAuto-check passed

More from google-deepmind/science-skills

All 40 skills in this repo
  • Alphafold Database Fetch And Analyze

    google-deepmind/science-skills

    Retrieve and analyze AlphaFold predicted structures for a protein.

    3.2k GitHub starsUsed in 2 repos~1.2k tokens
    Auto-check passed
  • Alphagenome Single Variant Analysis

    google-deepmind/science-skills

    Analyzes genetic variant effects on gene expression (RNA-seq), chromatin accessibility (DNASE), histone marks (ChIP), and transcription factors using the AlphaGenome API.

    3.2k GitHub starsUsed in 2 repos~3k tokens
    Auto-check: notes
  • Chembl Database

    google-deepmind/science-skills

    Query the ChEMBL database for bioactive molecules, drug targets, bioactivity data, approved drugs, and chemical structures.

    3.2k GitHub starsUsed in 2 repos~2.9k tokens
    Auto-check passed
  • Clinical Trials Database

    google-deepmind/science-skills

    Query ClinicalTrials.gov via APIv2. An agent skill from google-deepmind/science-skills.

    3.2k GitHub starsUsed in 2 repos~3.2k tokens
    Auto-check passed
  • Clinvar Database

    google-deepmind/science-skills

    A skill your agent uses when needing clinical significance, pathogenicity classifications (e.g., Pathogenic, Benign, VUS), clinical evidence rationales, or finding "hard positive" benchmark controls…

    3.2k GitHub starsUsed in 2 repos~3.9k tokens
    Auto-check: notes
  • Dbsnp Database

    google-deepmind/science-skills

    A skill your agent uses when you want to look up, map, and search for short genetic variants (SNPs, indels) in NCBI's dbSNP database.

    3.2k GitHub starsUsed in 2 repos~3.4k tokens
    Auto-check: notes

Works with

Questions about Pubmed Database

What does Pubmed Database do?

Search PubMed for scientific literature, including published clinical trials. Pubmed Database is an agent skill from google-deepmind/science-skills. Search PubMed for scientific literature, including published clinical trials.

When should I use Pubmed Database?

Pubmed Database fits situations like: tasks that involve Academic paper search; tasks that involve Clinical and healthcare research.

How do I install Pubmed Database in Claude Code?

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

How do I install Pubmed Database in Codex?

Run `npx skills add google-deepmind/science-skills --skill pubmed-database -a codex`. Or copy the skill folder (skills/pubmed_database in google-deepmind/science-skills) into .agents/skills/pubmed-database in your project. Codex loads it when a task matches its description.

Can I use Pubmed Database 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 google-deepmind/science-skills --skill pubmed-database -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-database, .gemini/skills/pubmed-database, .github/skills/pubmed-database and .opencode/skills/pubmed-database in your project.

What does Pubmed Database need to run?

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

Does Pubmed Database access the network?

SKILL.md names 2 domains. As links in the text: ncbi.nlm.nih.gov and pubmed.ncbi.nlm.nih.gov. This is read from the text; nothing was executed.

Is Pubmed Database safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. 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 Database use?

Pubmed Database 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 Database use?

About 2.1k tokens (SKILL.md is roughly 8.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 9k tokens, read only when the agent opens those files.

What are the alternatives to Pubmed Database?

Skills that share tags, products or a category with Pubmed Database: Medical Research Toolkit (FreedomIntelligence/OpenClaw-Medical-Skills, 3.1k stars), PubMed REST API Search (davila7/claude-code-templates, 32k stars), Journal Skills (aipoch/medical-research-skills, 2k stars) and Pubmed Database (jaechang-hits/SciAgent-Skills, 370 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pubmed Database?

google-deepmind (a GitHub organization) maintains it in google-deepmind/science-skills, which has 3,216 GitHub stars. The repository holds 40 skills in this directory. The repository was last updated on September 15, 2026.

Source: google-deepmind/science-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.