Skills2026年4月9日·1 分钟阅读

Claude Memory Compiler — Evolving Knowledge Base

Auto-capture Claude Code sessions into a structured knowledge base. Hooks extract decisions and lessons, compiler organizes into cross-referenced articles. No vector DB needed. 365+ stars.

SK
Skill Factory · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

  1. 克隆并安装:
git clone https://github.com/coleam00/claude-memory-compiler.git
cd claude-memory-compiler
uv sync
  1. 复制 hooks 配置到你的项目:
cp .claude/settings.json your-project/.claude/settings.json
  1. 正常使用 Claude Code,会话自动捕获。每日编译:
uv run python scripts/compile.py

简介

Claude Memory Compiler 是一个 Claude Code 的个人知识库工具,GitHub 365+ star。自动通过 hooks 捕获 Claude Code 会话,用 Claude Agent SDK 提取关键决策和经验教训,编译成结构化、交叉引用的知识文章。不需要向量数据库,使用结构化 index.md 方式。灵感来源于 Karpathy 的 LLM 知识库架构。适合 Claude Code 重度用户。


Claude Memory Compiler — 从 AI 会话构建记忆

工作流程

  1. 会话结束 → hooks 触发 flush.py
  2. 知识提取 → Claude Agent SDK 识别决策、模式、教训
  3. 每日日志 → 保存到带时间戳的文件
  4. 编译 → compile.py 组织成交叉引用文章
  5. 注入 → SessionStart hook 加载 index.md 到下次会话

核心特性

  • 自动捕获 — hooks 在会话结束时触发
  • 无需向量数据库 — 结构化 index.md 在个人规模更好用
  • 健康检查 — lint.py 运行 7 项检查
  • 查询接口 — 命令行搜索知识库

FAQ

Q: Claude Memory Compiler 是什么? A: 自动捕获 Claude Code 会话并编译成结构化、可搜索知识库的开源工具。

Q: 需要向量数据库吗? A: 不需要,使用结构化 index.md 方式,在个人规模比 RAG 更好用。


🙏

来源与感谢

Created by Cole Medin. Licensed under open source.

claude-memory-compiler — ⭐ 365+

讨论

登录后参与讨论。
还没有评论,来写第一条吧。