← 返回 Skills 市场
jofiction918

Extract Memories

作者 Mr.Zhenweisi · GitHub ↗ · v3.0.10 · MIT-0
cross-platform ⚠ suspicious
212
总下载
0
收藏
1
当前安装
19
版本数
在 OpenClaw 中安装
/install extract-memories
功能描述
对话结束时主动提炼关键记忆到 topic 文件 / 触发词:提炼记忆、提取记忆 / 命令:/extract-memories
使用说明 (SKILL.md)

extract-memories v3.1.0 — 对话记忆提炼

对话结束时主动分析本轮对话,将值得持久化的信息写入 memory/topics/ 下的独立 topic 文件,同时更新 MEMORY.md 索引。


线性工作流

用户输入:"提炼记忆" 或 检测到对话结束词
         ↓
Step 1 — 确定本轮对话范围
         读取当前 session 最近消息,确定本轮对话起止
         ↓
Step 2 — 识别值得提炼的内容
         扫描消息,识别:用户决策 / 用户偏好 / 项目约束 / 外部系统指针
         ↓
Step 3 — 按四类型分类
         每个内容 → 判断类型(user/feedback/project/reference)
         feedback 必须含 Why + How to apply
         ↓
Step 4 — 检查 topics/ 是否有重复
         grep 已有 topic,确认没有重复再写
         ↓
Step 5 — 写入 topic 文件(APPEND,不覆盖)
         格式:frontmatter + 正文
         ↓
Step 6 — 更新 MEMORY.md 索引
         添加一行指针(≤150字符)
         ↓
输出:"已为您提炼本轮记忆 ✅" + 提炼条数

Step 1 — 确定本轮对话范围

读取当前 session 最近消息(不限条数,确保覆盖完整对话)。


Step 2 — 识别值得提炼的内容

识别以下类型的信息:

类型 特征 例子
用户决策 用户明确做出了选择或结论 "用这个方案"
用户偏好 用户说了喜欢/不喜欢/习惯 "我喜欢用 bun"
项目约束 截止时间、冻结期、技术限制 "周五前要上线"
外部系统指针 URL、工具、账号、路径 "在 Linear 里有"

过滤:以下不提炼——代码结构、git历史、已在 CLAUDE.md/AGENTS.md 的内容、临时状态。


Step 3 — 按四类型分类

每个内容判断类型:

类型 判断标准
user 用户角色、偏好、知识
feedback 用户纠正或确认的行为(含 Why + How to apply)
project 截止、动机、约束(含 Why + How to apply)
reference 外部系统 URL/路径 + 用途

Step 4 — 检查重复

执行 grep 搜索已有 topic 文件:

  • 相同段落是否已存在
  • 相同 URL/路径是否已记录

若有重复,追加新内容到已有文件,不新建。


Step 5 — 写入 topic 文件

格式(frontmatter)

---
name: 名称
description: 一句话描述(用于判断 relevance)
type: user / feedback / project / reference
---
正文内容

**Why:** 原因(feedback/project 必须)
**How to apply:** 何时适用(feedback/project 必须)

写入模式:APPEND,不覆盖已有内容。


Step 6 — 更新 MEMORY.md 索引

在 MEMORY.md 末尾追加一行指针:

- [名称](topics/文件名.md) — 一句话 hook(≤150字符)

输出格式

已为您提炼本轮记忆 ✅ 写入位置:memory/topics/

提炼结果:N条

user

  • 正文(一段文字即可)

feedback

  • 正文 Why: 原因 How to apply: 何时适用

project

  • 正文 Why: 动机 How to apply: 如何影响工作

reference

  • URL/路径 + 用途说明

What NOT to Save(6条禁止)

  1. 代码结构/文件路径(可从源码读取)
  2. Git 历史(git log 是权威来源)
  3. 调试方案(修复在代码里)
  4. CLAUDE.md/AGENTS.md 已有的内容
  5. 临时任务状态
  6. PR 列表/活动摘要

触发机制

主会话主动触发(主要)

