OpenClaw-Medical-Skills ontology-explorer
install
source · Clone the upstream repo
git clone https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/ontology-explorer" ~/.claude/skills/freedomintelligence-openclaw-medical-skills-ontology-explorer && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/ontology-explorer" ~/.openclaw/skills/freedomintelligence-openclaw-medical-skills-ontology-explorer && rm -rf "$T"
manifest:
skills/ontology-explorer/SKILL.mdsource content
Ontology Explorer
Goal
Enable an agent to understand, navigate, and query the structure of materials science ontologies without loading verbose OWL/XML files directly. Provides fast access to class hierarchies, property definitions, and domain-range relationships through pre-processed JSON summaries.
Requirements
- Python 3.8+
- No external dependencies (Python standard library only)
- Internet access required only for
andowl_parser.py
when fetching remote OWL filesontology_summarizer.py
Inputs to Gather
| Input | Description | Example |
|---|---|---|
| Ontology name | Registered ontology to query | |
| Class name | A specific class to inspect | , |
| Property name | A specific property to look up | , |
| Search term | Keyword to search across labels | , |
| OWL source | Path or URL to an OWL/XML file (for parsing/summarizing) | |
Decision Guidance
What do you need? ├── Understand overall ontology structure │ └── class_browser.py --ontology cmso --list-roots ├── Inspect a specific class │ └── class_browser.py --ontology cmso --class <name> ├── Find properties for a class │ └── property_lookup.py --ontology cmso --class <name> ├── Look up a specific property │ └── property_lookup.py --ontology cmso --property <name> ├── Search for a concept │ ├── class_browser.py --ontology cmso --search <term> │ └── property_lookup.py --ontology cmso --search <term> ├── Parse a new/updated OWL file │ └── owl_parser.py --source <path-or-url> └── Generate/refresh a summary JSON └── ontology_summarizer.py --source <url> --output <path>
Script Outputs (JSON Fields)
| Script | Key Outputs |
|---|---|
| , , , , |
| , |
| , , , , , |
| , , |
Workflow
- Identify which ontology the user is working with (default: CMSO).
- Use
to see the top-level concepts.class_browser.py --list-roots - Drill into specific classes with
to see hierarchy, children, and applicable properties.class_browser.py --class <name> - Look up individual properties with
.property_lookup.py --property <name> - If the user mentions a concept but not its ontology name, use
to find matching classes or properties.--search - For a new or updated ontology, run
to parse the raw OWL, thenowl_parser.py
to generate a summary JSON.ontology_summarizer.py
Conversational Workflow Example
User: I have an FCC copper simulation. What CMSO classes should I use to describe it? Agent: Let me explore the CMSO ontology to find the relevant classes. [Runs: class_browser.py --ontology cmso --search "crystal" --json] For an FCC copper simulation, the relevant CMSO classes are: - **Computational Sample** → **Atomic Scale Sample**: your simulation is an atomic-scale sample - **Material** → **Crystalline Material**: copper is crystalline - **Crystal Structure**: describes the FCC arrangement - **Unit Cell**: the repeating FCC unit cell (a=b=c=3.615 Å, α=β=γ=90°) - **Space Group**: FCC copper is space group 225 (Fm-3m) - **Chemical Element**: Cu The key relationships: AtomicScaleSample → hasMaterial → CrystallineMaterial → hasStructure → CrystalStructure → hasUnitCell → UnitCell Shall I look up the specific properties for any of these classes?
CLI Examples
# List root classes in CMSO python3 skills/ontology/ontology-explorer/scripts/class_browser.py \ --ontology cmso --list-roots --json # Inspect the Material class hierarchy python3 skills/ontology/ontology-explorer/scripts/class_browser.py \ --ontology cmso --class Material --json # Search for crystal-related classes python3 skills/ontology/ontology-explorer/scripts/class_browser.py \ --ontology cmso --search crystal --json # Find all properties for UnitCell python3 skills/ontology/ontology-explorer/scripts/property_lookup.py \ --ontology cmso --class UnitCell --json # Look up a specific property python3 skills/ontology/ontology-explorer/scripts/property_lookup.py \ --ontology cmso --property "has space group" --json # Parse a remote OWL file python3 skills/ontology/ontology-explorer/scripts/owl_parser.py \ --source https://raw.githubusercontent.com/OCDO/cmso/main/cmso.owl --json # Generate a summary JSON from an OWL file python3 skills/ontology/ontology-explorer/scripts/ontology_summarizer.py \ --source https://raw.githubusercontent.com/OCDO/cmso/main/cmso.owl \ --output summary.json --json
Error Handling
| Error | Cause | Resolution |
|---|---|---|
| Ontology name not registered | Check for available names |
| Class label doesn't match any entry | Use to find similar names, or to see available classes |
| Property label doesn't match | Use to find similar properties |
| Invalid XML or unreachable URL | Check file path or URL; ensure the file is valid OWL/XML |
| Summary JSON hasn't been generated | Run first |
Interpretation Guidance
- Class hierarchy: root classes are the broadest concepts; leaf classes are the most specific. A class inherits all properties from its ancestors.
- Object properties: show how classes relate to each other (domain → range). A property with domain
and rangeUnitCell
means a unit cell has a basis.Basis - Data properties: show what literal values a class carries. A property with domain
and rangeChemicalElement
means an element has a string-valued attribute.xsd:string - Union domains: some properties apply to multiple classes (e.g.,
applies to bothhasVector
andSimulationCell
), shown asUnitCell
.SimulationCell | UnitCell - Search relevance: 1.0 = label match, 0.5 = description match only.
Limitations
- Only supports OWL/XML format (not Turtle, JSON-LD, or N-Triples)
- Does not support OWL reasoning or inference (e.g., does not compute transitive closures)
- Class hierarchy extraction handles simple
only (not complex OWL restrictions)rdfs:subClassOf - Descriptions may be missing for classes that lack
,rdfs:comment
, or IAO annotationsskos:definition - URL fetching requires internet access and may time out (30-second limit)
References
- OWL/RDF Primer — brief introduction to OWL concepts
- CMSO Guide — narrative guide to the CMSO ontology
- Ontology Registry — registered ontologies and their metadata
- CMSO Summary — pre-processed CMSO structure
- CMSO Documentation — official CMSO docs
- CMSO Repository — source OWL file and development
Version History
| Date | Version | Changes |
|---|---|---|
| 2026-02-25 | 1.0 | Initial release with CMSO support |