Query NCBI Gene via E-utilities/Datasets API. Search by symbol/ID, retrieve gene info (RefSeqs, GO, locations, phenotypes), batch lookups, for gene annotation and functional analysis.
78
70%
Does it follow best practices?
Impact
92%
1.39xAverage score across 3 eval scenarios
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./scientific-skills/gene-database/SKILL.mdNCBI Gene is a comprehensive database integrating gene information from diverse species. It provides nomenclature, reference sequences (RefSeqs), chromosomal maps, biological pathways, genetic variations, phenotypes, and cross-references to global genomic resources.
This skill should be used when working with gene data including searching by gene symbol or ID, retrieving gene sequences and metadata, analyzing gene functions and pathways, or performing batch gene lookups.
NCBI provides two main APIs for gene data access:
Choose E-utilities for complex queries and cross-database searches. Choose Datasets API for straightforward gene data retrieval with metadata and sequences in a single request.
To search for genes by symbol or name across organisms:
scripts/query_gene.py script with E-utilities ESearchExample query patterns:
insulin[gene name] AND human[organism]dystrophin[gene name] AND muscular dystrophy[disease]human[organism] AND 17q21[chromosome]To fetch detailed information for known Gene IDs:
scripts/fetch_gene_data.py with the Datasets API for comprehensive datascripts/query_gene.py with E-utilities EFetch for specific formatsThe Datasets API returns:
For multiple genes simultaneously:
scripts/batch_gene_lookup.py for efficient batch processingThis workflow is useful for:
To find genes associated with specific biological functions or phenotypes:
Example searches:
GO:0006915[biological process] (apoptosis)diabetes[phenotype] AND mouse[organism]insulin signaling pathway[pathway]Rate Limits:
Authentication: Register for a free NCBI API key at https://www.ncbi.nlm.nih.gov/account/ to increase rate limits.
Error Handling: Both APIs return standard HTTP status codes. Common errors include:
Retry failed requests with exponential backoff.
Query NCBI Gene using E-utilities (ESearch, ESummary, EFetch).
python scripts/query_gene.py --search "BRCA1" --organism "human"
python scripts/query_gene.py --id 672 --format json
python scripts/query_gene.py --search "insulin[gene] AND diabetes[disease]"Fetch comprehensive gene data using NCBI Datasets API.
python scripts/fetch_gene_data.py --gene-id 672
python scripts/fetch_gene_data.py --symbol BRCA1 --taxon human
python scripts/fetch_gene_data.py --symbol TP53 --taxon "Homo sapiens" --output jsonProcess multiple gene queries efficiently.
python scripts/batch_gene_lookup.py --file gene_list.txt --organism human
python scripts/batch_gene_lookup.py --ids 672,7157,5594 --output results.jsonFor detailed API documentation including endpoints, parameters, response formats, and examples, refer to:
references/api_reference.md - Comprehensive API documentation for E-utilities and Datasets APIreferences/common_workflows.md - Additional examples and use case patternsSearch these references when needing specific API endpoint details, parameter options, or response structure information.
NCBI Gene data can be retrieved in multiple formats:
Choose JSON for modern applications, XML for legacy systems requiring detailed metadata, and FASTA for sequence analysis workflows.
This skill includes:
query_gene.py - Query genes using E-utilities (ESearch, ESummary, EFetch)fetch_gene_data.py - Fetch gene data using NCBI Datasets APIbatch_gene_lookup.py - Handle multiple gene queries efficientlyapi_reference.md - Detailed API documentation for both E-utilities and Datasets APIcommon_workflows.md - Examples of common gene queries and use cases71add64
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.