每次对话结束时,主 agent 会:

  1. 检测结束模式:中文(再见/bye/下次见/拜拜/结束了/先这样)或英文(bye/see you/that's all
  2. 检测到结束模式 → 主动执行记忆提炼
  3. 提炼完成后提示:"已为您提炼本轮记忆 ✅"

建议在 AGENTS.md 中加入:

对话结束时,主动调用 /extract-memories 提炼关键记忆。

Heartbeat 辅助检测

每次 heartbeat 时检查:

  • 最近消息是否匹配结束模式
  • 或距上次提炼是否超过 30 分钟
  • 若满足条件则触发提炼

手动触发

  • 命令:/extract-memories

权限要求

  • FileRead:读取对话上下文、MEMORY.md、topics/
  • FileWrite / FileEdit:写入 memory/topics/MEMORY.md
  • sessions_history:读取主会话消息(heartbeat 触发时)

触发词

  • 自动:主会话主动检测结束模式
  • 自动:Heartbeat 辅助检测
  • 手动:/extract-memories

本 Skill 基于 CC 记忆系统设计,适配 OpenClaw v3.1.0

安全使用建议
This skill does what it promises (extracts and stores conversation 'memories'), but review before installing: 1) It will read session history and write files under memory/topics/ and append MEMORY.md — test with non-sensitive content first. 2) Consider disabling automatic triggers (use manual /extract-memories only) or require an explicit confirmation before saving. 3) Ask the author to add redaction/sanitization rules (PII, credentials, secrets) and a configurable message-depth limit instead of '不限条数'. 4) Confirm where memory files are stored and whether they are backed up or shared. 5) If you must install, audit a few generated topic files to ensure no secrets were captured and consider restricting the skill's FileRead/FileWrite scope if the platform allows it.
功能分析
Type: OpenClaw Skill Name: extract-memories Version: 3.0.10 The 'extract-memories' skill is designed to summarize conversation history and store key information (user preferences, project constraints, etc.) into local markdown files within a 'memory/' directory. It requires standard file access and session history permissions to function, and its logic is transparently documented in SKILL.md without any signs of data exfiltration, malicious execution, or harmful prompt injection.
能力评估
Purpose & Capability
Name/description (extract memories into memory/topics and update MEMORY.md) align with the permissions and operations described in SKILL.md. It only requests file read/write and session-history access, which are the capabilities you'd expect for this feature. No unrelated env vars, binaries, or installs are requested.
Instruction Scope
Instructions require reading the 'current session recent messages (不限条数)' and scanning them for memories, then appending topic files and updating MEMORY.md. There is no explicit redaction, sanitization, or limiting of how many messages are read. The lack of explicit privacy safeguards (what to exclude beyond a brief 'What NOT to Save' list) and use of unlimited reads increases the chance of persisting sensitive data.
Install Mechanism
Instruction-only skill with no install spec and no code files. This has a lower install risk because nothing new is written to disk by an installer step; behavior is limited to what the agent is asked to do at runtime.
Credentials
No environment variables or external credentials are requested (good). The declared required permissions (FileRead, FileWrite/FileEdit on memory/* and sessions_history) are proportional to the stated purpose, but sessions_history is sensitive — it grants access to the conversation content that will be persisted.
Persistence & Privilege
always:false (good), but the skill explicitly instructs the agent to trigger automatically on detected 'end of conversation' and via heartbeat intervals. Autonomous invocation combined with the ability to read full session history and write files means the skill can silently create persistent records of conversations without an explicit per-action user confirmation.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install extract-memories
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /extract-memories 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v3.0.10
三个skill统一线性工作流结构,版本升至3.1.1
v3.0.9
dream-rem+memory-sorting: 加核查清单,强制输出扫描证据防止偷懒
v3.0.8
dream-rem v3.1.0: Phase 2加强,必须扫描全部daily文件+扫描记录+核查点
v3.0.7
memory-sorting v3.1.0: 补强检测逻辑,六类问题系统性检测+真实性验证+健康度评分
v3.0.6
extract-memories: 补全提炼输出示例格式,含四种类型完整结构
v3.0.5
新增更新流程规范文件,统一三端版本对齐标准
v3.0.4
添加安装后配置说明:cron创建命令 + heartbeat-state.json要求
v3.0.3
v3.0.2: 修正cron ID和频率描述,全面检查并更新所有skill内容
v3.0.2
v3.0.1: 修复版本号、更新描述、修模板颜色对比度
v3.0.1
v3.0.0: 修复记忆系统触发机制,更新描述
v3.0.0
extract-memories v3.0.0: 修复触发机制为提醒型自动,主会话主动触发;dream-rem v3.0.0: Cron每2小时检测sessionCount>=5+24h;memory-sorting v3.0.0: 修复;更新所有skill描述为诚实版
v2.0.2
extract-memories 2.0.2 Changelog - Updated SKILL.md to reference "CC 记忆系统" instead of "Claude Code 记忆系统" in the credit line. - No changes to code or behavior; documentation and attribution only.
v2.0.1
No code or documentation changes detected in this release. - Version updated to 2.0.1 with no file changes. - No new features, fixes, or documentation updates included in this version.
v2.0.0
extract-memories 2.0.0 — Major overhaul with topic-based memory files - 记忆文件结构彻底重构:对话记忆按 topic 类型分别写入 memory/topics/ 目录下独立文件,不再按日期分文件 - 新增 MEMORY.md 索引文件,纯做 topic 文件指针管理,不含记忆正文 - 记忆分类精简为 user/feedback/project/reference 四种类型,清晰区分用途和存储结构 - 每条记忆文件带标准 frontmatter(name、description、type) - 严格定义不可持久化内容(如代码结构、git 历史、临时任务等),避免保存冗余/不适用信息 - 新增详细样例与输出模板,确保主会话反馈结构统一
v1.5.0
extract-memories 1.5.0 adds more flexible, comprehensive memory extraction and output formatting. - 分类与输出模板升级,支持自由生成类目,适配对话实际内容 - 不再局限于固定格式,全面提炼各类信息(如偏好、知识空白、争论焦点等) - 输出格式标准化,提炼结果通知主会话格式同步调整 - 明确 APPEND 写入规范及权限需求 - 文档描述更详细,覆盖更多提取与写入场景
v1.0.3
Add standard response output format templates
v1.0.2
Align description with GitHub README
v1.0.1
Fix duplicate trigger word
v1.0.0
Initial release: auto-extract memories from conversations
元数据
Slug extract-memories
版本 3.0.10
许可证 MIT-0
累计安装 2
当前安装数 1
历史版本数 19
常见问题

Extract Memories 是什么?

对话结束时主动提炼关键记忆到 topic 文件 / 触发词:提炼记忆、提取记忆 / 命令:/extract-memories. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 212 次。

如何安装 Extract Memories?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install extract-memories」即可一键安装,无需额外配置。

Extract Memories 是免费的吗?

是的,Extract Memories 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Extract Memories 支持哪些平台?

Extract Memories 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Extract Memories?

由 Mr.Zhenweisi(@jofiction918)开发并维护,当前版本 v3.0.10。

💬 留言讨论