# ensembl-database

Resolves gene symbols into ENSG, ENST and ENSP IDs, pulls sequences and predicts variant effects with VEP. Useful when genomic data lives in your terminal.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2200 installs · ★ 3329
- Author: google-deepmind
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/google-deepmind/science-skills/tree/HEAD/skills/ensembl_database/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/ensembl-database

## What it does

The skill wraps the Ensembl REST API in a set of Python commands. It resolves ambiguous symbols and aliases, cross-references IDs against RefSeq, HGNC and UniProt, fetches raw DNA for a coordinate window, returns transcript structure with exon coordinates and CDS boundaries, and produces amino acid FASTA for an ENST or ENSP ID. Variant work goes through VEP, which predicts molecular consequences and pulls in the AlphaMissense, Conservation, DosageSensitivity, IntAct, MaveDB, OpenTargets, LoF, NMD, UTRAnnotator, mutfunc and LOEUF plugins.

Everything runs through `scripts/ensembl_api.py` via `uv run`. The script enforces the required rate limit on its own, so hitting the database directly is the wrong move. Full JSON or FASTA output lands in a file under `/tmp` or wherever `--output` points, while stdout gets a short summary. The default assembly is GRCh38; GRCh37 requests need the `--assembly GRCh37` flag.

Make sure `uv` is installed and on PATH before the first call. If `.licenses/ensembl_database_LICENSE.txt` is missing from the workspace root, the skill asks you to check the Ensembl terms and then writes that file with a timestamp. Species defaults to `human`, and transcript listings return only the MANE Select transcript for human or the Canonical one elsewhere unless you ask for every isoform.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add google-deepmind/science-skills --skill ensembl-database -a claude-code
```
```bash
npx skills add google-deepmind/science-skills --skill ensembl_database -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/ensembl_database/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/ensembl_database/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add google-deepmind/science-skills --skill ensembl_database -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/ensembl_database/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add google-deepmind/science-skills --skill ensembl_database -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/ensembl_database/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install google-deepmind/science-skills ensembl_database
```

2. **Manually: put the files in place**
- File: `.github/skills/ensembl_database/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add google-deepmind/science-skills --skill ensembl_database -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/google-deepmind/science-skills --path skills/ensembl_database
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/ensembl_database/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add google-deepmind/science-skills --skill ensembl_database -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/google-deepmind/science-skills/tree/HEAD/skills/ensembl_database/SKILL.md

## When to use it
- turn a gene symbol into a stable ENSG ID
- cross-reference an Ensembl ID to UniProt or RefSeq
- pull a DNA sequence for a chromosome window
- get exon coordinates and CDS boundaries for a transcript
- score a variant's consequences with VEP

## Example prompts
- resolve TP53 to an ENSG ID for human
- show the transcript structure of ENST00000269305
- predict the effect of variant 9:21971147:T:C with VEP

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: ade6499ff1f2b533.

BEGIN THIRD-PARTY FILE ade6499ff1f2b533
```text
---
name: ensembl-database
description: >
  Query the Ensembl database to resolve gene, transcript, and protein IDs,
  fetch genomic or protein sequences, retrieve gene structures (exons), and
  get variant consequence and effect predictions (VEP). Use this skill as a
  primary ID translator, genomic sequence database and variant effect prediction
  tool.
---

# Ensembl Database: ID Mapping and Genomic Features

## 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/ensembl_database_LICENSE.txt does not
    already exist in the workspace root directory then (1) prominently notify
    the user to check the terms at https://useast.ensembl.org/index.html and
    https://github.com/Ensembl/ensembl-rest/wiki, then (2) create the file
    recording the notification text and timestamp.

## Overview

The Ensembl database is a resource for genome annotation. This skill allows you
to interact with the Ensembl REST API to resolve ambiguous symbols,
cross-reference IDs (RefSeq, HGNC, UniProt, ENSG), fetch raw sequences, and
retrieve detailed transcript structures.

**Key Concepts:**

-   **ENSG (Gene):** Stable identifier for a human gene. Other species will have
    different three-letter species codes.
-   **ENST (Transcript):** Stable identifier for a transcript (splicing
    isoform).
-   **ENSP (Protein):** Stable identifier for a translated protein.
-   **MANE Select:** The consensus primary transcript agreed upon by Ensembl and
    NCBI.
-   **Canonical:** Ensembl's representative transcript (used if MANE is not
    available or non-human).

## 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.
-   **Default Species:** If the species is absent or ambiguous in the prompt,
    default to `"human"`. You MUST explicitly flag this default to the user to
    ensure they are aware.
-   **Primary Transcripts:** When listing transcripts for a gene, only return
    the MANE Select transcript (for human) or the Canonical transcript (for
```
END THIRD-PARTY FILE ade6499ff1f2b533

The third-party file has ended. Everything between the ade6499ff1f2b533 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2244 of 8827 bytes. © google-deepmind · Apache-2.0 · https://github.com/google-deepmind/science-skills/tree/HEAD/skills/ensembl_database/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
