askill
ontology

ontologySafety 92Repository

Ontology-based entity discovery and validation for mnemonic memories. Define custom namespaces, entity types, traits, and relationships. Triggers: "entity discovery", "validate ontology", "define namespaces", "resolve entity references", "list ontologies", "show namespaces", "entity types", "entity relationships", "traits", "discovery patterns", "cognitive memory types"

4 stars
1.2k downloads
Updated 2/15/2026

Package Files

Loading files...
SKILL.md

Memory

Search first: /mnemonic:search {relevant_keywords} Capture after: /mnemonic:capture {namespace} "{title}"

Run /mnemonic:list --namespaces to see available namespaces from loaded ontologies.

Ontology Skill

Provides custom ontology support for extending mnemonic with domain-specific knowledge structures.

Requirements

  • PyYAML - Optional but recommended for YAML parsing. The library works without it but with limited functionality.

Capabilities

  • Load and validate ontology definitions (YAML)
  • Define custom namespaces beyond the 9 base namespaces
  • Create typed entities (semantic, episodic, procedural)
  • Establish relationships between entities
  • Use traits/mixins for reusable field sets
  • Entity discovery patterns

Cognitive Memory Type Triad

All entity types inherit from one of three base memory types:

TypePurposeExamples
SemanticFacts, conceptsComponents, technologies, decisions
EpisodicEvents, experiencesIncidents, debug sessions
ProceduralStep-by-step processesRunbooks, deployments

Usage

ontology_validator.py

Validate ontology YAML files against the schema.

python ${SKILL_DIR}/lib/ontology_validator.py <file> [--json]
OptionDescription
<file>Ontology YAML file to validate (required)
--jsonOutput validation results as JSON

ontology_registry.py

Load and query ontologies.

python ${SKILL_DIR}/lib/ontology_registry.py [OPTIONS]
OptionDescription
--listList all loaded ontologies
--namespacesList all available namespaces
--typesList all entity types
--validate <NS>Validate a specific namespace
--jsonOutput as JSON

entity_resolver.py

Resolve and search entity references across memories.

python ${SKILL_DIR}/lib/entity_resolver.py [OPTIONS]
OptionDescription
--build-indexBuild complete entity index from memory files
--search <query>Search for entities by name or content
--resolve <ref>Resolve entity reference (e.g., @[[Name]])
--jsonOutput results as JSON

Entity Reference Syntax

  • Simple: @[[Entity Name]] - Resolves by name
  • Typed: [[technology:postgres-id]] - Resolves by type and ID

Discovery Patterns

Ontologies can define patterns for automatic namespace suggestion during memory capture.

Content Patterns

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

File Patterns

Match file paths for contextual namespace hints:

discovery:
  file_patterns:
    - pattern: "auth|login|session"
      namespaces:
        - _semantic/knowledge
        - _semantic/decisions
      context: authentication

Configuration

discovery:
  enabled: true
  confidence_threshold: 0.8  # Minimum confidence to suggest

See fallback/ontologies/mif-base.ontology.yaml for complete examples.

Files

  • lib/ontology_registry.py - Load and manage ontologies
  • lib/ontology_validator.py - Validate ontology YAML
  • lib/ontology_loader.py - Centralized ontology loading with caching
  • lib/entity_resolver.py - Resolve entity references
  • fallback/ontologies/mif-base.ontology.yaml - Standard mnemonic namespaces
  • fallback/schema/ontology/ontology.schema.json - JSON Schema

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

72/100Analyzed 2/19/2026

Well-structured technical reference skill for ontology-based entity management in mnemonic memories. Provides good conceptual framework with cognitive memory types, discovery patterns, and CLI tools. However, lacks step-by-step actionable tutorials and concrete YAML examples, making it more of a reference than an immediately usable guide. Tags are somewhat mismatched (ci-cd, database, security vs. ontology/concepts).

92
82
80
70
58

Metadata

Licenseunknown
Version-
Updated2/15/2026
Publisherzircote

Tags

ci-cddatabasesecurity