memory-map

A guide to memory_map, a tool that stores selected facts and rolling conversation history so coding sessions can reuse context across projects and sessions.

In plain words
What is it for?
Use it when installing or configuring memory_map, writing session-start instructions, managing shared or project-specific memory, tuning history compression, or troubleshooting context loading.
Why use it?
It reduces the need to repeat project details when a new session starts. It also clarifies what to save as lasting memory, what to keep as conversation history, and how to fix missing context.

Skill for Claude CodeCodex

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 skills/kid-sid/codex-spellbook/memory-map
Any agent
npx skills add kid-sid/codex-spellbook --skill memory-map
Clone the repo
git clone --depth 1 https://github.com/kid-sid/codex-spellbook

Made for: Claude Code, Codex.

Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,039 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00049 $0.03039
Opus 5 $0.00024 $0.01520
Sonnet 5 $0.00010 $0.00608
Haiku 4.5 $0.00005 $0.00304

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

Security

Grade B, and why

memory-map scanned grade B 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 2d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Add to `~/.claude/settings.json` so history is captured automatically in every project:
skills/memory-map/SKILL.md · 340 lines

How it starts

The opening of the file, as written. The whole thing — 340 lines — stays where its author put it; the contents beside it link to each section on GitHub.

memory_map

Persistent memory and conversation history MCP server for Claude Code — key-value context store, rolling history, and cross-project recall across sessions.

When to Activate

  • Installing memory_map for the first time or on a new machine
  • Writing CLAUDE.md session-setup instructions (load_memory, load_history)
  • Deciding what belongs in memory vs history vs inline code comments
  • Using cross-project or global memory tools
  • Configuring history compression or external summarization
  • Debugging why Claude starts a session without prior context
  • Manually checkpointing conversation history with /mem_save

Architecture

memory_map/
├── server.py          — MCP server (stdio transport)
├── history_hook.py    — hook script: saves history on UserPromptSubmit / Stop / PreCompact
├── CLAUDE.md          — copy into any project to enable session-start loading
└── venv/              — Python virtualenv

Per-project files (written to the project root automatically):
├── .mcp_memory.json   — key-value store (load_memory / save_memory)
└── .mcp_history.json  — rolling conversation history (20 chunks)

MCP registration makes all tools available globally. Per-project activation is controlled by CLAUDE.md — Claude only calls load_memory / load_history automatically if the instructions tell it to.

Installation

Step 1 — Clone and Install

git clone https://github.com/kid-sid/memory_map.git
cd memory_map

# Windows
python -m venv venv
venv\Scripts\pip install -r requirements.txt

# Mac/Linux
python3 -m venv venv
source venv/bin/activate && pip install -r requirements.txt

Step 2 — Register the MCP Server

# Global — available in every project (recommended)
# Windows
claude mcp add -s user memory_map \
  C:/Users/yourname/memory_map/venv/Scripts/python.exe \
  C:/Users/yourname/memory_map/server.py

# Mac/Linux
claude mcp add -s user memory_map \
  python3 /home/yourname/memory_map/server.py

Registration scope options:

Read the full file on GitHub · 340 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. 2d ago First seen · 340 lines · 49 tokens per session scan B 7ab490402990

Subscribe to this mod's changes

memory-map is a skill published in the GitHub repository kid-sid/codex-spellbook (21 stars, last pushed 3mo ago), licensed MIT. It adds 49 tokens to every session and 3,039 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens