Skip to content

Guide · Agent skill

How to use the Ontology Term Resolution agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The ontology-term-resolution skill is a set of Python scripts and instructions that teaches an AI agent to find real ontology term IDs for scientific labels, and to check that IDs it is given exist, are current and carry the expected label. It is aimed at researchers preparing metadata for submissions, curators auditing spreadsheets of term IDs, and engineers writing validation checks. After this guide you will know what the skill does, how to install it, how to phrase requests so it triggers, and what it needs to run.

Ontology Term ResolutionK-Dense-AI/scientific-agent-skills · MIT

Quick start

  1. 1Download and unzip the skill. Download the ZIP from the page and unzip it into ~/.claude/skills/ for personal use or the project's .claude/skills/ folder for one project. In the Claude apps, upload it under Settings → Capabilities → Skills instead.
  2. 2Confirm Python and network access. Check that Python 3.11 or newer is installed and that the machine can reach ebi.ac.uk, bioregistry.io and resolver.api.identifiers.org. No API key or extra packages are needed.
  3. 3Ask for a term or an ID check. Describe the label or identifier in plain language, naming the ontology if you know it, for example UBERON for tissues or CL for cell types.
  4. 4Review the match type. Read the match_type and candidate list. Treat exact matches as lexical agreement only and check the definition and context before accepting.
  5. 5Validate every selected ID. Run the validator on the chosen IDs to confirm they exist, are current and carry the expected label, and that they belong to the expected ontology.
  6. 6Check prefixes when format is in doubt. Use the prefix lookup to confirm the preferred prefix and identifier pattern before writing identifiers into a submission.

What an agent skill is and what this one makes the agent do

An agent skill is a folder containing a SKILL.md instruction file plus optional scripts and reference notes. When a request matches the skill's description, the agent reads these instructions and uses the bundled scripts instead of relying only on its own memory.

This skill targets one specific failure: an agent writing an ontology ID from memory. The skill's rule is never to write an ID from memory and never to accept one without checking it. For a label such as a tissue or cell type, the agent searches the EBI Ontology Lookup Service (OLS4), then validates the chosen ID for existence, currency and label, and checks the definition against the sample and target schema before accepting it.

  • Resolves free-text labels to candidate term IDs (resolve_terms.py)
  • Validates existing IDs for not_found, obsolete, label_mismatch and wrong_ontology problems (validate_terms.py)
  • Checks prefixes and identifier patterns via Bioregistry (lookup_prefix.py)
  • Maps lab shorthand such as PBMC through ZOOMA, always followed by an OLS check (map_terms.py)

Install the skill by ZIP or in the Claude apps

Download the ZIP for this skill from the page you are reading. For a personal install, unzip it into ~/.claude/skills/ so the folder sits at ~/.claude/skills/ontology-term-resolution. For a single project, unzip it into that project's .claude/skills/ folder.

If you use the Claude apps instead, open Settings, go to Capabilities, and upload the skill under Skills.

  • Personal install: ~/.claude/skills/
  • Project install: the project's .claude/skills/ folder
  • Claude apps: Settings → Capabilities → Skills

Check the requirements before running it

The scripts use only the Python standard library, so there are no packages to install. They need Python 3.11 or newer and network access to ebi.ac.uk (OLS4 and ZOOMA), bioregistry.io and resolver.api.identifiers.org. No API key is required.

Because the lookups are live internet calls, the skill will not work on a machine without network access.

  • Python 3.11 or newer
  • Network access to ebi.ac.uk, bioregistry.io and resolver.api.identifiers.org
  • No API key and no third-party Python packages

Trigger the skill with natural requests

You do not need to name the skill. The agent is directed to use it when you ask for an ontology term or ID, mention a CURIE or controlled vocabulary, name an ontology such as UBERON, CL, MONDO, HPO, EFO, ChEBI or NCBITaxon, or ask to annotate a tissue, cell type or disease. Naming a repository such as GEO, ENA, BioSamples, CELLxGENE, HCA or ISA-Tab also fits the skill's scope.

Be specific about the direction: say whether you want an ID found for a label, or an existing ID checked.

  • "Find the UBERON term for left ventricle."
  • "Check whether EFO:0001067 is still current and correctly labelled."
  • "Annotate this tissue column with ontology IDs for a GEO submission."
  • "Is HPO a valid prefix, or should I use HP?"
  • "Audit this metadata.tsv for obsolete or mislabelled term IDs."

Resolve a label to a term ID

Run the resolver from the skill's scripts folder, constraining the search to the ontology that should define the term. The output lists the match type and whether the hit comes from its defining ontology. Read the match_type before using a result: exact_label and exact_synonym only show lexical agreement, not correct sample context.

