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.
npx agentmods add commands/rand/mnemosyne/memory-consolidategit clone --depth 1 https://github.com/rand/mnemosyneWrote 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/rand/mnemosyne/memory-consolidate)<a href="https://agentmods.dev/commands/rand/mnemosyne/memory-consolidate"><img src="https://agentmods.dev/badge/commands/rand/mnemosyne/memory-consolidate.svg" alt="Measured on agentmods" 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 | $0.00012 | $0.01240 |
| Opus 5 | $0.00006 | $0.00620 |
| Sonnet 5 | $0.00002 | $0.00248 |
| Haiku 4.5 | $0.00001 | $0.00124 |
Grade A, and why
memory-consolidate 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.
How it starts
The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.
I will help you consolidate similar or duplicate memories to keep your knowledge base clean and organized.
Usage:
/memory-consolidate- Find and review consolidation candidates/memory-consolidate --auto- Auto-apply all recommendations/memory-consolidate <id1> <id2>- Analyze specific pair/memory-consolidate --namespace <ns>- Limit to namespace
Instructions for me:
-
Parse the arguments:
- Extract
--autoflag if present (auto-apply mode) - Extract
--namespaceflag if present (otherwise auto-detect) - Extract two memory IDs if provided as positional args
- If both
--autoand IDs provided: error
- Extract
-
Auto-detect namespace (if not specified):
- Use Bash:
git rev-parse --show-toplevel 2>/dev/null - Read CLAUDE.md for project name
- Construct namespace as
project:<name> - If no project: use
null(all)
- Use Bash:
-
Mode A: Specific pair analysis (if two IDs provided):
- Call
mnemosyne.consolidatewith the two IDs:
{ "name": "mnemosyne.consolidate", "arguments": { "memory_ids": ["<id1>", "<id2>"], "auto_apply": false } }- Display the recommendation:
Analyzing consolidation of two memories: Memory A [<importance>/10]: <summary> Created: <date> <content preview (200 chars)> Memory B [<importance>/10]: <summary> Created: <date> <content preview (200 chars)> --- LLM Recommendation: <MERGE|SUPERSEDE|KEEP_BOTH> <if MERGE>: Reason: Memories contain very similar information Action: Merge into Memory <A|B> (higher importance), archive the other New content will combine both perspectives <if SUPERSEDE>: Reason: Memory <A|B> contains updated/more accurate information Action: Keep Memory <kept>, mark Memory <superseded> as superseded <if KEEP_BOTH>: Reason: Memories are distinct and should be maintained separately Action: No consolidation needed --- Apply this recommendation? [y/N]: (Or run with /memory-consolidate --auto <id1> <id2> to apply automatically) - Call
-
Mode B: Find candidates (default mode):
- Call
mnemosyne.consolidatewithout IDs:
{ "name": "mnemosyne.consolidate", "arguments": { "namespace": "<namespace or null>", "auto_apply": <--auto flag value> } }- If candidates found, display each:
🔍 Scanning for consolidation candidates in <namespace>... Found <N> candidate pairs: <for each pair>: <number>. <MERGE|SUPERSEDE|KEEP_BOTH> Recommended Memory A [<imp>/10]: "<summary>" Created: <date>, Tags: <tags> Memory B [<imp>/10]: "<summary>" Created: <date>, Tags: <tags> Similarity: <high|medium|low> Reason: <LLM reasoning> <if --auto>: ✓ Applied: <action taken> <if not --auto>: [View details: /memory-consolidate <idA> <idB>] ---- Summary at end:
Summary: - Total pairs analyzed: <N> - Merge recommended: <N> - Supersede recommended: <N> - Keep both: <N> <if --auto>: - Actions applied: <N> - Memories archived: <N> <if not --auto>: To apply recommendations: - Review each pair: /memory-consolidate <id1> <id2> - Auto-apply all: /memory-consolidate --auto - Call
-
Interactive confirmation (if not --auto):
- After showing recommendation for a specific pair
- Ask user: "Apply this recommendation? [y/N]: "
- If 'y': Call consolidate again with
auto_apply: true - If 'N' or anything else: Do nothing, exit
-
Format the detailed pair view: When showing specific pair details, include:
- Full content (not just preview)
- All tags and keywords
- Related files and entities
- Link information
- Access statistics
-
Error handling:
- If MCP server not available: "Error: Mnemosyne MCP server not running"
- If API key not configured: "Error: Consolidation requires LLM. Configure API key with 'mnemosyne config set-key'"
- If invalid memory IDs: "Error: Invalid memory ID(s). Use /memory-list to see available memories"
- If no candidates found: "No consolidation candidates found. Your memory base is well-organized!"
- If both --auto and IDs provided: "Error: Cannot use --auto with specific memory IDs"
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.
- 4d ago First seen · 160 lines · 12 tokens per session scan A 42344c8202d9
memory-consolidate is a command published in the GitHub repository rand/mnemosyne (84 stars, last pushed 9mo ago), licensed MIT. It adds 12 tokens to every session and 1,240 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-30.
Other commands, from other repositories
hatch3r-bug-plan
Diagnose a complex incident -- reproduce the symptom, rank root-cause hypotheses, design the fix path, and emit regression coverage items as a board-ready investigation.
hatch3r-debug
Standalone debug-and-fix workflow — add strategic debug logging, collect runtime logs from the user, perform root cause analysis, implement the fix, and clean up all debug artifacts.
hatch3r-feature-plan
Design a new capability -- draft user stories, acceptance criteria, data model, API surface, and sub-issue breakdown as an epic-shaped todo.md for greenfield features.
hatch3r-bug-pipeline
Run a known-cause bug fix through a 3-phase test-first pipeline -- reproduce + root-cause, regression-test + fix together, then root-cause-depth review -- with full sub-agent delegation.
hatch3r-incident-response
Drive a live production incident through a structured lifecycle -- triage + topology, bounded-autonomy mitigation, stakeholder communication, then a blameless post-mortem with runbook -- via delegated sub-agents.
hatch3r-handoff
Prepare, resume, list, complete, and prune cross-session handoff documents.