knowledge-graph

knowledge-graph is a command for Claude Code from LeeYudok/agents-scaffold. It costs 0 tokens per session (312 once invoked), scanned A, original, MIT.

A visual map of how project guidance files are connected, including rules, memories, agents, skills, commands, and workflows. It generates a local HTML dashboard and can check whether their links still work.

In plain words
What is it for?
Use it to regenerate the project’s knowledge-graph dashboard, inspect references between guidance files, or run a link-consistency check in continuous integration (automated project checks).
Why use it?
Large projects can make it difficult to understand which instructions refer to each other or contain broken links. The map helps new contributors get oriented and helps maintainers find documentation problems.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions AGENTS.md.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 .claude/scripts/knowledge_graph.py.

Good fit Use it to regenerate the project’s knowledge-graph dashboard, inspect references between guidance files, or run a link-consistency check in continuous integration (automated project checks).

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/LeeYudok/agents-scaffold
agentmods
npx agentmods add commands/leeyudok/agents-scaffold/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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/leeyudok/agents-scaffold/knowledge-graph"><img src="https://agentmods.dev/badge/commands/leeyudok/agents-scaffold/knowledge-graph.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 312 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.00000 $0.00312
Opus 5.5 $0.00000 $0.00125
Sonnet 5.5 $0.00000 $0.00062
Haiku 4.5 $0.00000 $0.00031

Measured 1mo ago against content hash ac7218f33f69, 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 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 1mo 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/commands/knowledge-graph.md · 29 lines

What it actually says

/knowledge-graph — .claude 지식 그래프 재생성·열람

AGENTS.md 생태계(rules·memory·agents·skills·commands·workflows)의 연결 구조를 1장의 대시보드로 뽑는다. 온보딩·문서 정합성 점검용.

절차

  1. 생성:

    python3 .claude/scripts/knowledge_graph.py
    

    docs/knowledge-graph.html 갱신 (노드·간선·깨진 링크 수를 stdout 으로 보고).

  2. 열람 — 로컬 정적 서빙:

    python3 -m http.server -d docs 8899
    

    → http://localhost:8899/knowledge-graph.html (팬/줌/드래그, 노드 클릭 = 참조/피참조 상세)

  3. 링크 정합성만 빠르게 (깨진 링크 있으면 exit 1 — CI 게이트로 사용 가능):

    python3 .claude/scripts/knowledge_graph.py --check
    

주의

  • HTML 은 생성 시점 스냅샷 — 문서 구조를 바꿨으면 재생성 후 함께 커밋.
  • 갱신 커밋은 이슈 없이도 가능하나 main 직접 커밋 금지(브랜치+PR/MR).
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. 1mo ago First seen · 29 lines · 0 tokens per session scan A ac7218f33f69

Subscribe to this mod's changes

knowledge-graph is a command published in the GitHub repository LeeYudok/agents-scaffold (36 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 312 tokens. 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.