Knowledge Graph Skill
Three-Layer Memory System — automatic fact extraction, entity-based knowledge graph, and weekly synthesis.
How to use it
Claude Code
- Run the line below. It pulls the whole folder into
~/.claude/skills/knowledge-graph, including the files SKILL.md points to. - Describe your job in plain words. Claude Code follows the skill from there.
npx degit jdrhyne/agent-skills/clawdbot/knowledge-graph#main ~/.claude/skills/knowledge-graphFor one project only, change the path to .claude/skills/knowledge-graph. This skill also uses summary.md — copying SKILL.md alone won't be enough. See the folder on GitHub.
Claude (web or desktop app)
- On this page open ⋯ → Download .md.
- Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
- Pick the file and Save. Claude shows the name and description and runs a security scan.
- Check the skill is switched on.
- Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
- ChatGPT: make a Project and paste it into Instructions.
- Neither? Paste it at the top of a new chat — it works for that chat.
Not working?
- Check which app you pasted it into — the steps above name the right one.
- Some skills need the paid tier of Claude or ChatGPT.
Paste into Claude, ChatGPT or Cursor.
Source of Knowledge Graph Skill
Show the full text117 lines
| name | description | metadata | permissions |
|---|---|---|---|
| knowledge-graph | Three-Layer Memory System — automatic fact extraction, entity-based knowledge graph, and weekly synthesis. Manages life/areas/ entities with atomic facts and living summaries. | {"version":"1.1.0","openclaw":{"emoji":"🧠"}} | - exec: "Uses local filesystem commands when creating entity folders or scheduled knowledge-graph jobs. - file_write: "Appends facts, summaries, and daily-note synthesis inside the workspace knowledge graph. |
Knowledge Graph Skill
Maintain a lightweight, append-only entity graph that compounds durable facts across sessions.
When to Use
- Extract durable facts from recent work or conversation history
- Rewrite entity summaries from active facts
- Answer "what do we know about X?" without reopening large transcripts
- Keep shared context for people, companies, and projects inside the workspace
Data Model
Store the graph under:
<workspace>/life/areas/
people/<slug>/
companies/<slug>/
projects/<slug>/
Each entity folder should contain:
summary.mdfor the short, current snapshotfacts.jsonlfor atomic, append-only facts
Use one JSON object per line:
{
"id": "<slug>-NNN",
"fact": "Plain-English fact",
"category": "relationship|milestone|status|preference|context|decision",
"ts": "YYYY-MM-DD",
"source": "conversation|manual|inference",
"status": "active|superseded",
"supersedes": "<older-id>"
}
Fact Rules
- Keep facts atomic. One durable fact per entry.
- Append new facts instead of rewriting history.
- When something changes, add a new fact and mark the old one as superseded.
- Skip ephemera, greetings, speculation, and low-value chatter.
- Check existing facts before adding duplicates.
Durable facts usually include:
- role or relationship changes
- key decisions
- long-lived preferences
- major project milestones
- stable operating context
Workflows
Fact Extraction
- Read the recent daily note and the recent conversation window.
- Identify durable facts worth preserving.
- Resolve entity type and slug.
- Create the entity folder if it does not exist.
- Append new facts to
facts.jsonl. - Note extraction activity in the daily note if the workspace uses one.
Weekly Synthesis
- List entities changed during the week.
- Load active facts only.
- Rewrite
summary.mdin 3 to 8 concise lines. - Ensure contradicted facts are marked superseded.
- Record a short synthesis note in the daily log if applicable.
Entity Lookup
- Read
summary.mdfirst. - Open
facts.jsonlonly if the summary is stale or the user asked for detail. - Fall back to broader memory search only when the entity is missing from the graph.
Low-Token Recall
Recall should be triggered, not automatic.
- Recall when the user names a tracked person, company, or project.
- Recall when the user explicitly asks to remember, recall, or summarize prior context.
- Inject only the short summary by default.
- Avoid loading raw facts unless the user asked for specifics or contradictions need resolution.
Setup
Create the core directories once:
mkdir -p life/areas/people life/areas/companies life/areas/projects
If multiple agents share one workspace, point them at the same life/ directory so they operate on the same entity store.
Safety Boundaries
- Do not store sensitive secrets, credentials, or highly personal data unless the user explicitly asked for it.
- Do not create entities or facts for casual chat that has no durable value.
- Do not inject the graph into every conversation by default.
- Do not delete historical facts; supersede them with a newer fact instead.
| 1 | |
| 2 | name knowledge-graph |
| 3 | description Three-Layer Memory System — automatic fact extraction, entity-based knowledge graph, and weekly synthesis. Manages life/areas/ entities with atomic facts and living summaries. |
| 4 | metadata {"version":"1.1.0","openclaw":{"emoji":"🧠"}} |
| 5 | permissions |
| 6 | - exec: "Uses local filesystem commands when creating entity folders or scheduled knowledge-graph jobs." |
| 7 | - file_write: "Appends facts, summaries, and daily-note synthesis inside the workspace knowledge graph." |
| 8 | |
| 9 | |
| 10 | # Knowledge Graph Skill |
| 11 | |
| 12 | Maintain a lightweight, append-only entity graph that compounds durable facts across sessions. |
| 13 | |
| 14 | ## When to Use |
| 15 | |
| 16 | Extract durable facts from recent work or conversation history |
| 17 | Rewrite entity summaries from active facts |
| 18 | Answer "what do we know about X?" without reopening large transcripts |
| 19 | Keep shared context for people, companies, and projects inside the workspace |
| 20 | |
| 21 | ## Data Model |
| 22 | |
| 23 | Store the graph under: |
| 24 | |
| 25 | |
| 26 | <workspace>/life/areas/ |
| 27 | people/<slug>/ |
| 28 | companies/<slug>/ |
| 29 | projects/<slug>/ |
| 30 | |
| 31 | |
| 32 | Each entity folder should contain: |
| 33 | |
| 34 | `summary.md` for the short, current snapshot |
| 35 | `facts.jsonl` for atomic, append-only facts |
| 36 | |
| 37 | Use one JSON object per line: |
| 38 | |
| 39 | |
| 40 | { |
| 41 | "id": "<slug>-NNN", |
| 42 | "fact": "Plain-English fact", |
| 43 | "category": "relationship|milestone|status|preference|context|decision", |
| 44 | "ts": "YYYY-MM-DD", |
| 45 | "source": "conversation|manual|inference", |
| 46 | "status": "active|superseded", |
| 47 | "supersedes": "<older-id>" |
| 48 | } |
| 49 | |
| 50 | |
| 51 | ## Fact Rules |
| 52 | |
| 53 | Keep facts atomic. One durable fact per entry. |
| 54 | Append new facts instead of rewriting history. |
| 55 | When something changes, add a new fact and mark the old one as superseded. |
| 56 | Skip ephemera, greetings, speculation, and low-value chatter. |
| 57 | Check existing facts before adding duplicates. |
| 58 | |
| 59 | Durable facts usually include: |
| 60 | |
| 61 | role or relationship changes |
| 62 | key decisions |
| 63 | long-lived preferences |
| 64 | major project milestones |
| 65 | stable operating context |
| 66 | |
| 67 | ## Workflows |
| 68 | |
| 69 | ### Fact Extraction |
| 70 | |
| 71 | Read the recent daily note and the recent conversation window. |
| 72 | Identify durable facts worth preserving. |
| 73 | Resolve entity type and slug. |
| 74 | Create the entity folder if it does not exist. |
| 75 | Append new facts to `facts.jsonl`. |
| 76 | Note extraction activity in the daily note if the workspace uses one. |
| 77 | |
| 78 | ### Weekly Synthesis |
| 79 | |
| 80 | List entities changed during the week. |
| 81 | Load active facts only. |
| 82 | Rewrite `summary.md` in 3 to 8 concise lines. |
| 83 | Ensure contradicted facts are marked superseded. |
| 84 | Record a short synthesis note in the daily log if applicable. |
| 85 | |
| 86 | ### Entity Lookup |
| 87 | |
| 88 | Read `summary.md` first. |
| 89 | Open `facts.jsonl` only if the summary is stale or the user asked for detail. |
| 90 | Fall back to broader memory search only when the entity is missing from the graph. |
| 91 | |
| 92 | ## Low-Token Recall |
| 93 | |
| 94 | Recall should be triggered, not automatic. |
| 95 | |
| 96 | Recall when the user names a tracked person, company, or project. |
| 97 | Recall when the user explicitly asks to remember, recall, or summarize prior context. |
| 98 | Inject only the short summary by default. |
| 99 | Avoid loading raw facts unless the user asked for specifics or contradictions need resolution. |
| 100 | |
| 101 | ## Setup |
| 102 | |
| 103 | Create the core directories once: |
| 104 | |
| 105 | |
| 106 | mkdir -p life/areas/people life/areas/companies life/areas/projects |
| 107 | |
| 108 | |
| 109 | If multiple agents share one workspace, point them at the same `life/` directory so they operate on the same entity store. |
| 110 | |
| 111 | ## Safety Boundaries |
| 112 | |
| 113 | Do not store sensitive secrets, credentials, or highly personal data unless the user explicitly asked for it. |
| 114 | Do not create entities or facts for casual chat that has no durable value. |
| 115 | Do not inject the graph into every conversation by default. |
| 116 | Do not delete historical facts; supersede them with a newer fact instead. |
| 117 |
Discussion
Browse more free Claude skills or everything in Operations.