memory-graph

memory-graph is a command for Claude Code from d2a8k3u/claude-code-memory. It costs 8 tokens per session (496 once invoked), scanned A, original, MIT.

A browser command that opens a visual graph of the current project's stored memories.

In plain words
What is it for?
Use it to explore the memory graph in a browser when the project's memory service is running on port 7337.
Why use it?
It makes relationships between memories easier to inspect than reading them as a flat list, while checking that the local server belongs to this project.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the claude-memory plugin — 2 skills, 3 commands, 1 agent shipped together

Good fit Use it to explore the memory graph in a browser when the project's memory service is running on port 7337.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/d2a8k3u/claude-code-memory/memory-graph
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.

Clone the repo
git clone --depth 1 https://github.com/d2a8k3u/claude-code-memory

Made for: Claude Code.

Or install claude-memory, the plugin that ships this one along with the rest of its 2 skills, 3 commands, 1 agent.

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 memory-graph

README.md
[![agentmods](https://agentmods.dev/badge/commands/d2a8k3u/claude-code-memory/memory-graph/github.svg)](https://agentmods.dev/commands/d2a8k3u/claude-code-memory/memory-graph)
Your own site
<a href="https://agentmods.dev/commands/d2a8k3u/claude-code-memory/memory-graph"><img src="https://agentmods.dev/badge/commands/d2a8k3u/claude-code-memory/memory-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 memory-graph

Your own site · 80×15
<a href="https://agentmods.dev/commands/d2a8k3u/claude-code-memory/memory-graph"><img src="https://agentmods.dev/badge/commands/d2a8k3u/claude-code-memory/memory-graph.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 496 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00008 $0.00496
Opus 5.5 $0.00003 $0.00198
Sonnet 5.5 $0.00002 $0.00099
Haiku 4.5 $0.00001 $0.00050

Measured 1mo ago against content hash e8bad7041bed, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memory-graph scanned grade A with 1 finding 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 1mo 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

const { exec } = require('child_process');
commands/memory-graph.md · 57 lines

What it actually says

Run this Bash. It checks that the server on port 7337 belongs to the current project before opening the browser, and prints a helpful error otherwise.

node <<'EOF'
const http = require('http');
const { exec } = require('child_process');
const path = require('path');

const URL = 'http://localhost:7337';
const cwd = path.resolve(process.cwd());

const req = http.get(URL + '/api/identity', { timeout: 2000 }, (r) => {
  let body = '';
  r.on('data', (d) => (body += d));
  r.on('end', () => {
    let identity;
    try {
      identity = JSON.parse(body);
    } catch {
      console.error(`Invalid response from ${URL}. Something else may be running on port 7337.`);
      process.exit(1);
    }
    if (identity.service !== 'claude-memory') {
      console.error('Port 7337 is held by another application, not claude-memory. Free port 7337 and try again.');
      process.exit(1);
    }
    const serverCwd = path.resolve(identity.cwd || '');
    if (serverCwd !== cwd) {
      console.error(`Port 7337 is held by another claude-memory project: ${serverCwd}`);
      console.error('Close that Claude Code session (or run /memory-graph from that project) and try again.');
      process.exit(1);
    }
    const cmd =
      process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'start' : 'xdg-open';
    exec(`${cmd} ${URL}`, () => {});
    console.log(`Memory graph open at ${URL}`);
  });
});

req.on('error', () => {
  console.error(`Memory graph server not reachable at ${URL}. Restart Claude Code and try again.`);
  process.exit(1);
});
req.on('timeout', () => {
  req.destroy();
  console.error(`Timeout reaching ${URL}. The server is unresponsive — restart Claude Code.`);
  process.exit(1);
});
EOF

Then briefly tell the user what was reported. On success, mention they can search nodes, filter by memory type (semantic, episodic, pattern, procedural, working), and drag nodes to explore relations.

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. 1mo ago First seen · 57 lines · 8 tokens per session scan A e8bad7041bed

Subscribe to this mod's changes

memory-graph is a command published in the GitHub repository d2a8k3u/claude-code-memory (8 stars, last pushed 3mo ago), licensed MIT. It adds 8 tokens to every session and 496 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.