claude-knowledge-graph CLAUDE.md

claude-knowledge-graph CLAUDE.md is an instructions file for Claude Code from kubony/claude-knowledge-graph. It costs 1,402 tokens per session, scanned A, original, MIT.

Repository instructions for a system that converts Markdown notes into an RDF/TTL knowledge graph and queries it with SPARQL.

In plain words
What is it for?
Use them to manage knowledge-graph workflows, convert vault notes, synchronize changes, or run searches such as finding people and active projects.
Why use it?
They describe how notes become structured data and how the system builds, synchronizes, and searches that data.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

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 instructions/kubony/claude-knowledge-graph/claude-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 claude-knowledge-graph CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/kubony/claude-knowledge-graph/claude-md.svg)](https://agentmods.dev/instructions/kubony/claude-knowledge-graph/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/kubony/claude-knowledge-graph/claude-md"><img src="https://agentmods.dev/badge/instructions/kubony/claude-knowledge-graph/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,402 This file is loaded in full into every session.
When invoked 1,402 The same file — it is already loaded in full.
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.01402 $0.01402
Opus 5 $0.00701 $0.00701
Sonnet 5 $0.00280 $0.00280
Haiku 4.5 $0.00140 $0.00140

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

Security

Grade A, and why

claude-knowledge-graph CLAUDE.md 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.

CLAUDE.md · 280 lines

How it starts

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

CLAUDE.md

Claude Code 가이드 - 지식 그래프 자동화


개요

마크다운 노트를 RDF/TTL 지식 그래프로 변환하고 SPARQL로 질의하는 시스템.


에이전트

knowledge-graph-manager

메인 에이전트. 지식 그래프 생성 및 질의 워크플로우를 관리합니다.

트리거:

  • "지식 그래프 빌드해줘"
  • "그래프 동기화해줘"
  • "[이름]에 대해 알려줘"
  • "활성 프로젝트 보여줘"

워크플로우:

  1. TTL 파일 존재 확인
  2. 없으면 vault → TTL 변환
  3. SPARQL 질의 실행
  4. 결과 정리하여 응답

스킬

ontology-engine

마크다운 → TTL 변환.

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

옵션:

--persons-dir contacts     # 인물 폴더 (기본: persons)
--projects-dir work        # 프로젝트 폴더 (기본: projects)
--archives-dir old         # 아카이브 폴더 (기본: archives)

ontology-query

SPARQL 질의 실행.

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

대화형 모드:

python .claude/skills/ontology-query/scripts/query_knowledge.py ./knowledge.ttl --interactive

ontology-sync

간편 동기화 래퍼.

source .venv/bin/activate && \
python .claude/skills/ontology-sync/scripts/sync_vault.py

Python 환경

항상 venv 활성화 후 실행:

source .venv/bin/activate

의존성:

  • rdflib
  • pyyaml
  • python-dotenv

마크다운 형식

인물 파일

위치: vault/persons/

파일명: Name_Organization.md

---
title: John Doe
date: 2024-01-15
tags:
  - developer
  - AI
summary: Senior developer at Acme
contact:
  email: [email protected]
  linkedin: https://linkedin.com/in/john
last_contact: 2024-03-10
---

# John Doe

## Basic Info

소개 내용...

## Meeting Records

### 2024.03.10 Lunch

미팅 내용...

프로젝트 폴더

위치: vault/projects/YYMM ProjectName/

vault/projects/
├── 2401 AI Platform/
│   └── README.md
└── 2403 Mobile App/
    └── specs.md

프리셋 쿼리

인물

# 모든 인물
--preset all_persons

# 특정 인물 미팅
--preset person_meetings --param "John"

# 논의 주제
--preset person_topics --param "John"

# 참여 프로젝트
--preset person_projects --param "John"

# 아는 사람들
--preset person_network --param "John"

# 조직 소속
--preset org_members --param "Acme"

Read the full file on GitHub · 280 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. 6d ago First seen · 280 lines · 1,402 tokens per session scan A 83723da0fefe

Subscribe to this mod's changes

claude-knowledge-graph CLAUDE.md is an instructions file published in the GitHub repository kubony/claude-knowledge-graph (48 stars, last pushed 8mo ago), licensed MIT. It adds 1,402 tokens to every session, about $0.0070 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.