Skip to main content

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.

Claude Memory Compiler gives your AI coding sessions a persistent memory. Every conversation you have with Claude Code is automatically captured, and an LLM compiler extracts the important parts — decisions made, lessons learned, patterns discovered, gotchas encountered — and organizes them into structured markdown articles you can query, browse, and reference in future sessions.

Quickstart

Get the memory system running in your project in minutes

How it works

Understand the hook architecture and compilation pipeline

Guides

Step-by-step guides for installation, hooks, compiling, and querying

Reference

Full reference for all scripts, hooks, article formats, and configuration

What it does

When you end a Claude Code session, a background process automatically reads the conversation transcript and uses the Claude Agent SDK to extract what’s worth remembering. Those extracts accumulate in daily logs. Once per day (automatically, after 6 PM), or whenever you run compile.py, those logs are compiled into organized knowledge articles. At the start of your next session, the knowledge base index is injected into Claude’s context — so Claude already knows what you’ve built, what decisions you’ve made, and what patterns you prefer.
Conversation ends
    → session-end hook fires
    → flush.py extracts knowledge in background
    → appends to daily/YYYY-MM-DD.md

After 6 PM (or manually):
    → compile.py reads daily logs
    → LLM writes concept articles to knowledge/
    → index.md updated

Next session starts:
    → session-start hook fires
    → knowledge index injected into Claude's context
    → Claude remembers everything

Key features

Automatic capture

Claude Code hooks fire on session end, pre-compaction, and session start — no manual action needed

LLM compilation

The Claude Agent SDK decides what’s worth saving and writes structured articles directly

No RAG required

Index-guided retrieval: the LLM reads a structured index and picks relevant articles — no vector database

Obsidian compatible

Pure markdown with [[wikilinks]] — point an Obsidian vault at knowledge/ for graph view

7 health checks

Lint your knowledge base for broken links, orphan pages, stale articles, and contradictions

Runs on your subscription

Uses Claude Code’s built-in credentials — no separate API key or billing required

Why this approach

Inspired by Andrej Karpathy’s LLM Knowledge Base architecture, this system treats your AI conversations like source code: raw daily logs are the input, the LLM is the compiler, and structured knowledge articles are the output. At personal scale (50–500 articles), an LLM reading a structured index consistently outperforms vector similarity search. The LLM understands what you’re asking; cosine similarity only finds similar words.

Build docs developers (and LLMs) love