ontology

ontology is a command for Claude Code from kimsanguine/llm-brain. It costs 12 tokens per session (596 once invoked), scanned A, original, MIT.

A command set for checking, exporting, and explaining a private Personal Knowledge Ontology: a structured record of knowledge and its supporting claims.

In plain words
What is it for?
Use it to validate the ontology, create an ontology bundle, or explain a specific claim or page.
Why use it?
It helps detect invalid knowledge records before export and explains where a claim or page comes from without performing catalog actions.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions CLAUDE.md.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uv run python scripts/ontology.py validate.

Part of the llm-brain plugin — 1 skill, 8 commands shipped together

Good fit Use it to validate the ontology, create an ontology bundle, or explain a specific claim or page.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/kimsanguine/llm-brain
agentmods
npx agentmods add commands/kimsanguine/llm-brain/ontology

Made for: Claude Code.

Or install llm-brain, the plugin that ships this one along with the rest of its 1 skill, 8 commands.

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/commands/kimsanguine/llm-brain/ontology/github.svg)](https://agentmods.dev/commands/kimsanguine/llm-brain/ontology)
Your own site
<a href="https://agentmods.dev/commands/kimsanguine/llm-brain/ontology"><img src="https://agentmods.dev/badge/commands/kimsanguine/llm-brain/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/commands/kimsanguine/llm-brain/ontology"><img src="https://agentmods.dev/badge/commands/kimsanguine/llm-brain/ontology.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 596 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.00012 $0.00596
Opus 5.5 $0.00005 $0.00238
Sonnet 5.5 $0.00002 $0.00119
Haiku 4.5 $0.00001 $0.00060

Measured 24d ago against content hash daf6ae51b44c, 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 24d ago.

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.

commands/ontology.md · 57 lines

What it actually says

Personal Knowledge Ontology

Read CLAUDE.md first. Work from the cloned llm-brain repository and use scripts/ontology.py. This command describes knowledge and existing commands; it does not execute actions from the catalog.

User intent Script operation Writes
ontology 점검해줘 validate none
ontology bundle 만들어줘 validate, then export ontology/ only
claim:alpha-1 근거를 설명해줘 explain --id claim:alpha-1 none
uv run python scripts/ontology.py validate
uv run python scripts/ontology.py export
uv run python scripts/ontology.py explain --id page:alpha
uv run python scripts/ontology.py explain --bundle examples/ontology-bundle-example.json --id claim:alpha-1 --json

Inspect the strict contracts and validation counts before export. A nonempty wiki requires a valid persisted claim ledger. On invalid inventory, report the safe read-only recovery command uv run python scripts/claims.py build --help. A build requires explicit --slug selections; rebuilding claims is a separate write and must stay within the user's request.

For a multi-source page, use the explicit B1 workflow after the user requests ledger creation. Keep the proposal private, review unresolved entries, and include every slug whose records should remain in the replaced ledger:

mkdir -p ontology
uv run python scripts/claims.py propose --slug alpha > ontology/claim-source-map.json
uv run python scripts/claims.py build --slug alpha --source-map ontology/claim-source-map.json

The read-only proposal first separates structural fragments as non_statement without renumbering claim IDs, then chooses a unique exact raw-file match. It does not prove semantic truth. Ambiguous/unmatched candidates remain unresolved. Build rechecks page, statement and raw hashes and the exact line before writing; zero mapped records preserve the previous ledger. Old multi-source records without a binding are still invalid. See schema/claim_ledger.md.

Report the exact written path and source_fingerprint. Generated bundles contain private claim statements. Export is private and does not authorize sharing. Never run okf --share, publish a bundle, or change any external system as a side effect. The existing OKF share approval gate remains separate.

Observations are optional, redacted projections of fail-soft episode history. Do not call them mandatory audit events or use them for permission/approval. No raw/wiki bodies, episode goals, input/output prose, or notes enter the bundle. Validate and explain never export or record episodes.

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. 24d ago First seen · 57 lines · 12 tokens per session scan A daf6ae51b44c

Subscribe to this mod's changes

ontology is a command published in the GitHub repository kimsanguine/llm-brain (10 stars, last pushed 17d ago), licensed MIT. It adds 12 tokens to every session and 596 once invoked, about $0.0000 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-11-06.

Related

ontology compared with commands from other repositories

ontology next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ontologykimsanguine/llm-brainCommand1017d agoMITA12Claude Code
onboardjohnfkoo951/cmds-llm-wikiCommand1061mo agononeA139Claude Code
refresh-contextjohnfkoo951/cmds-llm-wikiCommand1061mo agononeA43Claude Code
obsidian-ingesteugeniughelbur/obsidian-second-brainCommand5.5ktodayMITA24Claude Code
obsidian-healtheugeniughelbur/obsidian-second-brainCommand5.5ktodayMITA22Claude Code
obsidian-visualizeeugeniughelbur/obsidian-second-brainCommand5.5ktodayMITA20Claude Code
research-deepeugeniughelbur/obsidian-second-brainCommand5.5ktodayMITA46Claude Code