ontology-mapper
Skill78 starsChanged 7 days agoApache-2.0View on GitHub
Manages cross-ontology mapping and alignment. Generates, validates, and maintains SSSOM mapping sets. Runs lexical matching via oaklib and LLM-assisted verification. Use when working with ontology mappings, alignment, or cross-references.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- HeshamFS/materials-simulation-skillstheir own version, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- HeshamFS/materials-simulation-skills★ 83same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- explorations/AGENTS.mdAGENTS.md
- adhdSkill
- atom-reactivity-specialistSkill
- browser-qa-loopSkill
- closeoutSkill
- codex-findingsSkill
- crispenSkill
- effect-first-developmentSkill
- exploreSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- jsdoc-annotation-specialistSkill
- motion-evidence-reviewSkill
- onepassword-secret-refsSkill
- ontology-architectSkill
- ontology-conceptualizerSkill
- ontology-curatorSkill
- ontology-foundational-auditorSkill
- ontology-requirementsSkill
- ontology-scoutSkill
- ontology-validatorSkill
- operator-handoffSkill
- orchestrateSkill
- plasma-sensitive-entrySkill
- portlessSkill
- qa-session-opsSkill
- quality-review-fix-loopSkill
- reflectSkill
- remote-development-agentsSkill
- schema-first-developmentSkill
- shadcnSkill
- sparql-expertSkill
- teachSkill
- turborepoSkill
- unslopSkill
- yeetSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Read these files from _shared/ before beginning work:
- Very specific: line 97
Update the SSSOM file with LLM-verified results marked as PROPOSED (steward ratification flips them to accepted), using …
- Very specific: line 126
Critical: Treat owl:sameAs as a last-resort identity assertion only when true identity is proven.
- Distinctive: line 142
No self-mappings (subject ≠ object)
- Very specific: line 147
After validation, compute the transitive closure of skos:exactMatch and flag any clique larger than 3 terms for human review.
- Distinctive: line 203
Before publishing bridge ontologies, review any generated identity axioms:
- Distinctive: line 253
Every SSSOM file must include in its YAML header:
- Distinctive: line 264
Every mapping row must include:
- Distinctive: line 273
Mapping without context: Don't match by label alone.
- Very specific: line 275
exactMatch overuse: Default to closeMatch when unsure.
- Very specific: line 278
sameAs overuse: Never use owl:sameAs for "close enough" mappings.
- Very specific: line 282
Missing justification: Every mapping needs a SEMAPV justification.
- Distinctive: line 285
Stale mappings: When source or target ontology is updated, mappings must be rechecked for obsoleted terms.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Ontology Mapper
Role Statement
You are responsible for the integration phase — creating, validating, and maintaining cross-ontology mappings using the SSSOM standard. You generate mapping candidates via lexical matching, triage by confidence, apply LLM verification for uncertain pairs, and validate the final mapping set. You produce SSSOM TSV files and quality reports. You do NOT modify the source or target ontologies — that is the architect's or curator's job.
When to Activate
- User mentions "mapping", "alignment", "cross-reference", or "SSSOM"
- User wants to connect two ontologies
- User wants to validate or update existing mappings
- Pipeline B
Shared Reference Materials
Read these files from _shared/ before beginning work:
_shared/methodology-backbone.md— lifecycle phase context (Phase 5: Integration)_shared/namespaces.json— canonical prefixes including sssom and semapv_shared/naming-conventions.md— to understand label standards for matching
Core Workflow
Step 1: Candidate Generation (Lexical Matching)
# Using oaklib lexmatch
uv run runoak -i sqlite:obo:{source} lexmatch \
--add sqlite:obo:{target} \
-o ontologies/{name}/mappings/{source}-to-{target}.sssom.tsvWith custom match rules:
# lexmatch-rules.yaml
rules:
- match_fields: [rdfs:label, oio:hasExactSynonym]
predicate: skos:exactMatch
weight: 0.9
- match_fields: [rdfs:label, oio:hasRelatedSynonym]
predicate: skos:closeMatch
weight: 0.7uv run runoak -i sqlite:obo:{source} lexmatch \
--add sqlite:obo:{target} \
--rules-file lexmatch-rules.yaml \
-o ontologies/{name}/mappings/{source}-to-{target}.sssom.tsvStep 2: Confidence Triage
Practitioner warning: Lexical matching at the 0.7-0.95 confidence level produces 40-60% false positives in practice. Labels match but meanings differ (homonyms across domains). The LLM verification step is not optional — it is essential for this tier.
Sort candidates into three tiers:
| Tier | Confidence | Action |
| Propose-accept | ≥ 0.98 AND exact label match AND compatible parent classes | PROPOSE with semapv:LexicalMatching justification — equivalence-class mappings remain proposals until the named human steward ratifies (_shared/stage-authority-matrix.yaml forbids autonomous equivalence; confidence is never truth) |
| LLM-verify | 0.7 – 0.98 | Present to LLM for semantic evaluation |
| Human queue | < 0.7 | Flag for manual expert review |
Step 3: LLM Verification (for uncertain mappings)
For each uncertain pair, evaluate:
Subject: {id} "{label}" — {definition} [parents: {parents}]
Object: {id} "{label}" — {definition} [parents: {parents}]
Determine:
- predicate: exactMatch / closeMatch / broadMatch / narrowMatch /
relatedMatch / no_match
- confidence: 0.0 – 1.0
- justification: reasoning for the decisionUpdate the SSSOM file with LLM-verified results marked as PROPOSED (steward ratification flips them to accepted), using
semapv:SemanticSimilarityThresholdMatching as the mapping justification.
Step 4: Mapping Predicate Selection
Apply the predicate decision guide. The guide SELECTS the predicate to
PROPOSE — every equivalence-class candidate (owl:equivalentClass,
skos:exactMatch, owl:sameAs) stays mapping_status: PROPOSED and routes
through ontology-foundational-auditor as a REUSE proposal
(reuse.exact_reuse_found: true + mappings with compatibility
justification): the auditor's identity/compatibility analysis and the
steward's ratification of that otp: id — the shared rat- schema binds to
proposal ids, and mappings are proposals like everything else — are what flip
the SSSOM row to accepted. Confidence is never truth and no autonomous path
asserts equivalence:
Logically equivalent with formal proof? → propose owl:equivalentClass
High-confidence equivalence? → propose skos:exactMatch
Subject more general than object? → skos:broadMatch
Subject more specific than object? → skos:narrowMatch
Similar but not fully interchangeable? → skos:closeMatch
Merely associated? → skos:relatedMatchCritical: skos:exactMatch is TRANSITIVE. Avoid mapping chains that
create unintended equivalences (A exactMatch B, B exactMatch C implies
A exactMatch C).
Critical: Treat owl:sameAs as a last-resort identity assertion only when
true identity is proven. One incorrect owl:sameAs can trigger transitive
merges across multiple graphs and collapse distinct entities.
Step 5: Validate
# Validate SSSOM schema conformance
uv run sssom validate ontologies/{name}/mappings/{source}-to-{target}.sssom.tsvCheck:
- Schema conformance (valid SSSOM TSV)
- CURIE resolution (all prefixes in curie_map)
- Entity existence (subjects/objects exist in source/target)
- Predicate consistency (no contradictory predicates for same pair)
- No self-mappings (subject ≠ object)
- No duplicate mappings
Step 5.5: Clique Analysis (mandatory for exactMatch)
After validation, compute the transitive closure of skos:exactMatch and
flag any clique larger than 3 terms for human review. One bad exactMatch
link contaminates an entire clique.
# Inline clique detection: find terms reachable via exactMatch chains > 3
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?start ?mid ?end WHERE {
?start skos:exactMatch+ ?mid .
?mid skos:exactMatch+ ?end .
FILTER(?start != ?end)
}# Run against the mapping file (convert SSSOM to RDF first if needed)
robot query --input ontologies/{name}/mappings/{source}-to-{target}.sssom.ttl \
--query sparql/clique-check.sparql --output clique-report.csvFor cross-domain mappings (source and target are in different domains),
default to skos:relatedMatch or skos:closeMatch, not skos:exactMatch.
Step 6: Quality Report
Generate a quality assessment:
- Predicate distribution (how many of each type)
- Confidence distribution (histogram)
- Source coverage (% of source terms mapped)
- Target coverage (% of target terms mapped)
- Potential conflicts (same subject mapped to multiple objects with exactMatch)
- Clique analysis (transitive closure of exactMatch — flag cliques > 3)
Tool Commands
SSSOM operations
# Validate
uv run sssom validate ontologies/{name}/mappings/file.sssom.tsv
# Merge mapping sets
uv run sssom merge \
set1.sssom.tsv set2.sssom.tsv \
-o merged.sssom.tsv
# Deduplicate
uv run sssom dedupe merged.sssom.tsv -o final.sssom.tsv
# Convert to OWL (bridge ontology)
uv run sssom convert ontologies/{name}/mappings/file.sssom.tsv -o bridge.owl -O owlBefore publishing bridge ontologies, review any generated identity axioms:
- Confirm whether conversion introduced
owl:sameAsassertions. - Downgrade uncertain links to SKOS predicates before release.
Updating mappings for new ontology version
# Find obsoleted terms in target
uv run runoak -i sqlite:obo:{target} query \
"PREFIX owl: <http://www.w3.org/2002/07/owl#> SELECT ?term WHERE { ?term owl:deprecated true }"
# Generate replacement KGCL
# For each obsoleted target with a replacement:
# delete mapping {subject} {predicate} {obsolete_target}
# create mapping {subject} {predicate} {replacement_target}Outputs
This skill produces:
| Artifact | Location | Format | Description |
| Mapping file | ontologies/{name}/mappings/{source}-to-{target}.sssom.tsv | SSSOM TSV | Complete mapping set with metadata |
| Quality report | ontologies/{name}/mappings/{source}-to-{target}-qa.md | Markdown | Quality assessment with statistics |
| Human review queue | ontologies/{name}/mappings/{source}-to-{target}-review.tsv | TSV | Low-confidence pairs for expert review |
| KGCL changes | ontologies/{name}/mappings/{source}-to-{target}-changes.kgcl | KGCL | Mapping update changes |
| Bridge ontology | ontologies/{name}/mappings/{source}-to-{target}-bridge.owl | OWL/XML | OWL axioms from mappings (optional) |
Handoff
Receives from: ontology-scout — target ontology identifiers,
reuse recommendations
Passes to: ontology-validator — ontologies/{name}/mappings/*.sssom.tsv
(equivalence-class rows only travel as ACCEPTED once the auditor-routed reuse
proposal they correspond to has its ratification record under
ontologies/{name}/governance/ratifications/; unratified equivalences stay
PROPOSED and the validator treats them as non-assertions)
Handoff checklist:
- SSSOM file passes
sssom validate - All CURIEs resolve via curie_map
- Every mapping has a
mapping_justification(SEMAPV term) - Confidence scores present for all automated mappings
- Every accepted equivalence row has a steward ratification record
- Quality report generated and reviewed
SSSOM File Requirements
Every SSSOM file must include in its YAML header:
curie_map:
# All prefixes used in subject_id and object_id
mapping_set_id: https://example.org/mappings/{source}-to-{target}
license: https://creativecommons.org/licenses/by/4.0/
subject_source: {source ontology IRI}
object_source: {target ontology IRI}Every mapping row must include:
subject_id,subject_labelpredicate_idobject_id,object_labelmapping_justification(SEMAPV term)confidence(for automated mappings)
Anti-Patterns to Avoid
- Mapping without context: Don't match by label alone. Consider definitions, parent classes, and domain context.
- exactMatch overuse: Default to
closeMatchwhen unsure. Upgrading later is safe; downgrading after reasoning has propagated equivalence is not. - sameAs overuse: Never use
owl:sameAsfor "close enough" mappings. Reserve it for strict identity only. - Ignoring transitivity:
skos:exactMatchis transitive. Check that chains don't create unintended equivalences. - Missing justification: Every mapping needs a SEMAPV justification.
semapv:LexicalMatching,semapv:ManualMappingCuration,semapv:SemanticSimilarityThresholdMatching. - Stale mappings: When source or target ontology is updated, mappings must be rechecked for obsoleted terms.
Error Handling
| Error | Likely Cause | Recovery |
sssom validate fails | Missing required fields or invalid CURIEs | Fix curie_map, add missing justifications |
| Lexmatch produces no candidates | Vocabularies use different naming conventions | Try synonym matching, broaden match rules |
| Transitive closure creates false equivalences | Over-use of exactMatch | Downgrade to closeMatch for uncertain pairs |
| Target term is obsoleted | Target ontology was updated | Find replacement via obo:IAO_0100001 property |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

