Agent skill

Merge Terms

by monarch-initiative in monarch-initiative/mondo

A skill your agent uses when asked to merge two MONDO terms — obsoleting one and transferring its metadata to the surviving term

CC-BY-4.0Auto-check passedDevelopment

Install Merge Terms

skills CLI
$ npx skills add monarch-initiative/mondo --skill merge-terms -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install monarch-initiative/mondo merge-terms --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/monarch-initiative/mondo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/merge-terms .claude/skills/merge-terms && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
merge-terms
GitHub stars
326
Token cost
~2.9k tokens
SKILL.md length
1,124 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
CC-BY-4.0

At a glance

A skill your agent uses when asked to merge two MONDO terms — obsoleting one and transferring its metadata to the surviving term

  • Works in 9 steps: Run owltools merge → Normalize immediately → Checkout both terms → …
  • Asked to merge two MONDO terms — obsoleting one and transferring its metadata to the surviving term
  • SKILL.md covers ⚠️ Running ODK commands, Required inputs, Step 1 — Run owltools merge and Step 2 — Normalize immediately, plus 7 more sections
  • Calls make, sh and git

What it does

Merge Terms is an agent skill from monarch-initiative/mondo. Use when asked to merge two MONDO terms — obsoleting one and transferring its metadata to the surviving term

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. The repository describes itself as: Mondo Disease Ontology. The licence is CC-BY-4.0.

When your agent uses it

  • Asked to merge two MONDO terms — obsoleting one and transferring its metadata to the surviving term

Example prompts

  • “/merge-terms”

Requirements

  • Docker

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Run owltools merge
  2. Normalize immediately
  3. Checkout both terms
  4. Clean up the OBSOLETED term
  5. Clean up the SURVIVING term
  6. Rewire children of the obsoleted term
  7. Check in, normalize, run QC
  8. 5 — Self-verify
  9. Show diff and summary checklist

What it can do on your machine

Read from SKILL.md and the folder at commit 9bfccbe. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • make
    • sh
    • git
    • docker

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • mondo.readthedocs.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Merge Terms loads about 2.9k tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 1,124 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~30
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from monarch-initiative/mondo at commit 9bfccbe, republished under its CC-BY-4.0 licence (© monarch-initiative). 1,124 words, ~2,938 tokens.

