/ontology-design:ontology-designfrom ontology-design
Designs formal ontologies, knowledge graphs, and semantic models with classes, properties, hierarchies, and RDF/OWL structures for reasoning and knowledge representation.
Ships in ontology-design. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Model domain knowledge through classes, properties, and relationships. An ontology is not a database schema — it encodes meaning, not just structure. A well-designed ontology enables reasoning (inferring new facts from existing ones), not just storage.
What are you modeling?
│
├─ Entities with "is-a" relationships (inheritance)?
│ ├─ Need automated reasoning over the hierarchy? → Yes, ontology
│ └─ Just need type categories in code? → No, use enum/interface in code
│
├─ Relationships between entities with semantic meaning?
│ ├─ Need to infer new relationships? → Yes, ontology with reasoning
│ └─ Just need to join tables? → No, use database schema
│
├─ Taxonomy with formal classification?
│ ├─ Multiple inheritance or overlapping categories? → Yes, ontology
│ └─ Simple flat categories? → No, use tags or enums
│
├─ Need RDF/OWL/SPARQL?
│ └─ Yes → Ontology design (this skill)
│
└─ Not sure if ontology or schema
├─ Does "Dog is-a Animal" enable reasoning beyond code type checks? → Ontology
└─ Just storing data with relationships? → Database schema
| Component | Purpose | Example |
|---|---|---|
| Class | Category of things | Person, Product |
| Property | Attribute of class | name, price |
| Relationship | Connection between classes | owns, partOf |
| Instance | Specific entity | John, iPhone15 |
| Axiom | Rule that constrains interpretation | Person ⊓ hasChild ≥ 1 → Parent |
| Type | Notation | Example | Inverse |
|---|---|---|---|
| Is-a (inheritance) | subClassOf | Dog is-a Animal | — |
| Has-a (composition) | hasPart | Car has-a Engine | partOf |
| Uses (association) | uses | Person uses Tool | usedBy |
| Instance-of | type | Fido instance-of Dog | — |
| Causes (causation) | causes | Smoking causes Disease | causedBy |
Always define inverse relationships where they exist. Missing inverses break traversal and reasoning.
Kingdom
└── Phylum
└── Class
└── Order
└── Family
└── Genus
└── Species
Rule: taxonomies deeper than 7 levels become unmaintainable. If you need more, consider faceted classification instead.
## Class: [Name]
**Description**: [purpose]
**Parent**: [superclass]
### Properties
| Name | Type | Required | Description |
|------|------|----------|-------------|
| id | string | yes | Unique identifier |
| name | string | yes | Display name |
### Relationships
| Relation | Target | Cardinality | Inverse |
|----------|--------|-------------|---------|
| belongsTo | Category | many-to-one | contains |
| contains | Item | one-to-many | belongsTo |
| Anti-Pattern | Problem | Solution |
|---|---|---|
| God class (too many responsibilities) | Class becomes a catch-all; reasoning produces false inferences | Split into focused classes; use composition over inheritance |
| Orphan classes (no relationships) | Class exists in isolation; no reasoning possible | Connect via at least one relationship or place in hierarchy |
| Circular dependencies | A depends on B depends on A; reasoning loops | Break cycle by extracting shared concept into a third class |
| Over-abstraction | Generic classes like Thing or Entity add no semantic value | Only abstract when subclasses share meaningful properties |
| Missing inverses | Traversal works in one direction only; queries fail | Define inverse for every bidirectional relationship |
| Diamond inheritance | Class inherits from two parents that share an ancestor | Prefer single inheritance + composition; use mixins/traits if needed |
| Confusing is-a with has-a | "Car is-a Wheel" instead of "Car has-a Wheel" | Is-a = "every X is also a Y"; Has-a = "X contains Y as a part" |
| Modeling implementation, not domain | Classes mirror database tables or API endpoints | Model the domain concepts; map to implementation separately |
| Ignoring temporal aspects | "Person lives-at Address" with no time range | Add valid-from/valid-to for facts that change over time |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub viktorbezdek/skillstack --plugin ontology-designOther plugins' skills for the same job