llm-wiki-agent: Command for Claude Code

.claude/commands/wiki-graph.md

wiki-graph is a command for Claude Code from SamurAIGPT/llm-wiki-agent. It costs 0 tokens per session (236 once invoked), scanned A, original, MIT.

A command for building a knowledge graph of an LLM Wiki, showing pages as nodes and their links as connections.

In plain words
What is it for?
Scanning wiki links, creating graph data and an interactive HTML view, labeling inferred relationships with confidence, and reporting the graph's main hubs.
Why use it?
It makes relationships across wiki pages easier to inspect and highlights both explicit links and possible missing connections.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is SamurAIGPT/llm-wiki-agent's own configuration. It tells Claude Code how to work on llm-wiki-agent 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 llm-wiki-agent configures →

About the project

LLM Wiki Agent is a coding-agent workflow that reads source documents and builds a persistent, interconnected wiki from the extracted knowledge. It is for people who want an agent to maintain a structured knowledge base from materials such as documents, web pages, and data files. The catalogue entries provide commands and instructions for ingesting, querying, checking, and visualizing that wiki.

SamurAIGPT/llm-wiki-agent · 3,497 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to SamurAIGPT/llm-wiki-agent. 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/SamurAIGPT/llm-wiki-agent/main/.claude/commands/wiki-graph.md
Clone the repo
git clone --depth 1 https://github.com/SamurAIGPT/llm-wiki-agent

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 wiki-graph

README.md
[![agentmods](https://agentmods.dev/badge/commands/samuraigpt/llm-wiki-agent/wiki-graph.svg)](https://agentmods.dev/commands/samuraigpt/llm-wiki-agent/wiki-graph)
Your own site
<a href="https://agentmods.dev/commands/samuraigpt/llm-wiki-agent/wiki-graph"><img src="https://agentmods.dev/badge/commands/samuraigpt/llm-wiki-agent/wiki-graph.svg" alt="Measured on agentmods" 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 236 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.00236
Opus 5 $0.00000 $0.00118
Sonnet 5 $0.00000 $0.00047
Haiku 4.5 $0.00000 $0.00024

Measured 8d ago against content hash 7ab9ddfdbe6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

wiki-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 8d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/commands/wiki-graph.md · 19 lines

What it actually says

Build the LLM Wiki knowledge graph.

Usage: /wiki-graph

First try running: python tools/build_graph.py --open

If that fails (missing dependencies), build the graph manually:

  1. Use Grep to find all [[wikilinks]] across every file in wiki/
  2. Build a nodes list: one node per wiki page, with id=relative-path, label=title, type from frontmatter
  3. Build an edges list: one edge per [[wikilink]], tagged EXTRACTED
  4. Infer additional implicit relationships between pages not captured by wikilinks — tag these INFERRED with a confidence score (0.0–1.0); tag low-confidence ones AMBIGUOUS
  5. Write graph/graph.json with {nodes, edges, built: today}
  6. Write graph/graph.html as a self-contained vis.js page (nodes colored by type, edges colored by type, interactive, searchable)

After building, summarize: node count, edge count, breakdown by type, and the most connected nodes (hubs).

Append to wiki/log.md: ## [today's date] graph | Knowledge graph rebuilt

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. 8d ago First seen · 19 lines · 0 tokens per session scan A 7ab9ddfdbe6e

Subscribe to this mod's changes

wiki-graph is a command published in the GitHub repository SamurAIGPT/llm-wiki-agent (3,497 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 236 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.