bootstrap-memory

bootstrap-memory is a command for coding agents from 0xK3vin/MegaMemory. It costs 0 tokens per session (470 once invoked), scanned A, original, MIT.

A project-onboarding command that reads the repository’s tracked files, untracked files, and README, then builds a map of the project’s main concepts and modules. A knowledge graph records those concepts and their relationships for later use.

In plain words
What is it for?
Use it to inventory a repository, identify its major systems, inspect important files, and record architecture, parameters, defaults, and implementation patterns in a knowledge graph.
Why use it?
It helps an agent understand an unfamiliar codebase before making changes. It also checks whether the project has already been documented and avoids repeating well-covered work.

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/0xk3vin/megamemory/bootstrap-memory
Clone the repo
git clone --depth 1 https://github.com/0xK3vin/MegaMemory

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/0xk3vin/megamemory/bootstrap-memory.svg)](https://agentmods.dev/commands/0xk3vin/megamemory/bootstrap-memory)
Your own site
<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>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 470 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.00000 $0.00470
Opus 5 $0.00000 $0.00235
Sonnet 5 $0.00000 $0.00094
Haiku 4.5 $0.00000 $0.00047

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

Security

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.

commands/bootstrap-memory.md · 49 lines

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.

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.

Read the full file on GitHub · 49 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. 4d ago First seen · 49 lines · 0 tokens per session scan A df510ddc0ba5

Subscribe to this mod's changes

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.