agentleFS
Scientific-ToolingScientific-Tooling/structured-intelligence/skills/search-ncbi-datasets/SKILL.md

search-ncbi-datasets

Skill4 starsChanged 12 days agoMITView on GitHub

Search NCBI Datasets for genome assemblies, genes, taxonomy records, and virus genomes using the NCBI Datasets CLI or REST API.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    NCBI Datasets REST API: use when the CLI is not installed.

    line 36
  2. Very specific:

    Not all assemblies in GenBank have annotation.

    line 76

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: Search NCBI Datasets

Use When

  • A user wants to find and download genome assemblies from the NCBI Datasets portal.
  • A user needs to query genomes by organism name, taxonomy ID, assembly accession (GCF/GCA), or assembly level (complete, chromosome, scaffold, contig).
  • A user wants gene-level data: sequences, annotations, or orthologs by gene symbol, gene ID, or taxon.
  • A user wants virus genome records (NCBI Virus) by species, collection date, host, or geographic region.
  • A user wants summary statistics (assembly count, N50, total length) for a set of assemblies before downloading.
  • A user wants to generate a dehydrated dataset package and rehydrate later, or get direct download links for genome FASTA/GFF/GTF files.

Inputs

  • Required:
    • one of: organism name or NCBI taxonomy ID, assembly accession (GCF_/GCA_), gene symbol or gene ID, or virus taxon
  • Optional:
    • data type: genome, gene, virus, taxonomy (default: genome)
    • assembly level filter: complete, chromosome, scaffold, contig
    • assembly source filter: refseq (GCF) or genbank (GCA)
    • annotation filter: annotated (only assemblies with annotation)
    • reference-only flag: restrict to reference/representative genomes
    • include flags for genome downloads: genome, rna, protein, cds, gff3, gtf, seq-report
    • limit on number of results
    • output format: json (summary) or direct download (zip package)
    • output directory

Workflow

  1. Choose the interface:
    • NCBI Datasets CLI (datasets + dataformat): preferred for batch or scripted use.
    • NCBI Datasets REST API: use when the CLI is not installed. Base URL: https://api.ncbi.nlm.nih.gov/datasets/v2/
  2. For genome assembly searches:
    • CLI: datasets summary genome taxon "<organism>" --assembly-level complete --reference
    • API: GET https://api.ncbi.nlm.nih.gov/datasets/v2/genome/taxon/<taxon>/dataset_report
    • Reformat summary with: dataformat tsv genome --fields accession,organism-name,assembly-level,genome-size,contig-n50,annotation-info-release-date
  3. For gene searches:
    • CLI: datasets summary gene symbol <GENE> --taxon "<organism>"
    • CLI: datasets summary gene id <gene_id>
  4. For virus genome searches:
    • CLI: datasets summary virus genome taxon <taxon> --host "<host>" --geo-location "<country>"
    • Filter by collection date range with --released-after / --released-before.
  5. To download data:
    • datasets download genome accession <GCF_> --include genome,gff3,gtf --filename <out>.zip
    • For large batches, use --dehydrated and then datasets rehydrate --directory <dir>.
  6. Parse the JSON summary to extract key fields and report a summary table.

Output Contract

  • Exact CLI command or API URL used
  • Number of matching records
  • Summary table for genome queries: Accession (GCF/GCA), Organism, Assembly Level, Genome Size (Mb), Contig N50, Annotation Date, Submitter
  • Summary table for gene queries: Gene ID, Symbol, Full Name, Taxon, Location, RefSeq mRNA/Protein accessions
  • Download command(s) for selected accessions
  • Saved output files when a directory is provided:
    • summary.json (raw API/CLI output)
    • summary.tsv (reformatted with dataformat)
    • accessions.txt (one accession per line)

Limits

  • This skill depends on live access to https://api.ncbi.nlm.nih.gov/datasets/v2/ or a local install of the datasets CLI.
  • NCBI Datasets API rate limits apply; add NCBI_API_KEY environment variable or --api-key flag for higher throughput.
  • The datasets CLI must be installed separately (available from https://www.ncbi.nlm.nih.gov/datasets/docs/v2/download-and-install/).
  • Genome download packages can be very large; always check genome size and count before issuing a download.
  • Not all assemblies in GenBank have annotation; use --annotated when annotation files are required.
  • Virus genome data is stored separately from the main genome database; queries must use datasets summary virus.
  • Common failure cases:
    • specifying a taxon name with incorrect spelling or outdated taxonomy
    • requesting --include gff3 for assemblies without annotation (download will still proceed but GFF3 will be absent)
    • confusing GCF (RefSeq) with GCA (GenBank) accessions when a specific source is required
    • omitting dataformat to reformat JSON output, resulting in hard-to-parse raw JSON

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.