claude-knowledge-graph: Agent for Claude Code

.claude/agents/knowledge-graph-manager.md

knowledge-graph-manager is an agent for Claude Code from kubony/claude-knowledge-graph. It costs 30 tokens per session (1,337 once invoked), scanned A, original, MIT.

A tool that turns Markdown notes into a linked knowledge graph, a structured map of people, projects, meetings, topics, and relationships. It lets you search that map with plain-language questions or SPARQL, a query language for linked data.

In plain words
What is it for?
Use it to convert a Markdown vault into RDF/Turtle files, find people or projects, inspect meeting history, and discover links between entities.
Why use it?
It removes the need to scan many notes manually or keep relationships only in your head. Converting notes into structured data makes connections easier to find.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; reads .claude/ paths.

This is kubony/claude-knowledge-graph's own configuration. It tells Claude Code how to work on claude-knowledge-graph itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-knowledge-graph configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python .claude/skills/ontology-engine/scripts/vault_to_ttl.py ./vault --output ./knowledge.ttl.

Reuse

Borrowing it

Nothing to install: this file belongs to kubony/claude-knowledge-graph. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kubony/claude-knowledge-graph/main/.claude/agents/knowledge-graph-manager.md
Clone the repo
git clone --depth 1 https://github.com/kubony/claude-knowledge-graph

Made for: Claude Code.

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-manager

README.md
[![agentmods](https://agentmods.dev/badge/agents/kubony/claude-knowledge-graph/knowledge-graph-manager/github.svg)](https://agentmods.dev/agents/kubony/claude-knowledge-graph/knowledge-graph-manager)
Your own site
<a href="https://agentmods.dev/agents/kubony/claude-knowledge-graph/knowledge-graph-manager"><img src="https://agentmods.dev/badge/agents/kubony/claude-knowledge-graph/knowledge-graph-manager/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 knowledge-graph-manager

Your own site · 80×15
<a href="https://agentmods.dev/agents/kubony/claude-knowledge-graph/knowledge-graph-manager"><img src="https://agentmods.dev/badge/agents/kubony/claude-knowledge-graph/knowledge-graph-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,337 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.00030 $0.01337
Opus 5.5 $0.00012 $0.00535
Sonnet 5.5 $0.00006 $0.00267
Haiku 4.5 $0.00003 $0.00134

Measured 2mo ago against content hash 626cf57156b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

knowledge-graph-manager 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 2mo 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.

.claude/agents/knowledge-graph-manager.md · 217 lines

How it starts

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

Knowledge Graph Manager

Convert markdown vault to RDF/TTL knowledge graph and query with SPARQL.

Overview

This agent transforms markdown files into a semantic knowledge graph (RDF/TTL format) and provides natural language querying via SPARQL.

Key Features

  1. Vault → TTL Conversion: Parse markdown files to RDF triples
  2. SPARQL Queries: 17+ preset queries for common use cases
  3. Natural Language Interface: Ask questions about your data

Trigger Phrases

  • "Build knowledge graph"
  • "Sync vault to TTL"
  • "Query the graph"
  • "Search for [keyword]"
  • "Show all [entities]"
  • "Find relationships"

Workflow

1. Build/Sync Knowledge Graph

Convert vault markdown files to TTL:

source .venv/bin/activate && \
python .claude/skills/ontology-engine/scripts/vault_to_ttl.py ./vault --output ./knowledge.ttl

What gets extracted:

  • Person: From persons/ folder (configurable)
  • Project: From projects/ folder (configurable)
  • Meeting: From ## YYYY.MM.DD heading sections
  • Organization: From filename pattern Name_Org.md
  • Topic: From hashtags and keywords in content
  • Relationships: From [[wikilinks]] → knows/involvedIn

2. Query Knowledge Graph

Run SPARQL queries:

source .venv/bin/activate && \
python .claude/skills/ontology-query/scripts/query_knowledge.py ./knowledge.ttl \
  --preset <preset_name> --param "<value>"

Query Presets

Person Queries

Preset Description Parameter
all_persons All persons -
person_meetings Meetings with person Name
person_topics Topics discussed with person Name
person_projects Projects person is involved in Name
person_network People person knows Name
org_members Members of organization Org name

Project Queries

Preset Description Parameter
all_projects All projects -
active_projects Non-archived projects -
archived_projects Archived projects -
project_details Project details Project name
project_meetings Project meetings Project name
project_participants Project members Project name
search_projects Search by keyword Keyword

Read the full file on GitHub · 217 lines

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. 2mo ago First seen · 217 lines · 30 tokens per session scan A 626cf57156b9

Subscribe to this mod's changes

knowledge-graph-manager is an agent published in the GitHub repository kubony/claude-knowledge-graph (48 stars, last pushed 10mo ago), licensed MIT. It adds 30 tokens to every session and 1,337 once invoked, about $0.0001 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-08-30.

Related

knowledge-graph-manager compared with agents from other repositories

knowledge-graph-manager next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
knowledge-graph-managerkubony/claude-knowledge-graphAgent4810mo agoMITA30Claude Code
context-finderfuturegerald/futuregerald-claude-pluginAgent72d agononeA107Claude Code
wiki-ingestkarlorz/llm-wikiAgent5yesterdaynoneA64Claude Code
memory-curatorwbind-core/termpipe-mcpAgent04d agononeA45Claude Code
data scientistkhalilbenaz/MDANAgent023d agoMITA8Claude Code
playwright-test-generatormicrosoft/playwrightAgent99kyesterdayApache-2.0A151Claude Code
.NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginnersAgent79k4d agoMITA33Claude Code