Claude Code hook
Claude Memory Compiler
Hooks that capture sessions and compile them into evolving project memory for Claude Code.
Install
git clone https://github.com/coleam00/claude-memory-compiler.gitFrom 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…
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.
Details
- Repository
- coleam00/claude-memory-compiler
- Type
- Hooks
- Language
- Python
- Last updated
- 6 April 2026
- Listed in
- jqueryscript/awesome-claude-code
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
Skillshare
2.9krunkids/skillshare
Sync skills, agents, MCP, plugins to all AI CLI tools with one command and simplify team sharing.
Claude Code Prompt Improver
2kseverity1/claude-code-prompt-improver
Intelligent prompt improver hook for Claude Code. Type vibes, ship precision.
Everything Claude Code
5.8kWorldFlowAI/everything-claude-code
Claude Code toolkit - agents, commands, skills, rules, and hooks for productive AI-assisted development
CC Safety Net
1.9kkenryu42/cc-safety-net
Pre-execution guard hook that blocks dangerous git and filesystem commands issued by coding agents.
TDD Guard
2.4knizos/tdd-guard
Hook-based enforcer that blocks code changes which skip the red-green-refactor TDD cycle.
Everything Claude Code Zh
2kxu-xiang/everything-claude-code-zh
everything-claude-code 中文翻译项目:完整的 Claude Code 配置集合(agents, skills, hooks, commands, rules, MCPs)。源自 Anthropic 黑客松获胜者的实战配置,助力中文工程师高效理解与使用 Claude Code。
Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.