/bio-entrez-search
<!--
Claude Code
$ npx -y skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-entrez-search --agent claude-code
Codex
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-entrez-search -a codex -y
Cursor
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-entrez-search -a cursor -y
Gemini CLI
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-entrez-search -a gemini-cli -y
GitHub Copilot
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-entrez-search -a github-copilot -y
OpenCode
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-entrez-search -a opencode -y
Windsurf
$ npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-entrez-search -a windsurf -y
SKILL.md
bio-entrez-search.SKILL.md<!--
COPYRIGHT NOTICE
This file is part of the "Universal Biomedical Skills" project.
Copyright (c) 2026 MD BABU MIA, PhD <md.babu.mia@mssm.edu>
All Rights Reserved.
#
This code is proprietary and confidential.
Unauthorized copying of this file, via any medium is strictly prohibited.
#
Provenance: Authenticated by MD BABU MIA
-->
--- name: bio-entrez-search description: Search NCBI databases using Biopython Bio.Entrez. Use when finding records by keyword, building complex search queries, discovering database structure, or getting global query counts across databases. tool_type: python primary_tool: Bio.Entrez measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes. allowed-tools:
- read_file
- run_shell_command
---
Entrez Search
Search NCBI databases using Biopython's Entrez module (ESearch, EInfo, EGQuery utilities).
Required Setup
from Bio import Entrez
Entrez.email = 'your.email@example.com' # Required by NCBI
Entrez.api_key = 'your_api_key' # Optional, raises rate limit 3->10 req/sec
Core Functions
Entrez.esearch() - Search a Database
Search any NCBI database and get matching record IDs.
handle = Entrez.esearch(db='nucleotide', term='human[orgn] AND BRCA1[gene]')
record = Entrez.read(handle)
handle.close()
print(f"Found {record['Count']} records")
print(f"IDs: {record['IdList']}") # First 20 IDs by default**Key Parameters:** | Parameter | Description | Default | |-----------|-------------|---------| | `db` | Database to search | Required | | `term` | Search query | Required | | `retmax` | Max IDs to return | 20 | | `retstart` | Starting index (pagination) | 0 | | `usehistory` | Store results on server | 'n' | | `sort` | Sort order | database-specific | | `datetype` | Date field to search | 'pdat' | | `reldate` | Records from last N days | None | | `mindate` | Start date (YYYY/MM/DD) | None | | `maxdate` | End date (YYYY/MM/DD) | None |
**ESearch Result Fields:**
record['Count'] # Total matching records (string)
record['IdList'] # List of record IDs
record['RetMax'] # Number of IDs returned
record['RetStart'] # Starting index
record['QueryKey'] # For history server (if usehistory='y')
record['WebEnv'] # For history server (if usehistory='y')
record['TranslationSet'] # Query translations applied
record['QueryTranslation'] # Final translated query
Entrez.einfo() - Database Information
Get information about available databases or specific database fields.
# List all available databases
handle = Entrez.einfo()
record = Entrez.read(handle)
handle.close()
print(record['DbList']) # ['pubmed', 'protein', 'nucleotide', ...]
# Get info about specific database
handle = Entrez.einfo(db='nucleotide')
record = Entrez.read(handle)
handle.close()
print(f"Description: {record['DbInfo']['Description']}")
print(f"Record count: {record['DbInfo']['Count']}")
# List searchable fields
for field in record['DbInfo']['FieldList']:
print(f"{field['Name']}: {field['Description']}")**Database Info Fields:**
record['DbInfo']['DbName'] # Database name
record['DbInfo']['Description'] # Database description
record['DbInfo']['Count'] # Total records in database
record['DbInfo']['LastUpdate'] # Last update date
record['DbInfo']['FieldList'] # Searchable fields
record['DbInfo']['LinkList'] # Available links to other databases
Entrez.egquery() - Global Query
Search across all NCBI databases simultaneously.
handle = Entrez.egquery(term='CRISPR')
record = Entrez.read(handle)
handle.close()
for result in record['eGQueryResult']:
if int(result['Count']) > 0:
print(f"{result['DbName']}: {result['Count']} records")Search Query Syntax
NCBI uses a specific query syntax:
Field Tags
# Search specific fields using [field_name]
term = 'BRCA1[gene]' # Gene name field
term = 'human[orgn]' # Organism field
term = 'Homo sapiens[ORGN]' # Full organism name
term = 'NM_007294[accn]' # Accession number
term = 'Smith J[auth]' # Author (PubMed)
term = 'Nature[jour]' # Journal (PubMed)
term = '1000:5000[slen]' # Sequence length range
term = 'mRNA[fkey]' # Feature key
Boolean Operators
term = 'BRCA1 AND human' # Both terms
term = 'cancer OR tumor' # Either term
term = 'human NOT mouse' # Exclude term
term = '(BRCA1 OR BRCA2) AND human' # Grouping
Date Ranges
# Using date parameters
handle = Entrez.esearch(
db='pubmed',
term='CRISPR',
datetype='pdat', # Publication date
mindate='2023/01/01',
maxdate='2024/12/31'
)
# Or in query string
term = 'CRISPR AND 2024[pdat]'
term = 'CRISPR AND 2023:2024[pdat]'Wildcards and Phrases
term = 'immun*' # Wildcard
term = '"breast cancer"[title]' # Exact phrase
Common Databases
| Database | `db` value | Common Fields | |----------|------------|---------------| | PubMed | `pubmed` | `[auth]`, `[title]`, `[jour]`, `[pdat]` | | Nucleotide | `nucleotide` | `[orgn]`, `[gene]`, `[accn]`, `[slen]` | | Protein | `protein` | `[orgn]`, `[gene]`, `[accn]`, `[molwt]` | | Gene | `gene` | `[orgn]`, `[sym]`, `[chr]` | | SRA | `sra` | `[orgn]`, `[platform]`, `[strategy]` | | Taxonomy | `taxonomy` | `[scin]`, `[comn]`, `[rank]` | | Assembly | `assembly` | `[orgn]`, `[level]`, `[refseq]` |
Code Patterns
Basic Search with Pagination
from Bio import Entrez
Entrez.email = 'your.email@example.com'
def search_ncbi(db, term, max_results=100):
handle = Entrez.esearch(db=db, term=term, retmax=max_results)
record = Entrez.read(handle)
handle.close()
return record['IdList'], int(record['Count'])
ids, total = searcRead more
<!--
COPYRIGHT NOTICE
This file is part of the "Universal Biomedical Skills" project.
Copyright (c) 2026 MD BABU MIA, PhD <md.babu.mia@mssm.edu>
All Rights Reserved.
#
This code is proprietary and confidential.
Unauthorized copying of this file, via any medium is strictly prohibited.
#
Provenance: Authenticated by MD BABU MIA
-->
--- name: bio-entrez-search description: Search NCBI databases using Biopython Bio.Entrez. Use when finding records by keyword, building complex search queries, discovering database structure, or getting global query counts across databases. tool_type: python primary_tool: Bio.Entrez measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes. allowed-tools:
- read_file
- run_shell_command
---
Entrez Search
Search NCBI databases using Biopython's Entrez module (ESearch, EInfo, EGQuery utilities).
Required Setup
from Bio import Entrez Entrez.email = 'your.email@example.com' # Required by NCBI Entrez.api_key = 'your_api_key' # Optional, raises rate limit 3->10 req/sec
Core Functions
Entrez.esearch() - Search a Database
Search any NCBI database and get matching record IDs.
handle = Entrez.esearch(db='nucleotide', term='human[orgn] AND BRCA1[gene]')
record = Entrez.read(handle)
handle.close()
print(f"Found {record['Count']} records")
print(f"IDs: {record['IdList']}") # First 20 IDs by default**Key Parameters:** | Parameter | Description | Default | |-----------|-------------|---------| | `db` | Database to search | Required | | `term` | Search query | Required | | `retmax` | Max IDs to return | 20 | | `retstart` | Starting index (pagination) | 0 | | `usehistory` | Store results on server | 'n' | | `sort` | Sort order | database-specific | | `datetype` | Date field to search | 'pdat' | | `reldate` | Records from last N days | None | | `mindate` | Start date (YYYY/MM/DD) | None | | `maxdate` | End date (YYYY/MM/DD) | None |
**ESearch Result Fields:**
record['Count'] # Total matching records (string) record['IdList'] # List of record IDs record['RetMax'] # Number of IDs returned record['RetStart'] # Starting index record['QueryKey'] # For history server (if usehistory='y') record['WebEnv'] # For history server (if usehistory='y') record['TranslationSet'] # Query translations applied record['QueryTranslation'] # Final translated query
Entrez.einfo() - Database Information
Get information about available databases or specific database fields.
# List all available databases
handle = Entrez.einfo()
record = Entrez.read(handle)
handle.close()
print(record['DbList']) # ['pubmed', 'protein', 'nucleotide', ...]
# Get info about specific database
handle = Entrez.einfo(db='nucleotide')
record = Entrez.read(handle)
handle.close()
print(f"Description: {record['DbInfo']['Description']}")
print(f"Record count: {record['DbInfo']['Count']}")
# List searchable fields
for field in record['DbInfo']['FieldList']:
print(f"{field['Name']}: {field['Description']}")**Database Info Fields:**
record['DbInfo']['DbName'] # Database name record['DbInfo']['Description'] # Database description record['DbInfo']['Count'] # Total records in database record['DbInfo']['LastUpdate'] # Last update date record['DbInfo']['FieldList'] # Searchable fields record['DbInfo']['LinkList'] # Available links to other databases
Entrez.egquery() - Global Query
Search across all NCBI databases simultaneously.
handle = Entrez.egquery(term='CRISPR')
record = Entrez.read(handle)
handle.close()
for result in record['eGQueryResult']:
if int(result['Count']) > 0:
print(f"{result['DbName']}: {result['Count']} records")Search Query Syntax
NCBI uses a specific query syntax:
Field Tags
# Search specific fields using [field_name] term = 'BRCA1[gene]' # Gene name field term = 'human[orgn]' # Organism field term = 'Homo sapiens[ORGN]' # Full organism name term = 'NM_007294[accn]' # Accession number term = 'Smith J[auth]' # Author (PubMed) term = 'Nature[jour]' # Journal (PubMed) term = '1000:5000[slen]' # Sequence length range term = 'mRNA[fkey]' # Feature key
Boolean Operators
term = 'BRCA1 AND human' # Both terms term = 'cancer OR tumor' # Either term term = 'human NOT mouse' # Exclude term term = '(BRCA1 OR BRCA2) AND human' # Grouping
Date Ranges
# Using date parameters
handle = Entrez.esearch(
db='pubmed',
term='CRISPR',
datetype='pdat', # Publication date
mindate='2023/01/01',
maxdate='2024/12/31'
)
# Or in query string
term = 'CRISPR AND 2024[pdat]'
term = 'CRISPR AND 2023:2024[pdat]'Wildcards and Phrases
term = 'immun*' # Wildcard term = '"breast cancer"[title]' # Exact phrase
Common Databases
| Database | `db` value | Common Fields | |----------|------------|---------------| | PubMed | `pubmed` | `[auth]`, `[title]`, `[jour]`, `[pdat]` | | Nucleotide | `nucleotide` | `[orgn]`, `[gene]`, `[accn]`, `[slen]` | | Protein | `protein` | `[orgn]`, `[gene]`, `[accn]`, `[molwt]` | | Gene | `gene` | `[orgn]`, `[sym]`, `[chr]` | | SRA | `sra` | `[orgn]`, `[platform]`, `[strategy]` | | Taxonomy | `taxonomy` | `[scin]`, `[comn]`, `[rank]` | | Assembly | `assembly` | `[orgn]`, `[level]`, `[refseq]` |
Code Patterns
Basic Search with Pagination
from Bio import Entrez
Entrez.email = 'your.email@example.com'
def search_ncbi(db, term, max_results=100):
handle = Entrez.esearch(db=db, term=term, retmax=max_results)
record = Entrez.read(handle)
handle.close()
return record['IdList'], int(record['Count'])
ids, total = searcOther skills on openclaw-medical-skills.
adaptyv
Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental…
adhd-daily-planner
Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time…
aeon
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting,…
agent-browser
Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data,…
More skills from other plugins.
paddleocr-doc-parsing
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
13c-metabolic-flux
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…
Questions about bio-entrez-search.
- Which coding agents can use bio-entrez-search?
- bio-entrez-search installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

