graph

graph is a command for coding agents from sk-lim19f/Hypomnema. It costs 35 tokens per session (605 once invoked), scanned A, original, MIT.

A command that builds a graph showing how wiki pages link to one another.

In plain words
What is it for?
It is for producing dependency graphs in JSON, Mermaid, or DOT format from Markdown wiki links.
Why use it?
It makes the wiki’s structure visible and helps reveal isolated pages or highly connected pages.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the hypo plugin — 7 skills, 16 commands, 9 hooks shipped together

Install

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.

agentmods
npx agentmods add commands/sk-lim19f/hypomnema/graph
Clone the repo
git clone --depth 1 https://github.com/sk-lim19f/Hypomnema

Or install hypo, the plugin that ships this one along with the rest of its 7 skills, 16 commands, 9 hooks.

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 graph

README.md
[![agentmods](https://agentmods.dev/badge/commands/sk-lim19f/hypomnema/graph.svg)](https://agentmods.dev/commands/sk-lim19f/hypomnema/graph)
Your own site
<a href="https://agentmods.dev/commands/sk-lim19f/hypomnema/graph"><img src="https://agentmods.dev/badge/commands/sk-lim19f/hypomnema/graph.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 605 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00035 $0.00605
Opus 5 $0.00017 $0.00302
Sonnet 5 $0.00007 $0.00121
Haiku 4.5 $0.00003 $0.00060

Measured 4d ago against content hash 261519e620d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 4d 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.

commands/graph.md · 55 lines

How it starts

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

You are running /hypo:graph. Generate a link dependency graph from wiki pages.

What this does

  • Scans pages/ and projects/ for all .md files
  • Extracts [[wikilink]] references between pages
  • Outputs an adjacency graph in JSON, Mermaid, or DOT format

Step 1 — Run script

Bundled scripts here run via ${CLAUDE_PLUGIN_ROOT}/scripts/. To resolve that package root: if ${CLAUDE_PLUGIN_ROOT} is already an absolute path, use it; otherwise read pkgRoot from ~/.claude/hypo-pkg.json (only when non-empty and the target script exists under it); otherwise use the hypo@hypomnema (or legacy hypomnema@hypomnema) installPath in ~/.claude/plugins/installed_plugins.json; if none resolve, stop and tell the user to run hypomnema upgrade --apply or reinstall instead of guessing the cache layout.

If the user specified a Hypomnema directory, pass it as --hypo-dir="<path>". Otherwise omit the flag.


Step 2 — Run the graph script

node ${CLAUDE_PLUGIN_ROOT}/scripts/graph.mjs \
  [--hypo-dir="<path>"] \
  [--format=json|mermaid|dot] \
  [--min-edges=<n>]

Options:

  • --format=json (default) — adjacency list with in/out degree counts
  • --format=mermaid — Mermaid graph TD diagram (paste into a Markdown code block)
  • --format=dot — Graphviz DOT format
  • --min-edges=<n> — only include nodes with at least N total edges

Step 3 — Present results

  • For JSON: summarise the top 10 most-connected nodes (highest in+out degree), then offer to show the full output.
  • For Mermaid: wrap the output in a \``mermaid` code block so it renders in the chat.
  • For DOT: show the raw output and suggest pasting it into a Graphviz renderer.

If --min-edges was not specified and there are more than 50 nodes, suggest re-running with --min-edges=2 to focus on well-connected pages.


Step 4 — Insights

After displaying results, offer one or two observations:

  • Pages with high in-degree are hub pages — consider linking to them from new pages.
  • Pages with zero edges are isolated — suggest adding cross-links or running /hypo:crystallize.

Read the full file on GitHub · 55 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. 4d ago First seen · 55 lines · 35 tokens per session scan A 261519e620d9

Subscribe to this mod's changes

graph is a command published in the GitHub repository sk-lim19f/Hypomnema (10 stars, last pushed 5d ago), licensed MIT. It adds 35 tokens to every session and 605 once invoked, about $0.0002 per session on Opus 5. 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-31.