knowledge-graph

knowledge-graph is a skill for Claude Code, Codex from jdrhyne/agent-skills. It costs 37 tokens per session (831 once invoked), scanned A, original, MIT.

A three-layer memory system that stores facts about people, companies, and projects in an entity-based knowledge graph, a connected record of related information.

In plain words
What is it for?
Extract facts, update entity summaries, and answer what is known about an entity using organised files for areas, people, companies, and projects.
Why use it?
It keeps durable facts and current summaries available across sessions without reopening long conversation histories.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/jdrhyne/agent-skills/knowledge-graph
Any agent
npx skills add jdrhyne/agent-skills --skill knowledge-graph
Clone the repo
git clone --depth 1 https://github.com/jdrhyne/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for knowledge-graph

README.md
[![agentmods](https://agentmods.dev/badge/skills/jdrhyne/agent-skills/knowledge-graph.svg)](https://agentmods.dev/skills/jdrhyne/agent-skills/knowledge-graph)
Your own site
<a href="https://agentmods.dev/skills/jdrhyne/agent-skills/knowledge-graph"><img src="https://agentmods.dev/badge/skills/jdrhyne/agent-skills/knowledge-graph.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 831 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.00831
Opus 5 $0.00018 $0.00415
Sonnet 5 $0.00007 $0.00166
Haiku 4.5 $0.00004 $0.00083

Measured 6d ago against content hash 6e6800f7e1ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

knowledge-graph scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

clawdbot/knowledge-graph/SKILL.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 117 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 117 lines · 37 tokens per session scan A 6e6800f7e1ae

Subscribe to this mod's changes

knowledge-graph is a skill published in the GitHub repository jdrhyne/agent-skills (241 stars, last pushed 6d ago), licensed MIT. It adds 37 tokens to every session and 831 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.