visualize-memory-graph

A command that opens an interactive browser view of a Mnemograph knowledge graph, which shows connected stored information.

In plain words
What is it for?
Choosing global or project memory, then opening a live graph view or exporting the graph as an HTML file.
Why use it?
It makes relationships in stored project or personal memory easier to inspect than reading the underlying data.

Command

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/tm42/mnemograph/visualize-memory-graph
Clone the repo
git clone --depth 1 https://github.com/tm42/mnemograph
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 542 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.00013 $0.00542
Opus 5 $0.00006 $0.00271
Sonnet 5 $0.00003 $0.00108
Haiku 4.5 $0.00001 $0.00054

Measured yesterday against content hash eb800a94127f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

visualize-memory-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 yesterday.

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.

mnemograph-claude-code/commands/visualize-memory-graph.md · 56 lines

How it starts

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

Visualize Memory Graph

Open an interactive D3.js visualization of the knowledge graph in the browser.

Your Task

Before running the visualization, ask the user which memory scope and mode they want using the AskUserQuestion tool.

Instructions

  1. Ask the user for their preferences using AskUserQuestion with these questions:

    Question 1 - Memory Scope:

    • Header: "Scope"
    • Question: "Which memory graph do you want to visualize?"
    • Options:
      • Label: "Global memory", Description: "Your personal knowledge graph stored in ~/.claude/memory (shared across all projects)"
      • Label: "Project memory", Description: "Project-specific knowledge graph stored in .claude/memory (local to this codebase)"

    Question 2 - Mode:

    • Header: "Mode"
    • Question: "How do you want to view the graph?"
    • Options:
      • Label: "Live view (Recommended)", Description: "Opens in browser with a Refresh button for live updates as you work"
      • Label: "Export only", Description: "Save the graph as an HTML file without opening the browser"
  2. Run the visualization based on their choices:

    Use the Bash tool to run the mnemograph graph command via uvx.

    Commands by choice combination:

    Scope Mode Command
    Global Live uvx mnemograph --global graph --watch
    Global Export uvx mnemograph --global graph --export ~/mnemograph-export.html
    Project Live uvx mnemograph graph --watch
    Project Export uvx mnemograph graph --export ./mnemograph-export.html

    Run in background for live view mode so the user can continue working while the server runs.

  3. Inform the user about what's happening:

    • For live view: Tell them the server is running and they can click Refresh in the browser
    • For export: Tell them where the file was saved

Notes

  • The live view runs a local HTTP server — tell the user to press Ctrl+C or click "Stop Server" in the browser when done
  • The visualization shows entities as nodes and relations as edges
  • Node colors represent entity types (concept, decision, pattern, etc.)
  • Edge thickness represents relation weight (stronger connections = thicker lines)

Read the full file on GitHub · 56 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. yesterday First seen · 56 lines · 13 tokens per session scan A eb800a94127f

Subscribe to this mod's changes

visualize-memory-graph is a command published in the GitHub repository tm42/mnemograph (2 stars, last pushed 6mo ago), licensed MIT. It adds 13 tokens to every session and 542 once invoked, about $0.0001 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.