A skill for AI agents
Ontology gives your agent's memory a skeleton. Use create and relate to store people, projects, and tasks as 16 typed entities joined by 15 named relations — then run one validate pass to check required fields, enums, forbidden properties, cardinality, and cycles. You do not get another Markdown file. You get a graph you can traverse, diff, and hand to another skill as-is.
One command to install · Open source · Requires Python 3.10+
Before / After
The prompt and output on the right were produced while this page was being made. Reproduced verbatim, unedited.
✓ Graph is valid.
3 entities written:
pers_b5ab78eb Person Alice Chen
proj_04932cc7 Project Website Redesign
task_6a18211f Task Rewrite homepage copy
3 relations created:
proj_04932cc7 --has_task--> task_6a18211f
proj_04932cc7 --has_owner--> pers_b5ab78eb
task_6a18211f --assigned_to--> pers_b5ab78eb
Core Capabilities
Entity and relation counts come from the skill's own schema reference, checked one by one.
Person, Project, Task, Event, Document, Credential and ten more. Each type declares its required fields and property types, so a record is a record — not a paragraph.
15 relation types, each declaring what it may connect to what. has_owner, has_task, and blocks are not string labels — they are traversable, checkable edges.
Required, enum, forbidden, cardinality, acyclic. Credential entities are forced to store a secret reference only — a plaintext password is flagged by name.
validate reports the entity id, the field name, and the cause — not a generic "something is wrong". In testing, all five classes were reported in a single call.
Each skill declares which types it reads and which it writes, and all of them share one graph. Add a skill without touching the others or breaking their data format.
Everything lands in graph.jsonl and schema.yaml inside your workspace. One line per operation: diffable, revertible, version-controllable. The script makes no network calls and reads no credential files.
create and relate do not validate on write. Invalid data is committed first and caught afterwards by validate — confirmed in testing: a record missing a required field and one holding an out-of-enum value were both written successfully, then reported. If you need validation at write time, wrap the calls.
Two behaviours described in the documentation are not implemented in the current code: task status transition checks and orphan-task warnings. The acyclic constraint only takes effect once the relation is declared in the schema.
Real Output
The first two were executed while this page was being made. The third follows the skill's documentation and has not been tested here; it is labelled as such.
$ ontology validate Graph is valid. $ ontology related --id proj_04932cc7 --rel has_task [ { "relation": "has_task", "entity": { "id": "task_6a18211f", "type": "Task", "properties": { "title": "Rewrite homepage copy", "status": "open" }, "created": "2026-09-16T07:42:56.082351+00:00", "updated": "2026-09-16T07:42:56.082351+00:00" } } ]
$ ontology validate Validation errors: - task_5bf72652: missing required property 'status' - task_61ec4b8e: 'status' must be one of ['open', 'in_progress', 'blocked', 'done'], got 'almost done' - cred_e549e590: contains forbidden property 'password' - blocks: cyclic dependency detected - has_task: to entity task_6a18211f violates cardinality one_to_many
How It Works
You supply the entities and the relations. The skill writes them into your workspace, one line per operation — appending, never overwriting.
schema-append writes required fields, enum values, forbidden fields, relation cardinality, and whether a relation must stay acyclic.
schema-append --data '{...}'
Give a type and its properties; get back an entity with an id and a timestamp.
create --type Person --props '{"name":"Alice Chen"}'
Relation types come from the 15 predefined kinds, each restricting what may connect to what.
relate --from proj_xxx --rel has_owner --to pers_xxx
query filters by type and condition, get fetches by id, and related walks a named relation.
related --id proj_xxx --rel has_task
One pass lists every violation with entity id, field name, and cause.
validate
Who & When
PRIMARY USER
You are wiring several skills into one pipeline: what the announcement-fetching skill produces has to be usable by the analysis skill, and what the analysis skill writes has to be readable by the report skill. Today every one of those handoffs is hand-built.
SECONDARY USER
Your agent remembers isolated facts but cannot answer "who owns this". Every new session means re-explaining the relationships and the context, and the explanations pile up across dozens of notes until nothing is findable.
Give your agent's memory a skeleton. Store the relationships, not just the sentences.
clawhub.ai/oswalpalash/skills/ontologyWhat you provide: the entities you want your agent to remember, and the relationships between them. Optionally a rule set — which fields are required, which values a status may take.
What you get back: a persistent, validated knowledge graph that other skills can read and write directly, plus a rule file you can audit at any time.