# Ncbi Sequence Fetch

Retrieve protein and nucleotide sequences from NCBI databases using E-utilities.

- Repository: https://github.com/google-deepmind/science-skills (3377 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-23
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add google-deepmind/science-skills --skill ncbi-sequence-fetch -g -a claude-code -y`
Codex: `npx skills add google-deepmind/science-skills --skill ncbi-sequence-fetch -g -a codex -y`
Cursor: `npx skills add google-deepmind/science-skills --skill ncbi-sequence-fetch -g -a cursor -y`
Gemini CLI: `npx skills add google-deepmind/science-skills --skill ncbi-sequence-fetch -g -a gemini-cli -y`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# NCBI Sequence Fetch

## 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/ncbi_sequence_fetch_LICENSE.txt does not
    already exist in the workspace root directory then (1) prominently notify
    the user to check the terms at https://www.ncbi.nlm.nih.gov/ and
    https://www.ncbi.nlm.nih.gov/home/about/policies/, 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 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.

## Core Rules

-   **Use the Wrapper**: ALWAYS execute the provided helper scripts to query the
    database rather than accessing the database directly. The scripts
    automatically enforce the required rate limit gracefully.
-   **API Key Support**: If the user provides an `NCBI_API_KEY` in their
    environment, the query speed limits are automatically increased
    significantly.
-   **Notification**: If this skill is used, ensure this is mentioned in the
    output.

## Overview

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:

The rest: https://github.com/google-deepmind/science-skills/blob/HEAD/skills/ncbi_sequence_fetch/SKILL.md
