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.
Retrieve protein and nucleotide sequences from NCBI databases using E-utilities.
$ npx skills add google-deepmind/science-skills --skill ncbi-sequence-fetch -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install google-deepmind/science-skills ncbi-sequence-fetch --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/google-deepmind/science-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ncbi_sequence_fetch .claude/skills/ncbi-sequence-fetch && rm -rf skills-srcUse ~/.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/
Install the "ncbi-sequence-fetch" agent skill from https://github.com/google-deepmind/science-skills/tree/main/skills/ncbi_sequence_fetch into .claude/skills/ncbi-sequence-fetch/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ncbi-sequence-fetch", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/google-deepmind/science-skills/tree/main/skills/ncbi_sequence_fetchType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add google-deepmind/science-skills --skill ncbi-sequence-fetch -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install google-deepmind/science-skills ncbi-sequence-fetch --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/google-deepmind/science-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/ncbi_sequence_fetch .agents/skills/ncbi-sequence-fetch && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "ncbi-sequence-fetch" agent skill from https://github.com/google-deepmind/science-skills/tree/main/skills/ncbi_sequence_fetch into .agents/skills/ncbi-sequence-fetch/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ncbi-sequence-fetch", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add google-deepmind/science-skills --skill ncbi-sequence-fetch -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install google-deepmind/science-skills ncbi-sequence-fetch --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/google-deepmind/science-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/ncbi_sequence_fetch .cursor/skills/ncbi-sequence-fetch && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "ncbi-sequence-fetch" agent skill from https://github.com/google-deepmind/science-skills/tree/main/skills/ncbi_sequence_fetch into .cursor/skills/ncbi-sequence-fetch/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ncbi-sequence-fetch", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/google-deepmind/science-skills.git --path skills/ncbi_sequence_fetch--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add google-deepmind/science-skills --skill ncbi-sequence-fetch -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install google-deepmind/science-skills ncbi-sequence-fetch --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/google-deepmind/science-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/ncbi_sequence_fetch .gemini/skills/ncbi-sequence-fetch && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "ncbi-sequence-fetch" agent skill from https://github.com/google-deepmind/science-skills/tree/main/skills/ncbi_sequence_fetch into .gemini/skills/ncbi-sequence-fetch/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ncbi-sequence-fetch", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install google-deepmind/science-skills ncbi-sequence-fetchInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add google-deepmind/science-skills --skill ncbi-sequence-fetch -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/google-deepmind/science-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/ncbi_sequence_fetch .github/skills/ncbi-sequence-fetch && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "ncbi-sequence-fetch" agent skill from https://github.com/google-deepmind/science-skills/tree/main/skills/ncbi_sequence_fetch into .github/skills/ncbi-sequence-fetch/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ncbi-sequence-fetch", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add google-deepmind/science-skills --skill ncbi-sequence-fetch -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install google-deepmind/science-skills ncbi-sequence-fetch --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/google-deepmind/science-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/ncbi_sequence_fetch .opencode/skills/ncbi-sequence-fetch && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "ncbi-sequence-fetch" agent skill from https://github.com/google-deepmind/science-skills/tree/main/skills/ncbi_sequence_fetch into .opencode/skills/ncbi-sequence-fetch/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ncbi-sequence-fetch", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
ncbi-sequence-fetchRetrieve protein and nucleotide sequences from NCBI databases using E-utilities.
Ncbi Sequence Fetch is an agent skill from google-deepmind/science-skills. Retrieve protein and nucleotide sequences from NCBI databases using E-utilities. Supports direct accession lookup, CDS translation, gene+organism search, locus lookup, PubMed-linked sequences, patent protein extraction, and organism+length fallback search. Use when you need to fetch biological sequences by accession, gene name, locus tag, PubMed ID, or patent number.
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts and reference files (for example `scripts/ncbi_fetch.py`).
It sits in Research & Science, covering Academic paper search, Intellectual property and Translation. It works with NCBI and PubMed. 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.
10 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 6883275. It shows what the files ask for, not the result of running them.
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.
Ships 1 file in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
uvFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
ncbi.nlm.nih.govFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
NCBI_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Ncbi Sequence Fetch loads about 2.3k tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 97 tokens; SKILL.md has 840 words of instructions outside code blocks.
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.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
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.
The full file from google-deepmind/science-skills at commit 6883275, republished under its Apache-2.0 licence (© google-deepmind). 840 words, ~2,254 tokens.
.claude/skills/ncbi-sequence-fetch/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.uv: Read the uv skill and follow its Setup instructions to ensure
uv is installed and on PATH..env file: Make sure the .env file exists in your home directory.
Create one if it does not exist.NCBI_API_KEY (optional): Raises the NCBI 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.NCBI_API_KEY in their
environment, the query speed limits are automatically increased
significantly.Wraps NCBI's Entrez E-utilities (efetch, esearch, elink, esummary) for retrieving protein and nucleotide sequences. Provides 10 subcommands covering the full range of sequence retrieval workflows:
fetch-protein — Direct protein accession lookup (GenPept, RefSeq)fetch-nucleotide — Direct nucleotide accession lookupcds-translate — Fetch CDS and translate to protein (3 methods)search — Free-text search of any NCBI databaseelink — Follow cross-database links (PubMed→Protein, etc.)gene-protein — Search protein by gene name + organismlocus-protein — Search protein by locus tag + organismpubmed-proteins — Find proteins linked to a PubMed articlepatent-search — Extract protein sequences from patentsorganism-length — Last-resort search by organism + exact AA lengthscripts/ncbi_fetch.py — Single script with subcommands.
All subcommands write structured JSON output. Use --output FILE to save to a
file, or omit it to print to stdout. A human-readable summary is always printed
to stdout.
Fetches protein FASTA from NCBI by accession (XP_, NP_, GenPept, etc.)
uv run scripts/ncbi_fetch.py fetch-protein XP_022033624 -o /tmp/result.json
uv run scripts/ncbi_fetch.py fetch-protein NP_001234567 ABC12345.1Fetches nucleotide FASTA from NCBI by accession.
uv run scripts/ncbi_fetch.py fetch-nucleotide MK034466 -o /tmp/result.jsonFetches a CDS/nucleotide accession and translates to protein sequence. Tries
three approaches in order: 1. NCBI's pre-translated CDS protein (fasta_cds_aa)
uv run scripts/ncbi_fetch.py cds-translate MK034466 -o /tmp/result.json
uv run scripts/ncbi_fetch.py cds-translate HQ662330 --target-length 1043If the accession is a genomic record (not mRNA/CDS), the tool will report
is_genomic: true so you can fall back to a homology-based approach instead.
Free-text search using Entrez query syntax. Supports all NCBI databases.
# Search protein database
uv run scripts/ncbi_fetch.py search "WRR4B[Gene Name] AND Arabidopsis[Organism]" \
--database protein --retmax 5 --fetch-sequences
# Search nucleotide database
uv run scripts/ncbi_fetch.py search "Rz2[Gene Name] AND Beta vulgaris[Organism]" \
--database nuccore --retmax 10
# Search with patent filter
uv run scripts/ncbi_fetch.py search "disease resistance AND Solanum[Organism] AND patent[Properties]" \
--database protein --fetch-sequences
# Search by sequence length
uv run scripts/ncbi_fetch.py search '"Oryza sativa"[Organism] AND 1043[SLEN]' \
--database protein --fetch-sequences --retmax 50Follow NCBI's cross-database links (e.g., PubMed article → linked proteins).
uv run scripts/ncbi_fetch.py elink 24896089 --dbfrom pubmed --db protein \
--fetch-sequences -o /tmp/linked.jsonSearches for protein sequences by gene name and organism. Searches NCBI Protein
with [Gene Name] and [Organism] qualifiers.
uv run scripts/ncbi_fetch.py gene-protein WRR4B --organism "Arabidopsis thaliana"
uv run scripts/ncbi_fetch.py gene-protein Pikh-2 --organism "Oryza sativa" \
--target-length 1043 -o /tmp/result.jsonSearches by locus tag in both NCBI Protein and Nuccore databases. Extracts CDS translations from GenBank XML when direct protein hits aren't available.
uv run scripts/ncbi_fetch.py locus-protein At1g56540 --organism "Arabidopsis thaliana"
uv run scripts/ncbi_fetch.py locus-protein Niben101Scf02422g02015.1 \
--organism "Nicotiana benthamiana" -o /tmp/result.jsonFinds protein sequences linked to a PubMed article. Searches NCBI Protein by PMID, follows elink PubMed→Protein, and extracts CDS translations from linked Nuccore records.
uv run scripts/ncbi_fetch.py pubmed-proteins 30692254 --identifier WRR4B
uv run scripts/ncbi_fetch.py pubmed-proteins 24896089 --identifier "K2" \
-o /tmp/result.jsonTwo modes:
By patent number — fetches all protein sequences from a specific patent:
bash uv run scripts/ncbi_fetch.py patent-search --patent-number US10123456 -o /tmp/patent.json
By keywords — searches NCBI Protein with patent[Properties] filter: bash uv run scripts/ncbi_fetch.py patent-search --keywords WRR4B Albugo --organism "Arabidopsis thaliana" -o /tmp/patent.json
[!IMPORTANT] Patent convention: In molecular biology patents, SEQ ID NO: 1 is typically the DNA sequence and SEQ ID NO: 2 is the primary protein. Higher SEQ ID NOs are variants or related sequences. Prefer Sequence 2 when selecting the primary protein of interest.
Last-resort search when only organism and expected protein length are known.
Uses NCBI's [SLEN] filter for exact length matching.
uv run scripts/ncbi_fetch.py organism-length \
--organism "Arabidopsis thaliana" --length 1048 --retmax 50 \
-o /tmp/result.json[!NOTE] This often returns multiple candidates. Use the JSON output headers to identify the correct protein.
When trying to find a protein sequence, follow this priority order:
fetch-protein with GenPept/RefSeq accessioncds-translate with nucleotide/CDS accessionpubmed-proteins with PMID + gene namelocus-protein with locus tag + organismgene-protein with gene name + organismpatent-search with patent number or keywordsorganism-length as last resortresults arraysequence (AA string), length, and header/metadatatarget_length)XP_ / NP_ — NCBI RefSeq proteinAAA to AZZ + digits — GenPept (translated GenBank)MK, MN, HQ, etc. + digits — GenBank nucleotideENSG, ENST, ENSP — Ensembl (use ensembl-database skill instead)Q, P, O + digits — UniProt (use uniprot-database skill instead)© 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
SKILL.md and 2 other files (scripts, references) in skills/ncbi_sequence_fetch of google-deepmind/science-skills.
Open the folder on GitHubat commit 6883275
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in google-deepmind/science-skills, which our catalogue first saw on October 7, 2026.
Ncbi Sequence Fetch 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Ncbi Sequence Fetch this skillgoogle-deepmind/science-skills | 3.2k | 1 repos | ~2.3k | Automated safety check: Notes | Apache-2.0 | |
| PubMed REST API Searchdavila7/claude-code-templates | 32k | 15 repos | ~3.9k | Automated safety check: Pass | MIT | |
| Journal Skillsaipoch/medical-research-skills | 2k | — | ~1.7k | Automated safety check: Pass | MIT | |
| Pubmed Databasejaechang-hits/SciAgent-Skills | 370 | 1 repos | ~4.4k | Automated safety check: Pass | CC-BY-4.0 | |
| Scientific DB Pubmed Databaseaffaan-m/ECC | 274k | 1 repos | ~1.2k | Automated safety check: Pass | MIT | |
| Mining Pubmed Literaturemaziyarpanahi/openmed | 5.5k | — | ~1.7k | Automated safety check: Pass | Apache-2.0 |
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.
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…
jaechang-hits/SciAgent-Skills
Programmatic PubMed access via NCBI E-utilities REST API. An agent skill from jaechang-hits/SciAgent-Skills.
affaan-m/ECC
Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.
maziyarpanahi/openmed
Searches and fetches PubMed and PMC via NCBI E-utilities (ESearch then EFetch/ESummary) to gather biomedical evidence and build text corpora.
Aperivue/medsci-skills
A skill your agent uses when finding papers or building a reference list.
google-deepmind/science-skills
Retrieve and analyze AlphaFold predicted structures for a protein.
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.
google-deepmind/science-skills
Query the ChEMBL database for bioactive molecules, drug targets, bioactivity data, approved drugs, and chemical structures.
google-deepmind/science-skills
Query ClinicalTrials.gov via APIv2. An agent skill from google-deepmind/science-skills.
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…
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.
Categories
Retrieve protein and nucleotide sequences from NCBI databases using E-utilities. Ncbi Sequence Fetch is an agent skill from google-deepmind/science-skills. Retrieve protein and nucleotide sequences from NCBI databases using E-utilities.
Ncbi Sequence Fetch fits situations like: you need to fetch biological sequences by accession; tasks that involve Academic paper search; tasks that involve Intellectual property.
Run `npx skills add google-deepmind/science-skills --skill ncbi-sequence-fetch -a claude-code`. Or copy the skill folder (skills/ncbi_sequence_fetch in google-deepmind/science-skills) into .claude/skills/ncbi-sequence-fetch in your project. Claude Code loads it when a task matches its description.
Run `npx skills add google-deepmind/science-skills --skill ncbi-sequence-fetch -a codex`. Or copy the skill folder (skills/ncbi_sequence_fetch in google-deepmind/science-skills) into .agents/skills/ncbi-sequence-fetch in your project. Codex loads it when a task matches its description.
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 ncbi-sequence-fetch -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ncbi-sequence-fetch, .gemini/skills/ncbi-sequence-fetch, .github/skills/ncbi-sequence-fetch and .opencode/skills/ncbi-sequence-fetch in your project.
Going by SKILL.md and its folder, Ncbi Sequence Fetch needs Python for the scripts in its folder, the command-line tools its instructions call (uv) and credentials named NCBI_API_KEY. Our summary lists: Python 3; A credential in NCBI_API_KEY.
SKILL.md names 1 domain. As links in the text: ncbi.nlm.nih.gov. This is read from the text; nothing was executed.
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.
Ncbi Sequence Fetch 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.
About 2.3k tokens (SKILL.md is roughly 9k 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 453 tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Ncbi Sequence Fetch: PubMed REST API Search (davila7/claude-code-templates, 32k stars), Journal Skills (aipoch/medical-research-skills, 2k stars), Pubmed Database (jaechang-hits/SciAgent-Skills, 370 stars) and Scientific DB Pubmed Database (affaan-m/ECC, 274k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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.