llm-wiki-newsroom: Command for Claude Code

.claude/commands/wiki-graph.md

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

A command that builds a knowledge graph for an LLM newsroom wiki. A knowledge graph is a structured map showing how pages, topics, contradictions, clusters, and dependencies relate to one another.

In plain words
What is it for?
Use it to rebuild the graph data, generate topic clusters and indexes, check the results, and update the static Sigma.js graph viewer.
Why use it?
It automates the rebuilding of the wiki's relationship data and makes the result available to a browser-based graph view. A separate lint check can flag isolated hubs and unnamed groups for review.

Command for Claude Code

Written for Claude Code: installed under .claude/.

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

Reuse

Borrowing it

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

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/alfadur7/llm-wiki-newsroom/wiki-graph/github.svg)](https://agentmods.dev/commands/alfadur7/llm-wiki-newsroom/wiki-graph)
Your own site
<a href="https://agentmods.dev/commands/alfadur7/llm-wiki-newsroom/wiki-graph"><img src="https://agentmods.dev/badge/commands/alfadur7/llm-wiki-newsroom/wiki-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 wiki-graph

Your own site · 80×15
<a href="https://agentmods.dev/commands/alfadur7/llm-wiki-newsroom/wiki-graph"><img src="https://agentmods.dev/badge/commands/alfadur7/llm-wiki-newsroom/wiki-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 807 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.00807
Opus 5 $0.00000 $0.00404
Sonnet 5 $0.00000 $0.00161
Haiku 4.5 $0.00000 $0.00081

Measured 12d ago against content hash 10a693e31153, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 12d 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/wiki-graph.md · 44 lines

How it starts

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

Build the LLM Wiki knowledge graph.

Usage: /wiki-graph

Traversal Pattern

Outside the matrix — Meta layer (deterministic). The Editor-in-Chief calls tools/build.py and reports the result.

Cycle Owner
Trigger Editor-in-Chief
Build tools/build.py (deterministic — 5 phases: graph → clusters → contradictions → index → dependencies)
Verify Copy Editor (tools/lint.py graph clusters recommended)
Log Editor-in-Chief (log.md append)

Operation

  1. python tools/build.py graph — rebuild the graph only (graph/_graph.json only — graph.html is a committed static shell, see item 3). Does not trigger downstream phases.
  2. A full rebuild is python tools/build.py (auto-invoked by ingest and by lint --fix).
  3. graph/graph.html is a single committed Sigma.js v3 static shell — it loads _graph.json·_clusters.json (at init) + _pages.json (lazily on click) directly via fetch(). A rebuild only regenerates those JSON files (no separate JS wrapper or inline).
  4. After the build, python tools/lint.py graph clusters is recommended — checks for isolated hubs and unnamed groups.

graph.html is not just a visualization but also includes a reading panel — clicking a node renders that page's Markdown body in the right-hand panel (marked), and you can move between node and body by clicking the in-body [[wikilinks]], backlinks, and connection list, so it is browsable without Obsidian. The body, link resolution, and backlinks are held in _pages.json (generated by the clusters phase's pages.run from wiki/*.md·_build_id_map·wiki/_backlinks.json) and fetched on click. Because it is fetch-based it must be opened via a web server (a file:// double-click is unsupported — locally, python -m http.server). On mobile, a responsive layout (viewport meta + @media queries) renders the navigation as a sidebar drawer and the reading panel as a bottom sheet.

Deep link: open a specific node via the URL hash — #node=<wiki-path> (exact) or #q=<slug/text> (idmap resolution → search on failure). Used together with a hosting deployment, a RAG answer's <base>/<slug>#q=<source-slug> link connects to the primary source in one tap. Phone hosting deployment is /wiki-export + operations/graph-hosting-setup.md.

Read the full file on GitHub · 44 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. 12d ago First seen · 44 lines · 0 tokens per session scan A 10a693e31153

Subscribe to this mod's changes

wiki-graph is a command published in the GitHub repository alfadur7/llm-wiki-newsroom (85 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 807 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.