From mnemonic
Defines and validates YAML ontologies for mnemonic memories, enabling custom namespaces, entity types (semantic, episodic, procedural), traits, relationships, and entity resolution.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mnemonic:ontologyThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- BEGIN MNEMONIC PROTOCOL -->
fallback/ontologies/examples/software-engineering.ontology.yamlfallback/ontologies/mif-base.ontology.yamlfallback/schema/ontology/CHANGELOG.mdfallback/schema/ontology/README.mdfallback/schema/ontology/ontology.context.jsonldfallback/schema/ontology/ontology.schema.jsonlib/__init__.pylib/entity_resolver.pylib/ontology_loader.pylib/ontology_registry.pylib/ontology_validator.pySearch first: /mnemonic:search {relevant_keywords}
Capture after: /mnemonic:capture {namespace} "{title}"
Run /mnemonic:list --namespaces to see available namespaces from loaded ontologies.
Provides custom ontology support for extending mnemonic with domain-specific knowledge structures.
All entity types inherit from one of three base memory types:
| Type | Purpose | Examples |
|---|---|---|
| Semantic | Facts, concepts | Components, technologies, decisions |
| Episodic | Events, experiences | Incidents, debug sessions |
| Procedural | Step-by-step processes | Runbooks, deployments |
Validate ontology YAML files against the schema.
python ${SKILL_DIR}/lib/ontology_validator.py <file> [--json]
| Option | Description |
|---|---|
<file> | Ontology YAML file to validate (required) |
--json | Output validation results as JSON |
Load and query ontologies.
python ${SKILL_DIR}/lib/ontology_registry.py [OPTIONS]
| Option | Description |
|---|---|
--list | List all loaded ontologies |
--namespaces | List all available namespaces |
--types | List all entity types |
--validate <NS> | Validate a specific namespace |
--json | Output as JSON |
Resolve and search entity references across memories.
python ${SKILL_DIR}/lib/entity_resolver.py [OPTIONS]
| Option | Description |
|---|---|
--build-index | Build complete entity index from memory files |
--search <query> | Search for entities by name or content |
--resolve <ref> | Resolve entity reference (e.g., @[[Name]]) |
--json | Output results as JSON |
@[[Entity Name]] - Resolves by name[[technology:postgres-id]] - Resolves by type and IDOntologies can define patterns for automatic namespace suggestion during memory capture.
Match text content to suggest appropriate namespaces:
discovery:
content_patterns:
- pattern: "\\bdecided to\\b|\\bwe will use\\b"
namespace: _semantic/decisions
- pattern: "\\blearned that\\b|\\bthe fix was\\b"
namespace: _semantic/knowledge
Match file paths for contextual namespace hints:
discovery:
file_patterns:
- pattern: "auth|login|session"
namespaces:
- _semantic/knowledge
- _semantic/decisions
context: authentication
discovery:
enabled: true
confidence_threshold: 0.8 # Minimum confidence to suggest
See fallback/ontologies/mif-base.ontology.yaml for complete examples.
lib/ontology_registry.py - Load and manage ontologieslib/ontology_validator.py - Validate ontology YAMLlib/ontology_loader.py - Centralized ontology loading with cachinglib/entity_resolver.py - Resolve entity referencesfallback/ontologies/mif-base.ontology.yaml - Standard mnemonic namespacesfallback/schema/ontology/ontology.schema.json - JSON Schemanpx claudepluginhub zircote/mnemonicProvides MIF Level 3 specifications, templates, and formatting guidelines for mnemonic memory files (.memory.md) with YAML frontmatter fields like id, title, type, provenance, citations, and relationships.
Typed knowledge graph stored in sage-memory. Use when creating or querying structured entities (Person, Project, Task, Event, Document), linking related objects, checking dependencies, planning multi-step actions as graph transformations, or when skills need to share structured state. Trigger on "remember that X is Y", "what do I know about", "link X to Y", "show dependencies", "what blocks X", entity CRUD, cross-skill data access, or any request involving structured relationships between things. Also trigger when the memory skill is active and the agent needs typed structure beyond flat prose.
Builds, validates, governs RDF/OWL ontologies and knowledge graphs using Open Ontologies MCP server with Oxigraph triple store. For creating, modifying, querying, or managing RDF data.