Sage Mem — Documentation skill for Claude Code
File-based cross-session memory for DeepSeek Harness (DSH) — every memory is a plain Markdown file.
How to install Sage Mem
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open gezi-wen/sage-mem and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Sage Mem does
File-based cross-session memory for DeepSeek Harness (DSH) — every memory is a plain Markdown file. 纯 Markdown 存储,无数据库、无 worker、无端口;从 Claude Code 无损迁移记忆与人格,带记忆星图与可选的记忆整理。
Alternatives in Documentation
- 会话管理(Session Manager)需求文档(PRD / Markdown) — 目标:对 Codex / Claude Code 的本地会话记录进行可视化管理,并提供“一键复制 / 一键终端恢复”能力 31.7k ★
- Napkin — You maintain a per-repo markdown runbook, not a chronological log 420 ★
- Apply Self Review — Apply the approved improvements from the latest memory-self-review PROPOSAL 297 ★
README
sage-mem · DSH 的文件式记忆插件
[](https://www.npmjs.com/package/sage-mem) [](https://www.npmjs.com/package/sage-mem) [](https://github.com/gezi-wen/sage-mem/blob/main/LICENSE) [](https://github.com/deepseek-ai/deepseek-harness)
**给 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)装上跨会话记忆。纯 Markdown 存储,透明、可检查。**
**如果这个工具帮到了你,欢迎给个 ⭐️ Star 支持一下!**
记忆就是本地的一堆 Markdown 文件(frontmatter + 正文)——不是数据库,没有私有格式。agent 今天记住的事,明天的新会话自动想起来。
**English** — file-based cross-session memory for DeepSeek Harness: every memory is a plain markdown file you can open, edit and delete; no database, no worker, no port.
为什么需要 sage-mem
DSH 原生没有记忆系统。每个新会话都是一张白纸——agent 不记得你是谁,不记得你们昨天做到哪,不记得项目进行到哪一步。你只能每次重新交代一遍。
市面上的记忆方案大多走 SQLite + 常驻 worker:记忆写进数据库就**不透明**(想看看存了什么得去查表),事件全捕获又会让库**膨胀**(「用户打了个招呼」也算一条),还得额外养一个进程和一个端口。
sage-mem 换一条路:**每条记忆就是一个 Markdown 文件**。用编辑器打开就能看、能改、能删;存不存由 agent 按规则判断,不做无差别捕获。让 agent 真正记住你和你的项目,而这份记忆始终握在你自己手里。
核心特性
| 特性 | 说明 |
|---|---|
| 文件式存储 | 每条记忆一个 .md:frontmatter 存元数据,正文存内容。无数据库、无隐藏格式,VS Code 直接打开就能改 |
| 跨会话记忆 | 每轮提问自动扫记忆目录、按相关度挑出最相关的几条注入上下文。agent 第一轮就「想起来」,不需要它自己去翻文件 |
| Claude Code 无损迁移 | CC 的记忆与人格都是 Markdown——直接拷文件就完成迁移,不写转换脚本。详见下一节 |
| 零额外服务 | 无 worker、无 SQLite、无端口、无常驻进程,不需要额外的 API key 或云服务(运行时唯一的依赖是普通 npm 库 zod) |
| 防膨胀 | 靠规则引导 agent 判断「值不值得存」:无实质内容的不存,靠读代码 / git 能推出来的不存 |
界面上还有三块附加能力(都可以不用):
- 记忆管理页(v0.4)——DSH 设置页里的「记忆管理」:浏览、查看、编辑、删除、新建记忆,不用离开 GUI
- 类型与标签筛选(v0.6)——文件列表顶部一排 chip,按四类 + 自定义标签筛;标签从全库自动聚合计数,与搜索框是 AND 关系
- 记忆星图(v0.4 起,v0.6 重做)——把记忆画成星空:按类型着色、按体积分级、按新鲜度分亮度,还支持时间线与「诞生回放」。渲染是按需重绘,画面静止时不发起任何绘制

*记忆星图:每颗星是一条记忆 —— 颜色对应类型、大小对应体积、
Related Skills
Dsh Plugin Memory
DeepSeek Harness (DSH) 跨会话记忆插件:对话模型边干边记的 Markdown 项目记忆,支持专题文件渐进式披露、可选后台静默蒸馏、按项目隔离与热更新设置面板。机制对齐 Claude Code aut
Stele
Rate limited mid-task? Crashed mid-edit? Locked into one harness by the context it holds? A skill that keeps t
Mem Promote
Promote accumulated knowledge about a topic into wiki/topics/ .md (Obsidian page with [[wikilinks]]). Requires
Mem Changelog
Themed memory changelog (learned from supremor). Rolls up the memory repo's recent descriptive commits into a
Cog
240+ Cognitive architecture for Claude Code -- persistent memory, self-reflection, and foresight via plain-tex
Agent Memory Kit
One memory for every coding agent — plain markdown in your repo. Injected on Claude Code & Cursor, skills on C
Related Agents
Ds Flash
DSH (DeepSeek Harness) worker on the flash tier - fast and cheap. Delegate simple, well-scoped subtasks: mecha
Mer Recall
Worker that loads a project's Memory v2 context (mem_state, mem_context, mem_search, mem_get) and reconciles i
Memory Master
Use when a repeated failure, user correction, or WF recovery loop triggers memory writing; also use during WF