ncbi-datasets-skill

Query NCBI Datasets v2 REST endpoints and return compact JSON summaries.

5.3k|765|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/openai/plugins --skill ncbi-datasets-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ncbi-datasets-skill
Source: https://github.com/openai/plugins/tree/main/plugins/life-science-research/skills/ncbi-datasets-skill
Command: npx skills add https://github.com/openai/plugins --skill ncbi-datasets-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) components.

What problem does it solve?

Querying the NCBI Datasets v2 API directly returns large, deeply nested JSON payloads that are hard to scan. This Skill submits targeted requests to assembly, genome, and taxonomy endpoints and returns compact, truncated summaries instead of raw dumps.

Core Features & Use Cases

  • Targeted REST Queries: Call any Datasets v2 path (e.g., genome/taxon/9606/dataset_report) with query params, timeouts, and record extraction via record_path.
  • Compact Output Control: Limit result size with max_items and max_depth, returning either compact records, a summary, or a text head.
  • Optional Raw Saving: Set save_raw=true to persist the full JSON or text response to disk and receive the saved file path.
  • Use Case: A researcher asks for the genome assembly reports for human (taxon 9606); the Skill fetches the dataset_report endpoint and returns the first 10 compact records for quick review.

Quick Start

Ask the assistant to fetch the NCBI Datasets genome report for taxon 9606 and summarize the first 10 records.

Frequently Asked Questions about ncbi-datasets-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query the NCBI Datasets v2 API for genome reports?

Send a JSON object with a path like genome/taxon/9606/dataset_report or genome/accession/GCF_000001405.40/dataset_report to the script via stdin. Add params such as page_size and set record_path to reports to extract the record list.

How do I get taxonomy data from NCBI Datasets?

Use the taxonomy endpoint with a path like taxonomy/taxon/9606 in the input JSON. The script returns a compact summary of the response, truncating long strings and deep structures based on max_items and max_depth.

Can I save the full raw NCBI API response to a file?

Yes, set save_raw to true in the input JSON and optionally provide raw_output_path. The full JSON or text response is written to that path (defaulting to /tmp/ncbi-datasets.json or .txt), and the output reports the saved file location.

What Python dependencies does the NCBI Datasets script require?

The script requires the requests library for HTTP calls; it returns a missing_dependency error if requests is not installed. All other functionality uses only the Python standard library.

Why does my NCBI Datasets request return an invalid_input error?

The input must be a single JSON object with a non-empty path string, and optional fields must match expected types: params as an object, max_items and timeout_sec as positive integers, save_raw as a boolean. Type mismatches trigger validation errors.