ontology

ontology is a skill for Claude Code from modeled-information-format/mnemonic. It costs 74 tokens per session (989 once invoked), scanned A, original, MIT.

A system for defining and checking structured entities and relationships in mnemonic memories. An ontology is a description of the kinds of things a system knows about, such as components, incidents, or deployment procedures, and how they relate.

In plain words
What is it for?
Use it to define namespaces, entity types, reusable traits, and relationships, discover entities, and validate ontology files.
Why use it?
It helps memories use consistent names, types, fields, and relationships instead of storing loosely structured information.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the mnemonic plugin — 10 skills, 14 commands, 4 agents, 1 hook shipped together

Good fit Use it to define namespaces, entity types, reusable traits, and relationships, discover entities, and validate ontology files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/modeled-information-format/mnemonic/ontology
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add modeled-information-format/mnemonic --skill ontology
Clone the repo
git clone --depth 1 https://github.com/modeled-information-format/mnemonic

Made for: Claude Code.

Or install mnemonic, the plugin that ships this one along with the rest of its 10 skills, 14 commands, 4 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ontology

README.md
[![agentmods](https://agentmods.dev/badge/skills/modeled-information-format/mnemonic/ontology/github.svg)](https://agentmods.dev/skills/modeled-information-format/mnemonic/ontology)
Your own site
<a href="https://agentmods.dev/skills/modeled-information-format/mnemonic/ontology"><img src="https://agentmods.dev/badge/skills/modeled-information-format/mnemonic/ontology/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ontology

Your own site · 80×15
<a href="https://agentmods.dev/skills/modeled-information-format/mnemonic/ontology"><img src="https://agentmods.dev/badge/skills/modeled-information-format/mnemonic/ontology.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 989 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00074 $0.00989
Opus 5.5 $0.00030 $0.00396
Sonnet 5.5 $0.00015 $0.00198
Haiku 4.5 $0.00007 $0.00099

Measured 1mo ago against content hash e9fd4ef781ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ontology scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 5 executable files (lib/__init__.py, lib/entity_resolver.py, lib/ontology_loader.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ontology/SKILL.md · 155 lines

How it starts

The opening of the file, as written. The whole thing — 155 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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:

Type Purpose Examples
Semantic Facts, concepts Components, technologies, decisions
Episodic Events, experiences Incidents, debug sessions
Procedural Step-by-step processes Runbooks, deployments

Usage

ontology_validator.py

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

ontology_registry.py

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

entity_resolver.py

Resolve and search entity references across memories.

python ${SKILL_DIR}/lib/entity_resolver.py [OPTIONS]

Read the full file on GitHub · 155 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 155 lines · 74 tokens per session scan A e9fd4ef781ae

Subscribe to this mod's changes

ontology is a skill published in the GitHub repository modeled-information-format/mnemonic (23 stars, last pushed 2d ago), licensed MIT. It adds 74 tokens to every session and 989 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.