ontology-term-resolution
Helps your agent find and validate scientific term identifiers. It's useful for ensuring accuracy and consistency when annotating biological data.
What it does
This tool helps find and verify scientific term identifiers. It converts descriptive names into unique codes (IDs) and confirms if existing codes are valid and current.
When to use it
- ✓When annotating data with scientific terms.
- ✓When filling out data submission forms.
- ✓When checking the validity of codes in old files.
Example of what to ask your AI
“Find the ID for 'left ventricle' in the UBERON ontology.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool searches scientific databases for terms you describe or verifies codes you provide. It uses services like OLS and Bioregistry to ensure identifiers are correct and up-to-date.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add K-Dense-AI/scientific-agent-skills --skill ontology-term-resolutionOr download just the file:
curl -L https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/main/skills/ontology-term-resolution/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Ontology Term Resolution
When to use
Any time an ontology identifier is about to be written down or trusted: annotating a metadata column, filling a submission template, auditing a table someone else produced, or checking whether an ID in an old file is still current.
The rule
Never write an ontology ID from memory, and never accept one without checking it.
Ontology IDs are memorable in form and arbitrary in detail. A plausible-looking UBERON:0002108
is a real term (small intestine) that is not the liver, and nothing downstream will catch the
substitution — the ID is well-formed, the ontology is right, and the metadata is silently wrong.
Reviewers cannot spot it either, which is why these errors persist into published datasets.
OLS search and ZOOMA emit candidates. Validate each selected ID with OLS term detail, then check its definition against the sample and the target schema before accepting it. Bioregistry, Identifiers.org, ZOOMA, and Ontobee answer prefix, landing-page, and shorthand questions — they do not replace that OLS check.
Which service
| Question | Script | Authority |
|---|---|---|
| What is the term for "left ventricle"? | scripts/resolve_terms.py |
OLS |
OLS missed lab shorthand (PBMC, WT) |
scripts/map_terms.py, then validate_terms.py |
ZOOMA proposes; OLS validates the term |
Is EFO:0001067 real, current, correctly labelled? |
scripts/validate_terms.py |
OLS |
Is HPO a real prefix? Does HP:notanid match the pattern? |
scripts/lookup_prefix.py |
Bioregistry |
| Which landing page should this CURIE open? | scripts/lookup_prefix.py |
Identifiers.org + Ontobee URLs |
All four scripts take single values or files, emit TSV or JSON, and need no packages beyond the
standard library. Full traps for the non-OLS services are in references/companion-apis.md.
Resolve text to terms
cd skills/ontology-term-resolution/scripts
# one string, constrained to the ontology that should define it
python3 resolve_terms.py "liver" --ontology uberon
query rank curie iri label ontology match_type strategy defining_ontology
liver 1 UBERON:0002107 http://purl.obolibrary.org/obo/UBERON_0002107 liver uberon exact_label exact true
# a column of tissue names; anything not an exact hit is reported, not guessed
python3 resolve_terms.py --input tissues.txt --ontology uberon \
--exact-only --format tsv -o resolved.tsv
# accept fuzzy fallbacks, then review the partial hits by hand
python3 resolve_terms.py "left ventrical of heart" --ontology uberon --top 3
The search escalates exact (label and synonym) → token → fulltext and stops at the first
strategy that returns candidates, reporting which one fired. --exact-only disables the ladder
and locally rejects partial, related, broad, narrow, and unscoped synonym matches. Searches
are bounded candidate lists (--top), not exhaustive ambiguity checks.
--branch UBERON:0000465 uses OLS hierarchical ancestry, including part-of/develops-from.
Read match_type before using a result. exact_label and exact_synonym establish lexical
agreement (the latter also requires an exact synonym annotation), not correct sample context.
related_synonym, broad_synonym, narrow_synonym, unspecified_synonym, and partial require
curation. Validate every selected ID; search does not expose obsolescence in its records.
unresolved is a legitimate output. See references/curation-rules.md before normalising input.
Validate existing IDs
python3 validate_terms.py UBERON:0002107 EFO:0001067 UBERON:9999999
id status actual_label ontology replacement detail
UBERON:0002107 ok liver uberon
EFO:0001067 obsolete obsolete_parasitic infection efo MONDO:0005135 obsolete; replaced by MONDO:0005135
UBERON:9999999 not_found no such term in the ontology this prefix names
Exit code is 1 if anything failed, 0 otherwise, 2 on usage or network trouble — so it works as a CI gate on a metadata file:
# id + label columns; catches IDs that exist but are labelled as something else
python3 validate_terms.py --input metadata.tsv --strict
# a tissue column must hold UBERON anatomical entities and nothing else
…
FAQ
What is an 'ontology ID'?
It is a unique, standardized code that represents a specific scientific concept, such as a cell type, disease, or body part.
Why is it important to check IDs?
Incorrect or outdated IDs can lead to errors in data analysis, making it difficult to understand and reproduce scientific results.
What does 'obsolete' mean for an ID?
It means the ID is no longer in use and has been replaced by a new one. The tool can suggest the replacement ID.
Details
Original description by the author
Resolves free-text scientific labels to ontology term IDs and validates existing CURIEs against the EBI Ontology Lookup Service (OLS4). Also looks up prefixes in Bioregistry, resolves compact identifiers via Identifiers.org, maps lab shorthand with ZOOMA, and builds Ontobee term pages. Use whenever an ontology identifier must be produced or checked - annotating tissue, cell type, disease, phenotyp
Popularity
- GitHub stars
- 51k
- Ranking position
- #1919
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
13c-metabolic-flux
Estimates metabolic fluxes using carbon-13 isotope tracing data. It is useful for analyzing cellular metabolism and biochemical pathways.
K-Dense-AI/scientific-agent-skills
adaptyv
Designs protein characterization experiments using the Adaptyv API. It helps estimate costs, submit sequences, and monitor lab results.
K-Dense-AI/scientific-agent-skills
aeon
Performs machine learning tasks on time series data. It is useful for classifying, forecasting, detecting anomalies, and finding patterns in sequential data.
K-Dense-AI/scientific-agent-skills
alphagenome
Looks up precomputed genomic effects for genetic variants. It provides scores and explanations to understand the impact of variants on the genome.
K-Dense-AI/scientific-agent-skills
Similar skills
architecture-decision-records
Has your agent record important project structure decisions. It helps to understand the reasoning behind choices and maintain a clear history of changes.
affaan-m/ECC
code-tour
Lets your agent create step-by-step code walkthroughs with exact file and line anchors. It's useful for project introductions, code explanations, or change reviews. Helps understand how a system works.
affaan-m/ECC
codebase-onboarding
Helps your agent analyze unfamiliar code and create an onboarding guide. It includes an architecture map, entry points, and conventions. Ideal for starting on a new project.
affaan-m/ECC