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.
git clone --depth 1 https://github.com/d2a8k3u/claude-code-memoryWrote 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.
[](https://agentmods.dev/commands/d2a8k3u/claude-code-memory/memory-graph)<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.
<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>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.
| Model | Per session | Once 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 |
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'); 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.
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.
- 1mo ago First seen · 57 lines · 8 tokens per session scan A e8bad7041bed
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.
Other commands, from other repositories
genesis
Initialize cortex vault — set up config, vault structure, and rebuild index.
broadcast
Run broadcast on a distilled Raw — update related existing pages conversationally.
distill
Distill raw session records into refined Notes and Projects.
evolve
Save knowledge to the cortex vault (Notes or Projects) and update index.
promote
Move .memory/ artifacts to permanent knowledge locations.
checkpoint
Create or update .memory/ with current conversation state.