Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Access genomes, genes, and taxonomy data via NCBI Datasets v2 API
.claude/skills/brycewang-stanford-ncbi-datasets-api/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 55% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 28% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 79% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 21% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 80% | 0% |
NCBI Datasets is the modern API for accessing NCBI's genomic, gene, and taxonomic data — replacing older E-utilities for sequence data retrieval. It provides clean REST endpoints for genome assemblies, gene records, taxonomy trees, and sequence downloads. Covers all organisms in NCBI's databases including RefSeq and GenBank. Free, no authentication required.
https://api.ncbi.nlm.nih.gov/datasets/v2bash# Search genome assemblies by organism curl "https://api.ncbi.nlm.nih.gov/datasets/v2/genome/taxon/9606?page_size=5" # Get assembly by accession curl "https://api.ncbi.nlm.nih.gov/datasets/v2/genome/accession/GCF_000001405.40" # Download genome package curl -o genome.zip \ "https://api.ncbi.nlm.nih.gov/datasets/v2/genome/accession/GCF_000001405.40/download?\ include_annotation_type=GENOME_FASTA,GENOME_GFF"
bash# Search genes by symbol curl "https://api.ncbi.nlm.nih.gov/datasets/v2/gene/symbol/TP53/taxon/human" # Get gene by NCBI Gene ID curl "https://api.ncbi.nlm.nih.gov/datasets/v2/gene/id/7157" # Search genes by keyword curl "https://api.ncbi.nlm.nih.gov/datasets/v2/gene/search?query=BRCA&taxon=9606&page_size=20" # Download gene data package curl -o gene.zip \ "https://api.ncbi.nlm.nih.gov/datasets/v2/gene/id/7157/download?include_annotation_type=FASTA_GENE"
bash# Get taxonomy info curl "https://api.ncbi.nlm.nih.gov/datasets/v2/taxonomy/taxon/9606" # Search taxonomy by name curl "https://api.ncbi.nlm.nih.gov/datasets/v2/taxonomy/name_report?taxon_query=Homo+sapiens" # Get taxonomy tree (subtree) curl "https://api.ncbi.nlm.nih.gov/datasets/v2/taxonomy/taxon/9443/subtree"
| Parameter | Description | Example | |-----------|-------------|---------| | page_size | Results per page | page_size=20 | | page_token | Pagination token | From previous response | | include_annotation_type | Download content | GENOME_FASTA, GENOME_GFF, PROT_FASTA | | filters.assembly_level | Assembly quality | complete_genome, chromosome | | filters.refseq_only | RefSeq assemblies | true |
json{ "genes": [ { "gene": { "gene_id": 7157, "symbol": "TP53", "description": "tumor protein p53", "taxname": "Homo sapiens", "tax_id": 9606, "type": "PROTEIN_CODING", "chromosomes": ["17"], "genomic_ranges": [ { "accession_version": "NC_000017.11", "range": [{"begin": 7668402, "end": 7687550, "orientation": "minus"}] } ], "nomenclature": { "symbol": "TP53", "name": "tumor protein p53" }, "annotations": [ {"release_date": "2024-03-15", "release_name": "GRCh38.p14"} ] } } ] }
pythonimport requests import zipfile import io BASE_URL = "https://api.ncbi.nlm.nih.gov/datasets/v2" def search_genes(query: str, taxon: str = "human", page_size: int = 20) -> list: """Search NCBI genes by keyword.""" resp = requests.get( f"{BASE_URL}/gene/search", params={"query": query, "taxon": taxon, "page_size": page_size}, ) resp.raise_for_status() data = resp.json() results = [] for item in data.get("genes", []): gene = item.get("gene", {}) results.append({ "gene_id": gene.get("gene_id"), "symbol": gene.get("symbol"), "description": gene.get("description"), "type": gene.get("type"), "chromosomes": gene.get("chromosomes", []), "taxname": gene.get("taxname"), }) return results def get_gene(gene_id: int) -> dict: """Get detailed gene information.""" resp = requests.get(f"{BASE_URL}/gene/id/{gene_id}") resp.raise_for_status() genes = resp.json().get("genes", []) return genes[0].get("gene", {}) if genes else {} def search_genomes(taxon: str, refseq_only: bool = True, page_size: int = 10) -> list: """Search genome assemblies by organism.""" params = {"page_size": page_size} if refseq_only: params["filters.refseq_only"] = "true" resp = requests.get( f"{BASE_URL}/genome/taxon/{taxon}", params=params, ) resp.raise_for_status() data = resp.json() results = [] for report in data.get("reports", []): assembly = report.get("assembly_info", {}) stats = report.get("assembly_stats", {}) results.append({ "accession": report.get("accession"), "name": assembly.get("assembly_name"), "level": assembly.get("assembly_level"), "organism": report.get("organism", {}).get("organism_name"), "total_length": stats.get("total_sequence_length"), "contig_n50": stats.get("contig_n50"), }) return results # Example: search cancer-related genes genes = search_genes("tumor suppressor", taxon="human") for g in genes[:5]: print(f"{g['symbol']} (ID: {g['gene_id']}): {g['description']}") print(f" Type: {g['type']} | Chr: {', '.join(g['chromosomes'])}") # Example: find reference genomes genomes = search_genomes("Mus musculus", refseq_only=True) for g in genomes[:3]: print(f"{g['accession']}: {g['name']} ({g['level']})") print(f" Length: {g['total_length']:,} bp")
NCBI also provides a command-line tool:
bash# Install curl -o datasets "https://ftp.ncbi.nlm.nih.gov/pub/datasets/command-line/v2/linux-amd64/datasets" chmod +x datasets # Download human genome ./datasets download genome taxon "Homo sapiens" --reference --include genome # Download gene data ./datasets download gene gene-id 7157 --include gene
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 13,891 | 21,624 | +56% | 1 | 1 | 0% | 2,858 | 4,424 | +55% | 0 | 0 | — |
case-02 | fail→pass | 12,648 | 6,780 | -46% | 1 | 1 | 0% | 2,664 | 3,420 | +28% | 0 | 0 | — |
case-03 | pass→pass | 11,116 | 4,593 | -59% | 1 | 1 | 0% | 1,798 | 3,003 | +67% | 0 | 0 | — |
case-04 | pass→pass | 7,703 | 6,503 | -16% | 1 | 1 | 0% | 1,396 | 2,606 | +87% | 0 | 0 | — |
case-05 | fail→pass | 7,582 | 3,466 | -54% | 1 | 1 | 0% | 1,455 | 2,606 | +79% | 0 | 0 | — |
case-06 | pass→pass | 8,513 | 2,979 | -65% | 1 | 1 | 0% | 1,548 | 2,575 | +66% | 0 | 0 | — |
case-07 | pass→pass | 4,597 | 2,106 | -54% | 1 | 1 | 0% | 817 | 2,345 | +187% | 0 | 0 | — |
case-08 | fail→pass | 10,758 | 2,131 | -80% | 1 | 1 | 0% | 1,958 | 2,361 | +21% | 0 | 0 | — |
case-09 | fail→pass | 7,426 | 2,452 | -67% | 1 | 1 | 0% | 1,366 | 2,462 | +80% | 0 | 0 | — |
case-10 | fail→pass | 9,955 | 3,713 | -63% | 1 | 1 | 0% | 1,916 | 2,683 | +40% | 0 | 0 | — |
case-11 | fail→pass | 7,742 | 3,159 | -59% | 1 | 1 | 0% | 1,304 | 2,494 | +91% | 0 | 0 | — |
case-12 | pass→pass | 8,435 | 4,919 | -42% | 1 | 1 | 0% | 1,393 | 3,018 | +117% | 0 | 0 | — |
case-13 | pass→pass | 9,127 | 3,523 | -61% | 1 | 1 | 0% | 1,679 | 2,686 | +60% | 0 | 0 | — |
case-14 | fail→pass | 17,220 | 7,762 | -55% | 1 | 1 | 0% | 3,219 | 3,696 | +15% | 0 | 0 | — |
case-19 | pass→pass | 11,435 | 2,299 | -80% | 1 | 1 | 0% | 719 | 2,383 | +231% | 0 | 0 | — |
case-15 | fail→pass | 12,631 | 5,703 | -55% | 1 | 1 | 0% | 2,258 | 3,048 | +35% | 0 | 0 | — |
case-16 | pass→pass | 6,909 | 3,829 | -45% | 1 | 1 | 0% | 1,155 | 2,559 | +122% | 0 | 0 | — |
case-17 | fail→pass | 3,721 | 2,587 | -30% | 1 | 1 | 0% | 574 | 2,438 | +325% | 0 | 0 | — |
case-18 | pass→pass | 6,335 | 3,363 | -47% | 1 | 1 | 0% | 1,139 | 2,596 | +128% | 0 | 0 | — |
case-20 | pass→pass | 7,018 | 4,462 | -36% | 1 | 1 | 0% | 1,179 | 2,824 | +140% | 0 | 0 | — |
case-21 | pass→pass | 5,562 | 2,753 | -51% | 1 | 1 | 0% | 1,051 | 2,445 | +133% | 0 | 0 | — |
case-22 | pass→pass | 6,166 | 2,545 | -59% | 1 | 1 | 0% | 1,128 | 2,465 | +119% | 0 | 0 | — |
case-23 | pass→pass | 8,237 | 6,795 | -18% | 1 | 1 | 0% | 1,561 | 3,385 | +117% | 0 | 0 | — |
case-24 | pass→pass | 14,238 | 14,847 | +4% | 1 | 1 | 0% | 2,605 | 4,971 | +91% | 0 | 0 | — |
case-25 | fail→pass | 6,857 | 5,995 | -13% | 1 | 1 | 0% | 1,320 | 3,075 | +133% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +44 percentage points is the difference between those two pass rates over the 25 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.