Claude Code hook

Claude Memory Compiler

Hooks that capture sessions and compile them into evolving project memory for Claude Code.

1,318 stars 332 forksHooks Source

Install

From source
git clone https://github.com/coleam00/claude-memory-compiler.git

From the README

LLM Personal Knowledge Base

Your AI conversations compile themselves into a searchable knowledge base.

Adapted from Karpathy's LLM Knowledge Base architecture, but instead of clipping web articles, the raw data is your own conversations with Claude Code. When a session ends (or auto-compacts mid-session), Claude Code hooks capture the conversation transcript and spawn a background process that uses the Claude Agent SDK to extract the important stuff - decisions, lessons learned, patterns, gotchas - and appends it to a daily log. You then compile those daily logs into structured, cross-referenced knowledge articles organized by concept. Retrieval uses a simple index file instead of RAG - no vector database, no embeddings, just markdown.

Anthropic has clarified that personal use of the Claude Agent SDK is covered under your existing Claude subscription (Max, Team, or Enterprise) - no separate API credits needed. Unlike OpenClaw, which requires API billing for its memory flush, this runs on your subscription.

Quick Start

Tell your AI coding agent:
"Clone https://github.com/coleam00/claude-memory-compiler into this project. Set up the Claude Code hooks so my conversations automatically get captured into daily logs, compiled into a knowledge base, and injected back into future sessions. Read the AGENTS.md for the full technical reference on how everything works."

The agent will:
1. Clone the repo and run uv sync to install dependencies
2. Copy .claude/settings.json into your project (or merge the hooks into your existing settings)
3. The hooks activate automatically next time you open Claude Code

From there, your conversations start accumulating. After 6 PM local time, the next session flush automatically triggers compilation of that day's logs into knowledge…
Read the full README on GitHub

How hooks work

  • Hooks are shell commands Claude Code runs at fixed points: before or after a tool call, when you submit a prompt, when Claude stops, on notifications and at session start.
  • They are set in the hooks section of ~/.claude/settings.json (or .claude/settings.json for a project), or come bundled in a plugin.
  • A hook can block a tool call, add context, or run a formatter or test. Read the scripts before you install them: they run on your machine with your permissions.
Claude Code docs

Details

Type
Hooks
Language
Python
Last updated
6 April 2026

FAQ

What is Claude Memory Compiler?

Hooks that capture sessions and compile them into evolving project memory for Claude Code. It is a hook for Claude Code, from coleam00/claude-memory-compiler on GitHub.

How do I install Claude Memory Compiler?

Clone coleam00/claude-memory-compiler from GitHub and follow the setup steps in its README.

Is Claude Memory Compiler popular?

coleam00/claude-memory-compiler has 1,318 GitHub stars and 332 forks, and is included in 1 curated Claude Code list. It was last updated on 6 April 2026.

More hooks

Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.