Skip to content
Skills Library
Personal productivity · Automation

save-memory

/save-memory

总结当前对话中的经验教训并写入 Obsidian 笔记库,按任务关键词召回历史记忆,或对知识库做健康体检(红链/碎片/标签归并)。Use when the user says "save memory", "保存记忆", "总结对话", "写入笔记", "recall", "召回记忆", "garden memory", "整理记忆", "知识库体检", or when a task would clearly benefit from previously saved experience (re-encountering an error, resuming an old topic, asking "之前怎么解决的"). Proactively suggest recalling notes when relevant past experience may exist.

Licence
MIT
Last repository change
14.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
12
Scripts
4
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 14.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 4 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: engine/mem.py, engine/memory_config.py, engine/state.py, engine/validate.py

What it does and when to use it

总结当前对话中的经验教训并写入 Obsidian 笔记库,按任务关键词召回历史记忆,或对知识库做健康体检(红链/碎片/标签归并)。Use when the user says "save memory", "保存记忆", "总结对话", "写入笔记", "recall", "召回记忆", "garden memory", "整理记忆", "知识库体检", or when a task would clearly benefit from previously saved experience (re-encountering an error, resuming an old topic, asking "之前怎么解决的"). Proactively suggest recalling notes when relevant past experience may exist.

Triggers from the description

save memory保存记忆总结对话写入笔记recall召回记忆garden memory整理记忆
Original author description

总结当前对话中的经验教训并写入 Obsidian 笔记库,按任务关键词召回历史记忆,或对知识库做健康体检(红链/碎片/标签归并)。Use when the user says "save memory", "保存记忆", "总结对话", "写入笔记", "recall", "召回记忆", "garden memory", "整理记忆", "知识库体检", or when a task would clearly benefit from previously saved experience (re-encountering an error, resuming an old topic, asking "之前怎么解决的"). Proactively suggest recalling notes when relevant past experience may exist.

How it works

  1. 配置
  2. 流程:按用户意图加载,不要凭记忆执行
  3. 策略文件(流程会引用)
  4. 硬性约束
Original SKILL.md headings · 68 lines, 260 words
SKILL.md preview
---
name: save-memory
description: 总结当前对话中的经验教训并写入 Obsidian 笔记库,按任务关键词召回历史记忆,或对知识库做健康体检(红链/碎片/标签归并)。Use when the user says "save memory", "保存记忆", "总结对话", "写入笔记", "recall", "召回记忆", "garden memory", "整理记忆", "知识库体检", or when a task would clearly benefit from previously saved experience (re-encountering an error, resuming an old topic, asking "之前怎么解决的"). Proactively suggest recalling notes when relevant past experience may exist.
license: MIT
metadata:
  author: blsssed
  version: "0.5.0"
---

# Obsidian 对话记忆

把当前会话中有价值的知识沉淀到 Obsidian vault,并能在后续任务中召回。知识以笔记形式积累,通过 `[[双链]]` 和 frontmatter 类型化边融入知识图谱;召回基于图谱扩展打分。

**所有能力都走一条与宿主无关的命令**,`<引擎>` = 本文件所在目录下的 `engine/mem.py`:

```
py -3 <引擎> <子命令>
```

| 子命令 | 用途 |
|---|---|
| `brief [-n 40]` | 记忆索引(标题 \| tags \| updated),会话开始时喂给模型 |
| `find <关键词...>` | 轻量定位:只出得分/标题/路径,不注入正文 |
| `recall <关键词...> [--record]` | 混合召回;`--record` 顺带维护 `recall_count` |
| `build` | 重建/增量更新图谱缓存 |
| `expand <笔记> [-d N]` | 从某篇笔记出发看它连着谁 |
| `check` | 全库体检:红链 / 跨目录 / 可疑别名 |
| `check-links <笔记...>` | 校验指定笔记的双链目标是否存在 |
| `validate [--note 文件]` | 格式校验(frontmatter / 文件名 / 编码) |
| `record <笔记名...>` | 手动维护 `recall_count` |
| `params` | 打分参数:默认值 / 允许区间 / 当前生效值(JSON,无 vault 也可用) |

引擎零第三方依赖,纯标准库,跨平台。

## 配置

```
{ "vault": "<Obsidian 仓库路径>", "memory_dir": "AI记忆", "snippet_dir": "snippets",
  "scoring": { "title_weight": 3.0, "tag_weight": 2.0, "body_weight": 1.0,
               "body_occ_cap": 3, "min_tag_coverage": 0.6, "hop_decay": 0.5 } }
```