For a column of names, use --exact-only so that anything without an exact hit is reported rather than guessed.

  • Unresolved output is a legitimate result, not a failure.
  • Searches return bounded candidate lists (--top), not exhaustive ambiguity checks.
  • Fuzzy matches such as partial, related or broad synonyms require manual curation.
cd skills/ontology-term-resolution/scripts python3 resolve_terms.py "liver" --ontology uberon python3 resolve_terms.py --input tissues.txt --ontology uberon --exact-only --format tsv -o resolved.tsv

Validate IDs and use it as a CI gate

The validator checks each ID and reports a status such as ok, obsolete, not_found, label_mismatch or wrong_ontology, with a replacement ID when OLS gives one. Its exit code is 1 if anything failed, 0 otherwise, and 2 on usage or network trouble, so it can gate a metadata file in continuous integration.

Use --strict to turn warnings into failures, --expect-ontology to stop a term from another ontology entering a column, and --branch to require descendants of a root term.

  • ok: exists, is current and is consistent with what is asserted
  • warn statuses: matched_synonym, imported_only, not_a_class
  • fail statuses: not_found, obsolete, label_mismatch, wrong_ontology, wrong_branch, malformed_curie
  • not_found means absent from this OLS lookup, not proof that the term does not exist anywhere
python3 validate_terms.py UBERON:0002107 EFO:0001067 UBERON:9999999 python3 validate_terms.py --input metadata.tsv --strict python3 validate_terms.py --input tissue_ids.tsv --branch UBERON:0000465 --expect-ontology uberon

Check prefixes and identifier patterns

Use the prefix lookup to confirm whether a prefix is real, whether a local ID matches the recorded pattern, and what the preferred prefix is. Bioregistry accepts synonym prefixes, so HPO maps to the preferred prefix HP. Prefix lookup answers only identifier questions; it does not tell you whether a term exists or is obsolete.

python3 lookup_prefix.py HP HPO HP:0001250 HPO:0001250

Safety notes: scripts and network calls

This skill runs Python scripts and makes live network requests to public services: EBI OLS4 and ZOOMA, Bioregistry, and Identifiers.org. The skill declares allowed tools as Read, Write, Edit and Bash, so review the scripts before you run them in a sensitive environment. The skill does not need an API key, and its source describes the requests as unauthenticated public reads.

Your input values, such as label text or identifiers from your files, are sent to these services as query strings. If your labels are confidential, check that this is acceptable before running the skill on them.

  • Scripts run locally under Python 3.11+ and use only the standard library
  • Network calls go to public endpoints and send your query text to them
  • Failures from OLS are reported as service errors, not as empty scientific results

What people use it for

  • Annotating tissue, cell type, disease or phenotype columns before submitting to GEO, ENA or BioSamples
  • Auditing an existing metadata table for obsolete IDs and replacement terms
  • Checking whether a sample field holds only UBERON anatomical entities
  • Adding a CI check that rejects malformed or wrong-ontology CURIEs in a data pipeline
  • Deciding between HPO and HP when a prefix is written in more than one form

Frequently asked questions

How do I install the ontology term resolution skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for a personal install, or into a project's .claude/skills/ folder for one project. In the Claude apps, you can instead upload it under Settings → Capabilities → Skills.

What does the ontology-term-resolution skill require to run?

It requires Python 3.11 or newer and network access to ebi.ac.uk, bioregistry.io and resolver.api.identifiers.org. It needs no API key and no third-party Python packages, because the scripts use only the standard library.

Is the ontology-term-resolution skill free and what is its licence?

The skill is listed under the MIT licence. The source does not state pricing, and the OLS, Bioregistry, Identifiers.org and ZOOMA services are described as public and requiring no API key.

Can the skill work offline?

No. OLS, Bioregistry, Identifiers.org and ZOOMA lookups all require live internet calls, so environments without network access are not suitable.

Why does the skill say an exact match is not enough?

An exact label match shows lexical agreement but not correct sample context. A valid ID can still be the wrong term, for example UBERON:0002108 is small intestine rather than liver, so a curator must confirm the term fits the sample.

What is the difference between HPO and HP?

HP is the preferred prefix for the Human Phenotype Ontology. Bioregistry accepts HPO as a synonym prefix, and the prefix lookup script maps it to HP, so the skill can tell you the canonical form.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits researchers preparing submissions, curators auditing ID spreadsheets and engineers building validation checks, provided they have network access and a curator who confirms context for each term. It is not a substitute for scientific judgement about whether a term fits a sample, and it is the wrong tool for offline environments.

Download the skill