Download SKILL.mdSave it as .claude/skills/merge-terms/SKILL.md (or your agent's skills folder).
name
merge-terms
description
Use when asked to merge two MONDO terms — obsoleting one and transferring its metadata to the surviving term

Merge two MONDO terms

⚠️ Running ODK commands

Every step below uses ODK tools (owltools, robot, make NORM). Read the odk skill first for how to invoke them — sh run.sh <cmd> if you have a TTY, otherwise direct docker run ... -i obolibrary/odkfull:<tag> (the tag lives in src/ontology/run.sh).

The commands below show the body (what goes after sh run.sh or after the docker prefix). Pick the wrapper based on your environment.

Required inputs

  • Term to obsolete (the duplicate / less-rich term)
  • Replacement / surviving term (the term content gets transferred to)
  • GitHub issue number (the issue requesting the merge)

If any are missing, ask before proceeding.

Step 1 — Run owltools merge

From src/ontology/:

owltools --use-catalog mondo-edit.obo \
  --obsolete-replace MONDO:XXXXXXX MONDO:YYYYYYY \
  -o -f obo mondo-edit.obo

Where MONDO:XXXXXXX = obsoleted, MONDO:YYYYYYY = surviving.

What owltools does:

  • Renames the obsoleted term to obsolete <original name>
  • Sets is_obsolete: true and replaced_by: MONDO:YYYYYYY on the obsoleted term
  • Strips definition, comment, xrefs, synonyms, subsets, is_a, intersection_of, relationship, property_value from the obsoleted term
  • Transfers xrefs, synonyms, subsets, is_a, relationships, property_values onto the surviving term — including stale "obsoletion-tracking" metadata (see Step 5)
  • Adds the obsoleted term's name as a synonym on the surviving term, citing the obsoleted MONDO ID as evidence (must be fixed in Step 5)

Step 2 — Normalize immediately

make NORM

Then mv NORM mondo-edit.obo. This deduplicates source qualifiers on identical subset/xref/is_a lines and re-quotes property_value URIs that owltools mangles.

NORM does not dedupe synonyms across different scopes (e.g. an EXACT and a RELATED with the same text both stay) — handle in Step 5.

Step 3 — Checkout both terms

bash
obo-checkout.pl src/ontology/mondo-edit.obo MONDO:XXXXXXX MONDO:YYYYYYY

Step 4 — Clean up the OBSOLETED term

The obsoleted stanza must contain ONLY the lines below. Delete anything else owltools left behind (def, comment, xref, synonym, subset, is_a, intersection_of, relationship, other property_value) — but only after verifying the content is on the surviving term.

Allowed lineSource
id: MONDO:XXXXXXXunchanged
name: obsolete <original name>set by owltools
property_value: IAO:0000231 MONDO:TermsMergedadd manually (obsoletion reason)
property_value: IAO:0000233 "https://github.com/monarch-initiative/mondo/issues/NNNN" xsd:anyURIadd manually (issue link)
is_obsolete: trueset by owltools
replaced_by: MONDO:YYYYYYYset by owltools

Step 5 — Clean up the SURVIVING term

owltools transfers content but several things need manual attention:

  1. Fix synonym evidence. owltools added a synonym like synonym: "<obsoleted name>" EXACT [MONDO:XXXXXXX]. Replace MONDO:XXXXXXX with one of the transferred xrefs (e.g. [Orphanet:NNNNNN]) — but only if that source actually uses the name. Picking any xref at random fabricates evidence. To confirm: either reuse a citation from the pre-merge obsolete stanza if the same synonym was already cited there, or open the xref at source (omim.org/entry/NNNNNN, orpha.net/en/disease/detail/NNNNNN, etc.) and check the name appears as a label or synonym. If no transferred xref carries the name, leave [] and flag in the Step 8 summary. If the obsoleted name duplicates an existing synonym with a different scope, reconcile manually — pick the correct scope, drop the duplicate.

  2. Remove obsoletion-tracking metadata that came from the obsoleted term:

    • subset: obsoletion_candidate
    • subset: scheduled for obsoletion on or after (if present)
    • property_value: IAO:0006012 "<date>" xsd:string (scheduled-obsoletion date — would otherwise claim the surviving term is scheduled for obsoletion)
  3. Decide which definition to keep. Default = whichever the issue says is correct. If the issue is silent, keep the surviving term's existing definition. If the surviving term had no definition and the obsoleted one did, use the obsoleted one's. State the choice in the final summary so the user can override.

  4. Check for redundant is_a. If a transferred is_a is a superclass of another is_a already on the surviving term (e.g. MONDO:0000001 "disease" alongside a more specific class), remove the redundant one along with its source qualifiers.

  5. Check for an unwanted alt_id. Some owltools versions add alt_id: MONDO:XXXXXXX to the surviving term. If present, remove it (Mondo policy: no alt_id for merges).

(Step 7.5 #8 will verify that all meaningful content from the obsolete stanza actually made it onto the surviving term — don't duplicate that check here.)

Step 6 — Rewire children of the obsoleted term

owltools usually rewires is_a children, but does not touch references in relationship:, intersection_of:, disjoint_from:, etc. Sweep for ANY remaining reference:

bash
obo-grep.pl --noheader -r 'MONDO:XXXXXXX' src/ontology/mondo-edit.obo

For each hit outside the obsoleted stanza itself, checkout that term, repoint the axiom to MONDO:YYYYYYY, and check it back in.

Show full SKILL.md (484 more words)Show less

Step 7 — Check in, normalize, run QC

  1. Check in:

    bash
    obo-checkin.pl src/ontology/mondo-edit.obo MONDO:XXXXXXX MONDO:YYYYYYY [any rewired children]
  2. Normalize:

    make NORM

    then mv NORM mondo-edit.obo.

  3. Run targeted QC. The merge-relevant SPARQL checks live under src/sparql/qc/general/ and src/sparql/qc/mondo/. Run them via robot verify (this is a body — wrap with sh run.sh or docker per the warning at the top of the skill):

    robot verify --catalog catalog-v001.xml -i mondo-edit.obo \
      --queries \
        ../sparql/qc/general/qc-proxy-merge-missing-preferred.sparql \
        ../sparql/qc/general/qc-misused-replaced-by.sparql \
        ../sparql/qc/general/qc-obsoletion-reason.sparql \
        ../sparql/qc/general/qc-deprecated-class-reference.sparql \
        ../sparql/qc/general/qc-xref-without-precision.sparql \
        ../sparql/qc/general/qc-duplicate-exact-synonym-no-abbrev.sparql \
        ../sparql/qc/mondo/qc-omim-subsumption.sparql \
      -O reports/

    Empty exit + PASS Rule ... 0 violation(s) per query = clean.

    On qc-omim-subsumption.sparql. Flags a class and one of its ancestors both carrying the same OMIM:NNNNNN xref with {source="MONDO:equivalentTo"} — two classes can't both be the OMIM-equivalent. Often triggered by merges, since transferring an equivalentTo OMIM xref onto the surviving term may collide with the same xref already on an ancestor/descendant. Fix by demoting one side's source qualifier (MONDO:equivalentTo → MONDO:obsoleteEquivalent / MONDO:Redundant / a more specific mapping kind) on whichever class shouldn't claim equivalence, or dropping the duplicate xref from the descendant. Docs: https://mondo.readthedocs.io/en/latest/editors-guide/quality-control-tests/#qc-omim-subsumptionsparql.

    Note: these queries do NOT catch a missing IAO:0000231 MONDO:TermsMerged on the obsoleted term — the Step 8 checklist is the real safety net.

Step 7.5 — Self-verify

Before claiming done, run every check below. If any fails, fix it before moving to Step 8 — do not just note it.

Mechanical checks

Run these greps. Replace XXXXXXX with the obsoleted ID and YYYYYYY with the surviving ID.

bash
# 1. Obsolete stanza must contain ONLY: id, name, IAO:0000231, IAO:0000233, is_obsolete, replaced_by.
#    Any other line (def, comment, subset, xref, synonym, is_a, relationship, other property_value) is a failure.
obo-grep.pl --noheader -r 'id: MONDO:XXXXXXX' src/ontology/mondo-edit.obo

# 2. Surviving stanza must NOT contain obsoletion-tracking metadata.
obo-grep.pl --noheader -r 'id: MONDO:YYYYYYY' src/ontology/mondo-edit.obo \
  | grep -E 'subset: obsoletion_candidate|IAO:0006012|scheduled for obsoletion'
# Expected: no output. Any hit = failure.

# 3. No synonym on the surviving term should cite the obsoleted MONDO ID as evidence.
obo-grep.pl --noheader -r 'id: MONDO:YYYYYYY' src/ontology/mondo-edit.obo \
  | grep "\[MONDO:XXXXXXX\]"
# Expected: no output.

# 4. No alt_id anywhere referencing the obsoleted ID.
grep "alt_id: MONDO:XXXXXXX" src/ontology/mondo-edit.obo
# Expected: no output.

# 5. No reference to the obsoleted ID outside its own stanza (catches missed children).
obo-grep.pl --noheader -r 'MONDO:XXXXXXX' src/ontology/mondo-edit.obo
# Expected: only the line "id: MONDO:XXXXXXX" inside the obsolete stanza itself.
# Anything else (a leftover synonym evidence on the surviving term, an unrewired
# child term still pointing at the obsolete) = failure, fix it before continuing.

# 6. Flag any duplicate synonym text on the surviving term (different scopes, same text).
obo-grep.pl --noheader -r 'id: MONDO:YYYYYYY' src/ontology/mondo-edit.obo \
  | awk '/^synonym:/ {match($0, /"[^"]*"/); print substr($0, RSTART, RLENGTH)}' \
  | sort | uniq -d
# Expected: no output. Any duplicate text = manual reconciliation needed (pick correct scope, drop the other).
Source-rereads (cheap — you already have what you need)
  1. Definition matches issue intent. Re-read the GitHub issue body. If it specifies which definition to keep (or supplies a new one), confirm the surviving term reflects that. If the issue is silent, the surviving term's pre-merge definition should be unchanged.

  2. All meaningful content transferred. Compare the pre-merge obsolete stanza to the post-merge surviving stanza:

    bash
    git show HEAD:src/ontology/mondo-edit.obo | obo-grep.pl --noheader -r 'id: MONDO:XXXXXXX' -
    obo-grep.pl --noheader -r 'id: MONDO:YYYYYYY' src/ontology/mondo-edit.obo

    Walk through every xref:, synonym:, is_a:, relationship:, intersection_of:, and property_value: on the obsolete stanza. Each must have an equivalent on the surviving term unless it was explicitly dropped. Allowed drops:

    • obsoletion-tracking metadata (see Step 5.2)
    • a redundant superclass is_a (see Step 5.4)
    • the owltools-injected [MONDO:XXXXXXX] synonym evidence
    • any MONDO:Lexical-qualified xref — these are auto-generated string-match cross-refs and don't need to survive a merge

    If you can't account for a line, fix it.

Step 8 — Show diff and summary checklist

Show the user git diff src/ontology/mondo-edit.obo and the table below, filled in:

WhatFrom obsoletedStatus
Synonyms"..." [evidence]transferred / merged citations / already on surviving / scope reconciled
XrefsPREFIX:IDtransferred / merged sources / skipped (duplicate)
Subsetssubset_nametransferred / source merged / removed (obsoletion-tracking)
is_aMONDO:NNNNNNN ! parenttransferred / source merged / removed (redundant)
intersection_of...transferred / already on surviving
Relationships...transferred / source merged
Property valuescurated_content_resource, etc.transferred / removed (IAO:0006012 scheduled date)
Definition...kept surviving / replaced from obsoleted (per issue)
Children rewiredMONDO:NNNNNNNrewired / none
New xrefs from issuePREFIX:IDadded / n/a
Obsoleted-stanza cleanup—reduced to id+name+TermsMerged+issue+is_obsolete+replaced_by
alt_id—none / removed

© monarch-initiative, CC-BY-4.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/merge-terms of monarch-initiative/mondo.

Open the folder on GitHubat commit 9bfccbe

Compare with similar skills

Merge Terms next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Merge Terms compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Merge Terms this skillmonarch-initiative/mondo326—~2.9kAutomated safety check: PassCC-BY-4.0
Vercel Composition Patternssupabase/supabase111k58 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k4 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 58 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 4 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from monarch-initiative/mondo

  • Odk

    monarch-initiative/mondo

    A skill your agent uses when running any ODK-backed command in this repo — owltools, robot, make NORM, robot verify, or any other tool that lives inside the ODK docker image

    326 GitHub stars~757 tokensUpdated yesterday
    Auto-check passed
  • Analyse Issue

    monarch-initiative/mondo

    Analyze MONDO GitHub issues for validity, suggest improvements, and generate structured reports with duplication checks and identifier validation

    326 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Release Announcement

    monarch-initiative/mondo

    Generate a formatted Mondo release announcement with statistics table from release diff reports

    326 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Merge Terms

What does Merge Terms do?

A skill your agent uses when asked to merge two MONDO terms — obsoleting one and transferring its metadata to the surviving term. Merge Terms is an agent skill from monarch-initiative/mondo.

When should I use Merge Terms?

Merge Terms fits situations like: asked to merge two MONDO terms — obsoleting one and transferring its metadata to the surviving term.

How do I install Merge Terms in Claude Code?

Run `npx skills add monarch-initiative/mondo --skill merge-terms -a claude-code`. Or copy the skill folder (.claude/skills/merge-terms in monarch-initiative/mondo) into .claude/skills/merge-terms in your project. Claude Code loads it when a task matches its description.

How do I install Merge Terms in Codex?

Run `npx skills add monarch-initiative/mondo --skill merge-terms -a codex`. Or copy the skill folder (.claude/skills/merge-terms in monarch-initiative/mondo) into .agents/skills/merge-terms in your project. Codex loads it when a task matches its description.

Can I use Merge Terms in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add monarch-initiative/mondo --skill merge-terms -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/merge-terms, .gemini/skills/merge-terms, .github/skills/merge-terms and .opencode/skills/merge-terms in your project.

What does Merge Terms need to run?

Going by SKILL.md and its folder, Merge Terms needs the command-line tools its instructions call (make, sh, git and docker). Our summary lists: Docker.

Does Merge Terms access the network?

SKILL.md names 1 domain. As links in the text: mondo.readthedocs.io. This is read from the text; nothing was executed.

Is Merge Terms safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Merge Terms use?

Merge Terms is published under the CC-BY-4.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Merge Terms use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Merge Terms?

Skills that share tags, products or a category with Merge Terms: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 297k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Merge Terms?

monarch-initiative (a GitHub organization) maintains it in monarch-initiative/mondo, which has 326 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 9, 2026.

Source: monarch-initiative/mondo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.