# ontology

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3700 installs · ★ 670
- Author: sundial-org
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/sundial-org/awesome-openclaw-skills/tree/HEAD/skills/ontology/SKILL.md
- Updated: 2026-03-07
- HTML: https://affpapa.org/en/nevibecode/skills/ontology

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add sundial-org/awesome-openclaw-skills --skill ontology -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/ontology/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/ontology/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add sundial-org/awesome-openclaw-skills --skill ontology -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/ontology/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add sundial-org/awesome-openclaw-skills --skill ontology -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/ontology/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install sundial-org/awesome-openclaw-skills ontology
```

2. **Manually: put the files in place**
- File: `.github/skills/ontology/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add sundial-org/awesome-openclaw-skills --skill ontology -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/sundial-org/awesome-openclaw-skills --path skills/ontology
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/ontology/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add sundial-org/awesome-openclaw-skills --skill ontology -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/sundial-org/awesome-openclaw-skills/tree/HEAD/skills/ontology/SKILL.md

## When to use it
- 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
- Remember that Alice owns the Website Redesign project.
- What do I know about task_001?
- Link proj_001 to p_001 with has_owner.

## Similar
- [memory-curate](https://affpapa.org/en/nevibecode/skills/memory-curate.md) — skill · 1300 installs
- [ontology-term-resolution](https://affpapa.org/en/nevibecode/skills/ontology-term-resolution.md) — skill · 948 installs
- [memory-engineering](https://affpapa.org/en/nevibecode/skills/memory-engineering.md) — skill · 29 installs
- [primekg](https://affpapa.org/en/nevibecode/skills/primekg.md) — skill · 1900 installs
- [honcho-integration](https://affpapa.org/en/nevibecode/skills/honcho-integration.md) — skill · 882 installs
- [mini-context-graph](https://affpapa.org/en/nevibecode/skills/mini-context-graph.md) — skill · 72 installs

From the same set: [sundial-org/awesome-openclaw-skills](https://affpapa.org/en/nevibecode/by/sundial-org/awesome-openclaw-skills.md) — 12 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
