wiki-graph
Skill4 starsChanged 5 months agoMITView on GitHub
Use to build and query the knowledge wiki as a graph. Exports an interactive self-contained graph.html plus graph.json / graph.graphml (scripts/wiki-to-graph.py), and answers questions against the live wiki with deterministic sub-commands (neighbors, path, god-nodes, bridges, relations, search, stats). Triggers include "build/show me a knowledge graph", "map the wiki", "which entity bridges my sources", "most connected pages", "where are the gaps or weak links", "export to Gephi/yEd". NOT wiki-lint (frontmatter and wikilink validation), NOT semantic-wiki-review (claim audit).
1 other project uses a version of this.
Adopted by
Most recently taken up by
- galaxyuliana/wiki-graphtheir own version, first seen Jul 20, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- galaxyuliana/wiki-graph★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- acquire-sourcesSkill
- add-to-librarySkill
- brainstorming-researchSkill
- drafting-manuscriptSkill
- drift-reportSkill
- executing-research-planSkill
- finishing-a-research-projectSkill
- grant-finderSkill
- ingest-sourceSkill
- literature-reviewSkill
- requesting-peer-reviewSkill
- scaffold-research-projectSkill
- semantic-wiki-reviewSkill
- using-research-powersSkill
- wiki-lintSkill
- writing-research-planSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 51
After a bulk ingest or a wiki-lint pass, to see how the structure changed
- Very specific: line 124
No invented edges: Only report connections present in graph.json.
- Very specific: line 125
Flag inferred/ambiguous edges: when they carry an argument.
- Very specific: line 132
If python3 / pyyaml / the script are unavailable (e.g.
- Distinctive: line 134
Do a best-effort manual read: list the wiki pages, and for a small wiki count incoming wikilinks per page to approximate god nodes.
- Distinctive: line 138
Never fake precise counts in fallback mode — approximate, and say so.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Wiki Graph
Make the implicit wiki graph explicit, then answer structure questions from it. This is the structure-analysis sibling of two other wiki skills:
wiki-lint— is the wiki well-formed? (frontmatter, broken links, orphans)semantic-wiki-review— are the claims sound and consistent? (LLM content audit)wiki-graph— what shape does the knowledge have? (hubs, bridges, clusters, confidence)
The graph is computed deterministically by scripts/wiki-to-graph.py; this skill runs it and interprets the result. It never invents edges — every claim about the graph traces back to graph.json.
Announce at start: "Using wiki-graph to build and analyse the knowledge graph."
When to use
- "Build / show me a knowledge graph", "map the wiki", "graph view of my research"
- "Which entity bridges / connects my sources?" → bridges
- "What are the main themes / sub-topics / clusters in my literature?" → communities
- "What are the most central / connected pages?" → god nodes
- "Find surprising connections" / "where are the weak links or gaps?"
- "How many relations are inferred vs grounded?" → inference-rate
- "Export the wiki to Gephi / yEd" → hand over
graph.graphml - After a bulk ingest or a
wiki-lintpass, to see how the structure changed
NOT for: frontmatter/wikilink validation (use wiki-lint), contradiction/claim audit (use semantic-wiki-review), or drafting prose (use drafting-manuscript).
Checklist
- Locate the script —
scripts/wiki-to-graph.pyin the project root (from the template). If it is missing, offer to copy it from the template (or scaffold the project); if Python/PyYAML are unavailable, take the fallback below. - Lint first (recommended) — broken wikilinks become dangling edges and skew the picture. If
wiki-linthas not run recently, suggest it; note any override. - For a targeted question — query the live graph (recomputed from the
.mdon each call, so always current; deterministic — do not eyeball JSON):python scripts/wiki-to-graph.py neighbors <slug> [--depth N] [--relation TYPE]… path <a> <b>— shortest connection between two pages… god-nodes [--top-n N]·… bridges·… communities [--min-size N]·… stats·… reportcommunitiesare labelled with their most-connected member's title (deterministic, no LLM);reportprints the fullGRAPH_REPORT.mdto stdout… relations [--type cites|contradicts|builds-on|…] [--confidence inferred] [--node <slug>]… search <term>— find a node by id/title- Node tokens may be a unique substring (fuzzy-resolved); add
--jsonto any query for machine-readable output.
- For an overview or the visual — build the exports —
python scripts/wiki-to-graph.pywritesgraph.html(interactive, self-contained),graph.json,graph.graphml, andGRAPH_REPORT.mdintoknowledge/_meta/graph/.GRAPH_REPORT.mdis a deterministic prose summary (overview, god nodes, bridges, labelled communities, asserted relations, suggested questions) — the static, git-diffable sibling ofgraph.html; hand it to the user for a no-browser read, or get just the text on stdout withpython scripts/wiki-to-graph.py report. - Answer grounded in the output (query result or
graph.json— see "Reading the output"); never from memory. With no specific question, give the overview: god nodes, bridges, inference-rate, dangling/orphan signal. - Be honest about confidence and gaps (see "Honesty rules"). If the user asks about a connection that is not in the graph, say so — and offer to add a
relationsentry or a wikilink rather than asserting it. - Offer the viz — for an interactive look, point the user to
knowledge/_meta/graph/graph.html(opens in any browser, no install; filter/search/click). For heavy layout or community detection,graph.graphmlopens in Gephi/yEd. - Persist an insight (optional, with consent) — if the analysis yields a standalone finding the user wants to keep, write a
knowledge/synthesis/<slug>.mdpage withstatus: draft,author: llm. Never self-promote toreview/stable. - Log the run in
knowledge/_meta/log.md: date,graph, question (or "overview"), node/edge counts, headline finding.
MCP shortcut: if the project registers the wiki-graph MCP server (via .mcp.json → scripts/graph_mcp.py), call its graph_neighbors / graph_path / graph_god_nodes / graph_bridges / graph_communities / graph_relations / graph_search / graph_stats tools directly instead of the Bash CLI. It is the same engine (the tools shell out to wiki-to-graph.py --json), so results are identical and equally live.
Process Flow
digraph wiki_graph {
"Locate script" [shape=box];
"Script available?" [shape=diamond];
"Fallback: manual read" [shape=box];
"Lint recommended" [shape=box];
"Build graph (run script)" [shape=box];
"Read graph.json" [shape=box];
"Specific question?" [shape=diamond];
"Answer question from data" [shape=box];
"Overview: god_nodes + bridges + inference-rate" [shape=box];
"Persist insight?" [shape=diamond];
"Write synthesis page (status: draft)" [shape=box];
"Log run" [shape=box];
"Done" [shape=doublecircle];
"Locate script" -> "Script available?";
"Script available?" -> "Fallback: manual read" [label="no"];
"Script available?" -> "Lint recommended" [label="yes"];
"Fallback: manual read" -> "Specific question?";
"Lint recommended" -> "Build graph (run script)";
"Build graph (run script)" -> "Read graph.json";
"Read graph.json" -> "Specific question?";
"Specific question?" -> "Answer question from data" [label="yes"];
"Specific question?" -> "Overview: god_nodes + bridges + inference-rate" [label="no"];
"Answer question from data" -> "Persist insight?";
"Overview: god_nodes + bridges + inference-rate" -> "Persist insight?";
"Persist insight?" -> "Write synthesis page (status: draft)" [label="yes"];
"Persist insight?" -> "Log run" [label="no"];
"Write synthesis page (status: draft)" -> "Log run";
"Log run" -> "Done";
}Reading the output
graph.json has stats, nodes, edges, god_nodes, bridges.
- god_nodes — pages ranked by total degree (incident edges). The most-connected pages. High degree signals a hub, not automatically importance — a generic entity can rack up links. Read it as "where the wiki converges", then judge.
- bridges — entities that join ≥2 source clusters which share no other entity. These are the load-bearing connectors: remove one and parts of the literature fall apart. Often the most analytically interesting nodes.
- edges — each has
relation_type(wikilinkfor plain links;cites/contradicts/builds-on/ … for typedrelations),confidence, an optionalbecauserationale, andweight(how many times a wikilink recurs). Filter byrelation_typeto answer e.g. "show me the contradictions"; thebecausetext explains why an edge exists. - stats.relations_total / relations_inferred_or_ambiguous — the inference-rate. A high share means many edges are model-asserted rather than grounded in the sources; surface this honestly (it mirrors the SOFT-GATE override-rate as an audit signal).
- stats.dangling — edges pointing to non-existent pages were dropped. A non-zero count means the wiki references things it hasn't ingested → route to
wiki-lint/ingest-source.
Honesty rules
- No invented edges. Only report connections present in
graph.json. If asked about a link that isn't there, say it isn't — don't infer it into existence in your answer. - Flag inferred/ambiguous edges when they carry an argument. Don't present an
inferredrelation as if it wereextracted. - Degree ≠ importance. Name what high degree actually means (hub of links) and let the user judge significance.
- Don't write to
input/. Insights go toknowledge/synthesis/(with consent), never into the immutable input layer. - Don't self-promote. Any synthesis page you create is
status: draft; only the user promotes.
Python-free fallback
If python3 / pyyaml / the script are unavailable (e.g. Cowork without a shell):
- Do a best-effort manual read: list the wiki pages, and for a small wiki count incoming wikilinks per page to approximate god nodes.
- State the limitation clearly: bridges and the inference-rate are impractical to compute by hand and are not reported in fallback mode.
- Recommend installing Python + PyYAML (or running the script elsewhere) for the full analysis, and hand over
graph.graphmlonce it can be generated.
Never fake precise counts in fallback mode — approximate, and say so.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

