llm-wiki-agent: Command for Claude Code

.claude/commands/wiki-graph.md

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

A command that builds a knowledge graph, a visual map of pages and the links or relationships between them, from an LLM Wiki.

In plain words
What is it for?
Use it to create graph data and a browser-based visualization showing page types, relationships, connected hubs, and possible communities.
Why use it?
It turns scattered wiki links and inferred connections into searchable files and an interactive diagram.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is regexp-lin/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 →

Reuse

Borrowing it

Nothing to install: this file belongs to regexp-lin/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/regexp-lin/llm-wiki-agent/main/.claude/commands/wiki-graph.md
Clone the repo
git clone --depth 1 https://github.com/regexp-lin/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/regexp-lin/llm-wiki-agent/wiki-graph.svg)](https://agentmods.dev/commands/regexp-lin/llm-wiki-agent/wiki-graph)
Your own site
<a href="https://agentmods.dev/commands/regexp-lin/llm-wiki-agent/wiki-graph"><img src="https://agentmods.dev/badge/commands/regexp-lin/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 88% copy Near-identical to another mod 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 7d ago against content hash 6aec39f26545, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, 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 7d 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

This is a copy

88% identical to wiki-graph — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

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

What it actually says

Build the LLM Wiki knowledge graph.

Usage: /wiki-graph

First try running: pnpm dev:graph --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. 7d ago First seen · 19 lines · 0 tokens per session scan A 6aec39f26545

Subscribe to this mod's changes

wiki-graph is a command published in the GitHub repository regexp-lin/llm-wiki-agent (15 stars, last pushed 5mo ago), 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. It is 88% identical to wiki-graph, differing in 2 lines, and is treated as a copy.