Knowledge Graph Skill

Three-Layer Memory System — automatic fact extraction, entity-based knowledge graph, and weekly synthesis.

How to use it

Claude Code
  1. Run the line below. It pulls the whole folder into ~/.claude/skills/knowledge-graph, including the files SKILL.md points to.
  2. Describe your job in plain words. Claude Code follows the skill from there.
Claude Code — installs the whole folder, not just SKILL.md
npx degit jdrhyne/agent-skills/clawdbot/knowledge-graph#main ~/.claude/skills/knowledge-graph

For 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)
  1. On this page open ⋯ → Download .md.
  2. Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
  3. Pick the file and Save. Claude shows the name and description and runs a security scan.
  4. Check the skill is switched on.
  5. Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
  1. ChatGPT: make a Project and paste it into Instructions.
  2. 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.
Step-by-step guide with screenshots · Ask in the forum

Paste into Claude, ChatGPT or Cursor.

Source of Knowledge Graph Skill

Show the full text117 lines
namedescriptionmetadatapermissions
knowledge-graphThree-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.md for the short, current snapshot
  • facts.jsonl for 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
  1. Read the recent daily note and the recent conversation window.
  2. Identify durable facts worth preserving.
  3. Resolve entity type and slug.
  4. Create the entity folder if it does not exist.
  5. Append new facts to facts.jsonl.
  6. Note extraction activity in the daily note if the workspace uses one.
Weekly Synthesis
  1. List entities changed during the week.
  2. Load active facts only.
  3. Rewrite summary.md in 3 to 8 concise lines.
  4. Ensure contradicted facts are marked superseded.
  5. Record a short synthesis note in the daily log if applicable.
Entity Lookup
  1. Read summary.md first.
  2. Open facts.jsonl only if the summary is stale or the user asked for detail.
  3. 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---
2name: knowledge-graph
3description: Three-Layer Memory System — automatic fact extraction, entity-based knowledge graph, and weekly synthesis. Manages life/areas/ entities with atomic facts and living summaries.
4metadata: {"version":"1.1.0","openclaw":{"emoji":"🧠"}}
5permissions:
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 
12Maintain 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 
23Store the graph under:
24 
25```text
26<workspace>/life/areas/
27 people/<slug>/
28 companies/<slug>/
29 projects/<slug>/
30```
31 
32Each entity folder should contain:
33 
34- `summary.md` for the short, current snapshot
35- `facts.jsonl` for atomic, append-only facts
36 
37Use one JSON object per line:
38 
39```json
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 
59Durable 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 
711. Read the recent daily note and the recent conversation window.
722. Identify durable facts worth preserving.
733. Resolve entity type and slug.
744. Create the entity folder if it does not exist.
755. Append new facts to `facts.jsonl`.
766. Note extraction activity in the daily note if the workspace uses one.
77 
78### Weekly Synthesis
79 
801. List entities changed during the week.
812. Load active facts only.
823. Rewrite `summary.md` in 3 to 8 concise lines.
834. Ensure contradicted facts are marked superseded.
845. Record a short synthesis note in the daily log if applicable.
85 
86### Entity Lookup
87 
881. Read `summary.md` first.
892. Open `facts.jsonl` only if the summary is stale or the user asked for detail.
903. Fall back to broader memory search only when the entity is missing from the graph.
91 
92## Low-Token Recall
93 
94Recall 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 
103Create the core directories once:
104 
105```bash
106mkdir -p life/areas/people life/areas/companies life/areas/projects
107```
108 
109If 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

Alternatives

Also in Notes & knowledgeSee all 58 in Operations →