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.
npx agentmods add commands/pratiyush/llm-wiki/wiki-graphgit clone --depth 1 https://github.com/Pratiyush/llm-wikiWrote 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.
[](https://agentmods.dev/commands/pratiyush/llm-wiki/wiki-graph)<a href="https://agentmods.dev/commands/pratiyush/llm-wiki/wiki-graph"><img src="https://agentmods.dev/badge/commands/pratiyush/llm-wiki/wiki-graph.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00585 |
| Opus 5 | $0.00000 | $0.00293 |
| Sonnet 5 | $0.00000 | $0.00117 |
| Haiku 4.5 | $0.00000 | $0.00059 |
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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Generate a knowledge graph of the wiki — nodes are pages, edges are [[wikilinks]].
Usage: /wiki-graph [format]
$ARGUMENTS is one of: json, html, or both (default: both).
The graph tool walks every file under wiki/ looking for [[wikilink]] references, builds a node-and-edge list, and writes:
graph/graph.json— canonical data:{nodes: [...], edges: [...]}graph/graph.html— interactive vis.js visualisation you can open in a browser
Steps
-
Ensure the Python graph builder exists at
llmwiki/graph.py. If it doesn't, create it (see "Fallback" below for a pure-agent version). -
Run:
python3 -m llmwiki graph $ARGUMENTS -
Read
graph/graph.jsonafter it runs and report to the user:- Total node count (pages)
- Total edge count (wikilinks)
- Top 5 most-linked pages (entities or concepts with the highest in-degree)
- Top 5 most-linking pages (sources with the highest out-degree)
- Any orphan nodes (zero inbound edges)
- Any broken edges (links to pages that don't exist) — cross-check with
/wiki-lint
-
If the user asked for
htmlorboth, offer to opengraph/graph.htmllocally withpython3 -m llmwiki serve --dir graph --port 8766. -
Append to
wiki/log.md:## [YYYY-MM-DD] graph | <N> nodes, <M> edges
Fallback (no graph.py)
If llmwiki/graph.py doesn't exist yet, build the graph manually using Grep and Read:
grep -roh '\[\[[^]]*\]\]' wiki/ | sort -u→ unique wikilink targets- For each wiki page, list the wikilinks found in it (out-edges)
- Compute the reverse index to find in-edges
- Write
graph/graph.jsonwith the format:{ "nodes": [{"id": "slug", "label": "Display Name", "type": "source|entity|concept", "in_degree": N, "out_degree": M}], "edges": [{"source": "from-slug", "target": "to-slug"}] } - Write
graph/graph.html— a single HTML file with an inline vis.js embed that readsgraph.jsonviafetch().
Report the same statistics as above.
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.
- 5d ago First seen · 53 lines · 0 tokens per session scan A 0538c002c03b
wiki-graph is a command published in the GitHub repository Pratiyush/llm-wiki (383 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 585 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.
Other commands, from other repositories
ppl
Add or update a person you interacts with in the wiki (wiki/entities/people/). Usage: /ppl . Also: /ppl list, /ppl lookup , /ppl edit .
update-memory
Check and update CLAUDE.md memory based on changes to skills, commands, agents, and hooks.
kb-status
Summarize the current bound project KB status, including registry counts and key project note paths.
om-dump
Freeform capture mode. Dump anything — conversations, decisions, incidents, wins, thoughts — and I'll route it all to the right notes with proper templates, frontmatter, and wikilinks.
wiki-query
Ask questions against the wiki. Synthesizes answers from wiki pages with cross-reference citations.
wiki-digest
Generate a daily or weekly digest of wiki changes — new sources, pages, insights, and gaps.