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/0xk3vin/megamemory/bootstrap-memorygit clone --depth 1 https://github.com/0xK3vin/MegaMemoryWrote 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/0xk3vin/megamemory/bootstrap-memory)<a href="https://agentmods.dev/commands/0xk3vin/megamemory/bootstrap-memory"><img src="https://agentmods.dev/badge/commands/0xk3vin/megamemory/bootstrap-memory.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.00000 | $0.00470 |
| Opus 5 | $0.00000 | $0.00235 |
| Sonnet 5 | $0.00000 | $0.00094 |
| Haiku 4.5 | $0.00000 | $0.00047 |
Grade A, and why
bootstrap-memory 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 — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Bootstrap Project Knowledge Graph
RUN { git ls-files; git ls-files --others --exclude-standard; } 2>/dev/null | sort -u | xargs wc -l 2>/dev/null | sort -rn | head -150 READ README.md
You are bootstrapping the megamemory knowledge graph for this project.
Your job is to understand the codebase and record its core concepts, architecture, and patterns as knowledge graph nodes. The file listing above is sorted by line count — the biggest files are where the core logic lives.
Step 1: Check existing graph
Call megamemory:list_roots to see what's already recorded. If the graph has
good coverage, report what's there and ask if I want to fill in specific areas.
Step 2: Identify major modules
From the file listing and README, identify the top-level systems in this project. Think in terms of:
- What does this project DO? (features)
- What are the distinct subsystems? (modules)
- How is it structured? (patterns, decisions)
Step 3: Read and create root concepts
For each major module, read its key files to understand what it does. Then call
megamemory:create_concept with a specific, detailed summary. Include parameter
names, defaults, file paths, and behavior details — not vague descriptions.
Step 4: Create children for important sub-components
For substantial modules, create child concepts for key pieces. Stay max 2 levels deep. Focus on things a developer would need to know when working in that area.
Step 5: Link related concepts
Connect concepts that interact across boundaries using megamemory:link.
Focus on meaningful relationships: depends_on, calls, connects_to, implements,
configured_by.
Guidelines
- Be specific. "Handles auth" is useless. "JWT auth with RS256, tokens from /auth/login, validated in middleware, refresh tokens in Redis with 7d TTL" is useful.
- Focus on the top 10-15 most important concepts first. The graph grows over time.
- Don't document trivial things. If it's obvious from the file name, skip it.
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 · 49 lines · 0 tokens per session scan A df510ddc0ba5
bootstrap-memory is a command published in the GitHub repository 0xK3vin/MegaMemory (513 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 470 tokens. 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
memory-bootstrap
One-time setup of a foundational Aionforge Memory substrate for a fresh project.
memory-session
Run a Claude Code task with Aionforge Memory recall, checkpoint capture, and final handoff.
memory-handoff
Capture a durable Aionforge Memory handoff for the current Claude Code work.
tm-save
Save this session's durable memory to trailmem before you exit.
index
Index the codebase for semantic search.
add-agent
引导新增一个 Agent 适配器。用法 /add-agent.