coleam00/claude-memory-compiler
Claude Code hooks turn session transcripts into reusable Markdown memory
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
This is a Claude Code hook extension backed by Python CLI scripts. SessionEnd and PreCompact capture transcripts and launch background extraction. flush.py uses the Claude Agent SDK to select decisions, patterns, lessons, and gotchas, then appends them to daily/YYYY-MM-DD.md. compile.py consolidates daily logs into cross-referenced Markdown under knowledge/concepts/, knowledge/connections/, and knowledge/qa/.
SessionStart injects the index, not the full article corpus, into subsequent sessions. That separates capture, synthesis, and retrieval and makes the daily logs and compiled articles independently inspectable. The runtime manifest specifies Python 3.12+, claude-agent-sdk>=0.1.29, python-dotenv>=1.0.0, and tzdata>=2024.1. The demonstrated extension mechanism is Claude Code hooks rather than an MCP server.
Key Capabilities & Differentiators
The workflow captures completed sessions and provides a second capture point before context compaction. After 6 p.m. local time, the next session flush can trigger compilation of that day's logs. This is an event-driven trigger, not a scheduled job that fires at 6 p.m. without session activity. uv run python scripts/compile.py provides an explicit manual path.
query.py uses index.md to find relevant articles, and --file-back saves an answer back into the knowledge base. lint.py runs seven health checks, including checks for broken links, orphaned articles, contradictions, and staleness; --structural-only runs just the structural checks. Claude via the Agent SDK is the demonstrated model integration. No interchangeable provider or local model backend is established.
Trade-offs & Limitations
Compared with vector RAG, an index and Markdown files eliminate the embedding pipeline and vector database, and make stored knowledge easier to inspect and edit. In exchange, retrieval depends on how well the index describes the articles and how much index text fits into model context. Treat 50–500 articles as personal-scale design guidance and roughly 2,000+ as a prompt to reassess retrieval, not a benchmark or hard cutoff.
Automatic extraction saves manual note taking, but it also creates a data-handling decision: session transcripts are processed through the Claude Agent SDK, and selected details persist in daily logs and compiled articles. Review what can be captured and retained before enabling the hooks on sensitive projects. No license is specified, so clarify reuse and redistribution rights before adopting the project as a shared dependency.
Hardware & Deployment Guide
Use Python 3.12+, uv, Claude Code, and access to Claude through the Agent SDK. Run uv sync, then copy or merge the hook entries from .claude/settings.json into the target project without replacing unrelated settings. The hooks take effect when Claude Code is next opened. There is no documented Docker deployment, database service, or GPU setup required by this workflow.
The scripts and Markdown artifacts are local, but model processing depends on Claude. The described personal-use path uses an eligible Claude Max, Team, or Enterprise subscription rather than separate API credits; verify current usage terms before relying on that arrangement. pyproject.toml declares version 0.1.0, but there is no published GitHub release to assess upgrade history or compatibility guarantees.
SessionEnd captures completed sessions, while PreCompact provides a capture point before context compaction.flush.py uses the Claude Agent SDK to select durable takeaways and append them to daily/YYYY-MM-DD.md.scripts/compile.py also runs manually.knowledge/, with index.md guiding lookup instead of embeddings.SessionStart injects the index into future sessions; query.py --file-back can save an answer back.lint.py runs seven health checks, with --structural-only available for structural checks alone.Claude Code users who want to carry project decisions and hard-won lessons across sessions in an inspectable, personal-scale Markdown knowledge base.
You need offline inference, cannot send session content to Claude, need large-corpus retrieval beyond a context-sized index, or require explicit redistribution rights before adoption.
Quick Start & Installation
uv run python scripts/compile.py # compile new daily logs uv run python scripts/query.py "question" # ask the knowledge base uv run python scripts/query.py "question" --file-back # ask + save answer back uv run python scripts/lint.py # run health checks uv run python scripts/lint.py --structural-only # free structural checks only
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| claude-memory-compiler ★ | 1.3k | +4 | Python | — | Claude Code hooks turn session transcripts into reusable Markdown memory |
| spec-kit | 153.7k | +1.3k | Python | MIT | A Python CLI for spec-driven coding-agent workflows and reviewable handoffs |
| academic-research-skills | 59.6k | +694 | Python | — | Claude Code plugin for human-reviewed research, manuscript writing, and peer rev |
| claude-plugins-official | 49.1k | +611 | Python | Apache-2.0 | Claude Code’s official marketplace for installing plugins and curated skill bund |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/coleam00/claude-memory-compiler.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about claude-memory-compiler
How does memory pass from one Claude Code session to the next?
.claude/settings.json into your project's existing Claude Code settings. SessionEnd and PreCompact capture transcripts for background extraction; SessionStart injects the compiled index into the next session. The integration is through Claude Code hooks, not an MCP server.Do I need a GPU, and what drives runtime overhead?
Can a company self-host this or redistribute a modified copy?
When should I choose this over a vector RAG memory system?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy