New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Three-Layer Memory System

Knowledge Graph Skill

by jdrhyne · MIT license · ★ 240 on GitHub · updated Aug 30

Knowledge Graph Skill cover

Three-Layer Memory System — automatic fact extraction, entity-based knowledge graph, and weekly synthesis. Manages life/areas/ entities with atomic facts and living summaries.

---
name: knowledge-graph
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.
metadata: {"version":"1.1.0","openclaw":{"emoji":"🧠"}}
permissions:
  - 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

Overview

Maintain a lightweight, append-only entity graph that compounds durable facts across sessions.

Manual install (npx, ZIP)
Claude Codenpx skills add jdrhyne/agent-skills --skill knowledge-graph -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/jdrhyne/agent-skills/tar.gz/439cd3a9da78 \ | tar -xz -C ~/.claude/skills --strip-components=2 agent-skills-439cd3a9da78/clawdbot/knowledge-graph
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/c5cc3475efa2a87837a8/knowledge-graph.zip" -OutFile "$env:TEMP\knowledge-graph.zip"; Expand-Archive "$env:TEMP\knowledge-graph.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md3.6 KB
  • README.md5.2 KB
Read the files here
jdrhyne/439cd3a2 files
SKILL.md
Show the full text117 lines

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 
View all files on GitHub →

Details

Updated
Aug 30, 2026
License
MIT
Stars on the repo
★ 240
Checked
Source
jdrhyne/agent-skills ↗
Creator
jdrhyne · 24 listings
View creator

Similar skills

See all →
SkillExport the Obsidian wiki's knowledge graph to structuredWiki Export — Knowledge Graph ExportAr9av/obsidian-wiki · by Ar9avExport the Obsidian wiki's knowledge graph to structured formats for use in external tools. Use this skill when the user says "export wiki", "export graph", "export to JSON", "export to Gephi", export to Neo4j", "export to Postgres", "export to SQL", "graphml", "visualize wiki", knowledge graph export", "export to OKF", "OKF bundle", "open knowledge format", export as markdown bundle", or wants to use their wiki data in another tool. Outputs graph.json, graph.graphml, cypher.txt (Neo4j), postgres.sql (Postgres), and graph.html (interactive browser visualization) into a wiki-export/ directory at the vault root, plus an optional OKF (Open Knowledge Format) markdown bundle under wiki-export/okf/.★ 3.5k GitHub starsSkillImport a wiki knowledge graph into the current vaultWiki Import — Reconstruct Pages from an ExportAr9av/obsidian-wiki · by Ar9avImport a wiki knowledge graph into the current vault — either from a graph.json export file (stubs) or from an OKF (Open Knowledge Format) markdown bundle (full page bodies). Use this skill when the user says "import wiki", "import from export", "load graph.json", import vault", "import OKF bundle", "import OKF", "load OKF", "import markdown bundle", /wiki-import", or wants to transfer pages from one vault to another using the output of wiki-export.★ 3.5k GitHub starsSkillYour team's shared, AI-ready knowledge base/company-brain — Team-shared AI-ready knowledge basecoreyhaines31/makerskills · by coreyhaines31Your team's shared, AI-ready knowledge base — people, companies, meetings, SOPs, and decisions structured so an agent can answer on your team's behalf. Team-scope sibling to second-brain. Modes — capture, compile (wiki pages + INDEX.md), query (trust-weighted, saved to outputs/), review (verify / deprecate / supersede stale captures), lint, connect, search. Structured raw dirs (people/, companies/, meetings/, sops/, decisions/, customer-language/, sales-objections/). Every capture stamps author, timestamp, and trust status. Optional sync from call transcripts, Slack/email exports, CRM. Vault at ${COMPANY_BRAIN_VAULT:-$HOME/Documents/CompanyBrain}/. Triggers on "/company-brain," "/cb," "capture this into the team brain," "log this meeting," "save this SOP," "compile the company wiki," "query the team brain," "what does the team know about X," "review the company brain," "lint the company brain," "who's the internal expert on X.★ 855 GitHub starsSkillGive Claude a permanent, searchable long-term memoryAI Brain — persistent memory for Claude via ObsidianOotto-AI/claude-content-skills · by Ootto-AIGive Claude a permanent, searchable long-term memory using an Obsidian vault as the store. At the end of a session, summarize what mattered and save it as a Markdown note in your "AI Brain" vault; at the start of a session (or on demand), read back only the relevant past notes. Local markdown you own — connected via the Filesystem MCP. Trigger with "wrap up", "save this session", or "remember this".★ 139 GitHub starsSkillFind prior Claude Code and Codex sessions with an indexed/recall: session memory engineParcha-ai/parcha-skills · by Parcha-aiFind prior Claude Code and Codex sessions with an indexed local search engine, then continue the work, repeat it with fresh inputs, or distill it into a skill. Runs from Claude Code, Codex, or pi; the current index covers Claude Code and Codex transcripts. Use when the user names Recall, says "find that conversation where…", "what did we do last time about…", "continue what we did yesterday on X", "what did codex do on this branch", "turn what we did about Y into a skill", or "remember when you…". Not for searching code (use grep on the repo) or for facts already in MEMORY.md.★ 62 GitHub starsMCPA basic implementation of persistent memory using a localKnowledge Graph Memory Servermodelcontextprotocol/servers · by modelcontextprotocolA basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across…★ 90.5k GitHub stars

More from jdrhyne

SkillRun Codex CLI or references OpenAI Codex for code analysisCodex Skill Guidejdrhyne/agent-skills · by jdrhyneUse when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing. Uses GPT-5.2 by default for state-of-the-art software engineering.★ 240 GitHub starsSkillCreating a Claude Code slash commandCommand creatorjdrhyne/agent-skills · by jdrhyneThis skill should be used when creating a Claude Code slash command. Use when users ask to "create a command", "make a slash command", "add a command", or want to document a workflow as a reusable command. Essential for creating optimized, agent-executable slash commands with proper structure and best practices.★ 240 GitHub starsSkillRecover missing conversation context after explicitContext recoveryjdrhyne/agent-skills · by jdrhyneRecover missing conversation context after explicit compaction or truncation, or when the user explicitly asks to recover prior work. Use for requests such as "where were we before compaction?" when the current thread is insufficient. Do not trigger on a generic "continue" when the current thread already provides an actionable next step.★ 240 GitHub starsSkillGenerate beautifully designed PDF reportsElegant reportsjdrhyne/agent-skills · by jdrhyneGenerate beautifully designed PDF reports with a Nordic/Scandinavian aesthetic. Use when creating polished executive briefings, analysis reports, or presentation-style PDF outputs from markdown and HTML via Nutrient DWS.★ 240 GitHub starsSkillRead Google Analytics 4 reporting data through the GA4 DataGA4 Data APIjdrhyne/agent-skills · by jdrhyneRead Google Analytics 4 reporting data through the GA4 Data API. Use for explicit GA4 property metadata, compatible metric/dimension reports, traffic analysis, key events, quotas, and bounded exports.★ 240 GitHub starsSkillBulk download images from login-protected gallery websitesGallery scraperjdrhyne/agent-skills · by jdrhyneBulk download images from login-protected gallery websites using an attached browser session. Use when asked to scrape, download, or save images from authenticated gallery pages, extract full-size images from thumbnails, or batch download from multi-page galleries.★ 240 GitHub stars