- 优先级:命令行 `--vault` > 环境变量 `SAVE_MEMORY_VAULT` > 配置文件 > 内置默认
- 坏 JSON 静默降级,工具不崩
- 未配置时引擎会打印配置文件应该写到哪个路径
- `scoring` 段可省略:省略(或整段不是对象)时等于上面的默认值,与 v0.4.0 的硬编码常量逐项相等
- `scoring` 里单项不合法(非数字 / 越界)会被**忽略并回落默认**,不夹紧——越界的 1000 不会被悄悄改成 20,那样用户会以为保存生效了
- 查看当前生效值:`params`(不带 vault 也能跑)

**状态目录**(图谱缓存等):`SAVE_MEMORY_HOME` > `~/.claude`(历史位置)> `~/.save-memory`。
同一台机器上装多个 agent 时,用 `SAVE_MEMORY_HOME` 给它们各自隔离,避免抢同一份缓存。

## 流程:按用户意图加载,不要凭记忆执行

| 用户要什么 | 读哪个文件 |
|---|---|
| 「保存记忆 / 总结对话 / 写入笔记」 | [workflows/extract.md](workflows/extract.md) |
| 「召回 / 之前怎么解决的 / 又遇到这个报错」 | [workflows/recall.md](workflows/recall.md) |
| 「整理记忆 / 知识库体检 / 红链清理」 | [workflows/garden.md](workflows/garden.md) |
| 首次安装 / 换 vault | [workflows/setup.md](workflows/setup.md) |

**主动召回**:任务明显涉及历史经验时(再次遇到某个报错、重启某个话题),主动建议跑一次 recall,而不是等用户开口。

## 策略文件(流程会引用)

- [references/extraction-rules.md](references/extraction-rules.md) —— 五类白名单、提取审计表、排除清单
- [references/merge-rules.md](references/merge-rules.md) —— 新建 / 域级合并 / 追加 / 标注取代
- [references/note-template.md](references/note-template.md) —— 目录结构、frontmatter、正文模板

## 硬性约束

- **只写入记忆目录**(含素材目录)。可以读取整个 vault、双链可以指向任何笔记,但链接只写在记忆笔记里——**绝不修改记忆目录以外的文件,包括「为建立双向链接」而编辑用户笔记**。
- **敏感信息永不写入**:API key、密码、token、内网地址等,无论上下文多重要。
- 文件名清洗、frontmatter 结构、UTF-8 编码,一律遵循 [references/note-template.md](references/note-template.md)。
- 笔记语言跟随用户对话语言。
Files in this package (12)
  • SKILL.md 5 KB
  • engine/mem.py 32 KB
  • engine/memory_config.py 3 KB
  • engine/state.py 2 KB
  • engine/validate.py 6 KB
  • references/extraction-rules.md 4 KB
  • references/merge-rules.md 3 KB
  • references/note-template.md 3 KB
  • workflows/extract.md 2 KB
  • workflows/garden.md 2 KB
  • workflows/recall.md 2 KB
  • workflows/setup.md 1 KB

Versions

The database has no other skills named save-memory.

Database snapshot: 13.11.2026 · package version d3776d337717 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100obsidian-knowledge-graph
    Recall, capture, correct and audit Tedd's durable project memory, and refresh its Obsidian projection. Use when prior records affect the task or the user requests memory work.
  • 100oh-my-obsidian-recall
    Use this skill when the user asks about previous decisions, earlier fixes, past session notes, troubleshooting history, or knowledge that should already exist in the Obsidian vault.
  • 95oh-my-obsidian-free
    Set up local Obsidian project memory, recall past decisions, and save concise work summaries for Codex CLI or Claude Code. Use when the user asks for Obsidian-backed agent memory or session notes. Native hook registration and explicit vault approval are required for automatic saving.
  • 90Memory recall and capture
    Use this skill when the user wants to recall something from past conversations, project decisions, or learned preferences across sessions — or when they want to explicitly save something to long-term memory. Trigger keywords include "remember", "recall", "what did we decide",…
  • 85obsidian-second-brain
    Use an Obsidian vault as the agent's persistent second brain. Use when the user asks to set up their second brain, Obsidian memory or a notes vault, asks to save or recall project knowledge, or when starting/ending a work session and a vault is configured (a LAYOUT.md exists in…
  • 100obsidian
    本机 agent 可以完整操作 Obsidian:用官方 Obsidian CLI(obsidian 命令,连接正在运行的 Obsidian)读写、 搜索、移动、删除笔记,管理属性、标签、任务、Bases、书签,执行任意命令面板命令,安装和启停插件与主题, 查看历史版本;用 obsidian-vault 添加、新建、打开、关闭、移除、移动 vault。只要用户提到 Obsidian、vault、 笔记库、双链、在 Obsidian 里记录、整理或查找内容,就使用本技能。 Triggers: obsidian, vault, obsidian note,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.