building-knowledge-graph

building-knowledge-graph is a skill for Claude Code from jamesgray-ai/handsonai-plugins. It costs 200 tokens per session (5,371 once invoked), scanned A, original, MIT.

A guided skill for building a knowledge graph: a set of linked Markdown pages describing a person, team, or company and its work. It follows Google's Open Knowledge Format and supports collecting, querying, and checking those pages.

In plain words
What is it for?
Use it to create a knowledge folder, import source material, query the resulting information, and check that the pages follow the required format.
Why use it?
It gives scattered information about people, processes, tools, and policies a consistent structure that an AI can maintain and search.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Part of the handsonai plugin — 16 skills shipped together

Good fit Use it to create a knowledge folder, import source material, query the resulting information, and check that the pages follow the required format.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jamesgray-ai/handsonai-plugins/building-knowledge-graph
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.

Any agent
npx skills add jamesgray-ai/handsonai-plugins --skill building-knowledge-graph
Clone the repo
git clone --depth 1 https://github.com/jamesgray-ai/handsonai-plugins

Made for: Claude Code.

Or install handsonai, the plugin that ships this one along with the rest of its 16 skills.

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 building-knowledge-graph

README.md
[![agentmods](https://agentmods.dev/badge/skills/jamesgray-ai/handsonai-plugins/building-knowledge-graph/github.svg)](https://agentmods.dev/skills/jamesgray-ai/handsonai-plugins/building-knowledge-graph)
Your own site
<a href="https://agentmods.dev/skills/jamesgray-ai/handsonai-plugins/building-knowledge-graph"><img src="https://agentmods.dev/badge/skills/jamesgray-ai/handsonai-plugins/building-knowledge-graph/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for building-knowledge-graph

Your own site · 80×15
<a href="https://agentmods.dev/skills/jamesgray-ai/handsonai-plugins/building-knowledge-graph"><img src="https://agentmods.dev/badge/skills/jamesgray-ai/handsonai-plugins/building-knowledge-graph.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 200 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,371 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00200 $0.05371
Opus 5.5 $0.00080 $0.02148
Sonnet 5.5 $0.00040 $0.01074
Haiku 4.5 $0.00020 $0.00537

Measured 4d ago against content hash 3d9af55cad64, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

building-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 4d 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.

plugins/handsonai/skills/building-knowledge-graph/SKILL.md · 166 lines

How it starts

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

Building Knowledge Graph

Build the user's knowledge graph: a knowledge/ folder of markdown concept pages about the work a person, a team, or a company does, that the AI maintains from now on. The pattern is Andrej Karpathy's LLM wiki (three layers: raw sources, the wiki, the schema; three operations: ingest, query, lint). The file format is Google's Open Knowledge Format (OKF). This is a ~30-minute guided build that ends with a small real graph and all three operations run once against it.

Ground yourself in two sources before Phase 5, and read the latest version of each rather than working from memory:

  1. Karpathy's LLM-wiki note: https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
  2. The OKF specification: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/main/SPEC.md (raw: https://raw.githubusercontent.com/GoogleCloudPlatform/open-knowledge-format/main/SPEC.md)

If a page cannot be fetched, work from the distilled rules in references/build-spec.md.

This file is the map. references/interview-guide.md is the script for Phases 0–5 and the Close; references/build-spec.md is the exact shape of everything Phase 5 writes; references/example-knowledge-graph.md is a worked example that is shown to illustrate and never copied into the user's graph.

What this builds

<project folder>/                ← the user opens their AI here
├── .claude/skills/              ← Claude Code and the Claude desktop app (ChatGPT app: .agents/skills/)
│   ├── ingest/SKILL.md             fold a document into the pages it affects
│   └── lint/SKILL.md               sweep every page against SCHEMA.md
├── raw/                         ← source documents, read but never edited — OUTSIDE the bundle
├── knowledge/                   ← the OKF bundle
│   ├── <one folder per type>/
│   │   └── <one page per concept>.md
│   ├── notes/                      filed answers and knowledge with no other home
│   ├── overview.md                 the page you would hand a new hire
│   ├── index.md                    every page, one line each; okf_version in frontmatter
│   ├── log.md                      dated record of what changed
│   └── SCHEMA.md                   the rulebook: types, relationships, conventions
├── CLAUDE.md                    ← standing rules, read every session (ChatGPT app: AGENTS.md)
└── types.md                     ← the approved blueprint from Phase 4

Read the full file on GitHub · 166 lines

Files

What ships with it

3 files 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. 4d ago Changed 3d9af55cad64
  2. 9d ago Changed · +3 lines · +27 tokens per session edd8e8749c30
  3. 25d ago Changed 1753eff45688
  4. 1mo ago Changed · -1 lines d3f23ba944a4
  5. 1mo ago First seen · 164 lines · 173 tokens per session scan A 1f5f65bbf5eb

Subscribe to this mod's changes

building-knowledge-graph is a skill published in the GitHub repository jamesgray-ai/handsonai-plugins (8 stars, last pushed yesterday), licensed MIT. It adds 200 tokens to every session and 5,371 once invoked, about $0.0008 per session on Opus 5.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-09-22.

Related

building-knowledge-graph compared with skills from other repositories

building-knowledge-graph next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
building-knowledge-graphjamesgray-ai/handsonai-pluginsSkill8yesterdayMITA200Claude Code
knowledge-ingestopenclaw/openclawSkill394kyesterdayMITA80Claude Code, Codex
mem0-oss-to-platformmem0ai/mem0Skill68k2d agoApache-2.0A217Claude Code, Codex
forgetasgeirtj/system_prompts_leaksSkill71k2d agoCC0-1.0A74Claude Code, Codex
Cortexdanielmiessler/LifeOSSkill20kyesterdayMITA184Claude Code
memoryopensquilla/opensquillaSkill7.1k6d agoApache-2.0A44Claude Code, Codex
ha-data-storesshiwenwen/hope-agentSkill1.9kyesterdayMITA115Claude Code, Codex