Skip to main content
skill CX Codex

ontology — Claude Code skill: a typed knowledge graph for agent memory

This skill keeps agent memory as a typed graph of entities and relations, validating every change against type constraints. Useful when several skills need to share state.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add sundial-org/awesome-openclaw-skills --skill ontology -a claude-code
Open on GitHub

What ontology does

The skill models agent memory as entities with a type, properties and relations. Every mutation is checked against type constraints before it lands, so you won't end up with a task missing its status or an event ending before it starts. The vocabulary is already defined: Person, Organization, Project, Task, Goal, Event, Document, Message, Note, Account, Credential and more.

Storage defaults to memory/ontology/graph.jsonl, one operation per line. You work through scripts/ontology.py: create an entity, query by condition, fetch by id, relate two entities, validate constraints. The skill recommends describing required fields and status enums in memory/ontology/schema.yaml. For complex graphs it suggests migrating to SQLite.

Secrets stay out of the graph. The Credential type requires service and secret_ref, and properties like password or token are forbidden, so you keep an indirection instead of a plaintext secret. Python 3 is required, since every operation runs through python3 scripts/ontology.py. Multi-step plans the skill suggests modelling as a sequence of graph operations, with rollback when a constraint fails.

What it helps with

  • remember a fact about a person or project and find it later
  • link a task to its project and assignee
  • pull every open task matching a condition
  • trace dependencies and find blocking tasks
  • hand shared state from one skill to another

Example prompts for the agent

  • Remember that Alice owns the Website Redesign project.
  • What do I know about task_001?
  • Link proj_001 to p_001 with has_owner.

How to install ontology

1Skills CLI (Vercel)

npx skills add sundial-org/awesome-openclaw-skills --skill ontology -a claude-code

2Manually: put the files in place

~/.claude/skills/ontology/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ontology/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ontology

How do I install ontology in Claude?

Run npx skills add sundial-org/awesome-openclaw-skills --skill ontology -a claude-code. The skill lands in ~/.claude/skills/ontology/SKILL.md.

What does the ontology skill do?

It keeps agent memory as a typed graph of entities and relations. Each write is validated against type constraints, and skills can read and write shared objects.

Where is the graph stored?

By default in memory/ontology/graph.jsonl, one operation per line. Type constraints go in memory/ontology/schema.yaml, and the skill suggests SQLite for complex graphs.

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set10

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor