Claude Memory Compiler turns your Claude Code sessions into a self-organizing knowledge base. Each time a session ends, a background process extracts what’s worth saving — decisions, lessons, patterns — and appends it to a daily log. Those logs then compile into structured, cross-referenced articles that Claude reads at the start of every future session.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/coleam00/claude-memory-compiler/llms.txt
Use this file to discover all available pages before exploring further.
No API key required. Claude Memory Compiler uses Claude Code’s built-in credentials stored at
~/.claude/.credentials.json. Any Max, Team, or Enterprise Claude subscription is sufficient.Clone the repo into your project
From your project’s root directory, clone Claude Memory Compiler alongside your existing code:The repo contains the hook scripts, compiler, and all dependencies. It should live inside your project so the hook paths resolve correctly from the project root.
Install dependencies with uv
Claude Memory Compiler uses uv for dependency management. Run This installs the three required packages:
uv sync from the claude-memory-compiler directory:claude-agent-sdk, python-dotenv, and tzdata. Python 3.12 or later is required.Copy .claude/settings.json into your project
The hooks activate automatically once Claude Code finds If you already have a The empty
.claude/settings.json in your project root. Copy it from the cloned repo:.claude/settings.json, merge the hooks object into it. The full hook configuration is:.claude/settings.json
matcher field means the hooks fire for every session, regardless of what you’re working on.Open Claude Code — hooks activate automatically
Start a new Claude Code session in your project. The
SessionStart hook runs immediately and injects today’s date along with any existing knowledge base index into the conversation context.Work through your session normally. When the session ends, the SessionEnd hook fires and spawns flush.py as a detached background process to extract and save what matters.Verify your first daily log was created
After your first session ends, check that a daily log file was created:Open the file to see what was extracted. Each entry follows the structured format with sections for Context, Key Exchanges, Decisions Made, Lessons Learned, and Action Items.
Run your first compile
Compile the daily log into structured knowledge articles:This reads the daily log, extracts 3–7 concepts, and writes markdown articles to
claude-memory-compiler/knowledge/concepts/. It also updates the master index at knowledge/index.md, which Claude reads at the start of every future session.Compilation costs roughly $0.45–0.65 per daily log and takes a minute or two to complete.What to do next
After your first successful compile, your knowledge base is live. The cycle runs automatically from here: sessions flush to daily logs, daily logs compile after 6 PM, and the index injects into every new session. You can also query the knowledge base directly:lint.py, and integrating the knowledge directory with Obsidian.