← 返回 Skills 市场
systiger

Memory Distill

作者 systiger · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
206
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install memory-distill
功能描述
对话记忆蒸馏系统。从对话中提取关键信息、压缩长对话为精简摘要、自动分类存储到结构化文件、支持定期清理过期内容。支持 Cron 定时自动执行和 HEARTBEAT 心跳集成。触发词:蒸馏记忆、整理对话、压缩上下文、记忆压缩、清理对话、记忆整理、上下文压缩、定时蒸馏。
使用说明 (SKILL.md)

记忆蒸馏 (Memory Distill)

将对话上下文蒸馏为结构化记忆文件,解决会话上下文溢出问题。

核心功能

功能 说明
提取关键信息 决策、任务、知识点、重要日期、联系信息
压缩摘要 长对话精简为核心要点
分类存储 按类别写入对应的 memory 文件
过期清理 标记或删除过期内容
定时执行 Cron 定时自动蒸馏
心跳集成 HEARTBEAT 轮询时触发

触发方式

1. 手动触发

说:"蒸馏记忆"、"整理对话"、"压缩上下文"

2. Cron 定时(推荐)

配置定时任务,每天自动执行记忆蒸馏。

配置命令:

/openclaw cron add

Cron Job 配置示例:

{
  "name": "每日记忆蒸馏",
  "schedule": { "kind": "cron", "expr": "0 22 * * *", "tz": "Asia/Shanghai" },
  "payload": {
    "kind": "systemEvent",
    "text": "执行记忆蒸馏:分析今日对话,提取决策、任务、知识点,写入 MEMORY.md 和 memory/YYYY-MM-DD.md,生成摘要报告。"
  },
  "sessionTarget": "main",
  "delivery": { "mode": "announce" }
}

时间表达式说明:

  • 0 22 * * * = 每天 22:00
  • 0 9,18 * * * = 每天 9:00 和 18:00
  • 0 22 * * 1-5 = 周一到周五 22:00

3. HEARTBEAT 集成

HEARTBEAT.md 中添加记忆蒸馏任务:

# HEARTBEAT.md

## 定期检查
- [ ] 记忆蒸馏:检查今日对话量,若超过阈值则执行蒸馏

Heartbeat vs Cron 选择:

场景 推荐方式
固定时间执行 Cron
根据对话量动态触发 HEARTBEAT
多任务批量检查 HEARTBEAT

工作流程

步骤 1: 分析对话内容

扫描当前会话历史,识别信息类型:

类型 标识词 存储位置
决策 决定、确认、定下来 MEMORY.md
任务 要做、待办、记得 memory/YYYY-MM-DD.md
知识点 新概念、新发现 MEMORY.md
临时信息 验证码、临时链接 memory/YYYY-MM-DD.md
项目信息 项目名、成员、状态 MEMORY.md
个人偏好 我喜欢、我偏好 USER.md

步骤 2: 提取与分类

结构化输出:

## [日期] 记忆蒸馏摘要

### 决策
- [决策内容] - 上下文:[背景]

### 任务
- [ ] [任务描述] - 截止:[日期]

### 知识点
- [知识点名称]:[详细说明]

步骤 3: 写入记忆文件

  • MEMORY.md ← 重要决策、项目信息、核心知识点
  • memory/YYYY-MM-DD.md ← 当日摘要、临时任务

步骤 4: 生成报告

📊 记忆蒸馏完成

✅ 提取:决策 x 条 | 任务 x 条 | 知识点 x 条
📝 写入:MEMORY.md +x 条 | memory/YYYY-MM-DD.md +x 条

⚠️ 建议 /reset 重置上下文

步骤 5: 清理过期内容

检查 memory/ 目录,提示归档或删除超过保留期的文件。

配置文件

memory/distill-config.json

{
  "retentionDays": 30,
  "autoClean": false,
  "autoReset": false,
  "categories": ["decision", "task", "knowledge", "temporary"],
  "schedule": "0 22 * * *"
}

快速配置定时蒸馏

执行以下命令配置每日 22:00 自动蒸馏:

让小飞配置一个每天 22:00 自动执行记忆蒸馏的 cron job

或手动在 OpenClaw 配置中添加 cron 任务。

最佳实践

  1. 每日定时 - 配置 cron 每天 22:00 自动执行
  2. 重置前确认 - 蒸馏完成后再执行 /reset
  3. 分类存储 - 长期与每日分开,避免臃肿
  4. 定期清理 - 设置 retentionDays 自动过期

注意事项

  • 蒸馏不删除记忆文件,只提取和整理
  • /reset 清空会话上下文,不影响记忆文件
  • 敏感信息需手动标记处理
安全使用建议
This skill appears coherent: it will read your conversation history and write summarized memory files and can schedule itself via Cron or HEARTBEAT. Before enabling it, review where memory files (MEMORY.md and memory/YYYY-MM-DD.md) will be stored, ensure they don't inadvertently contain secrets, set retentionDays and keep autoClean/autoReset disabled unless you want automated deletion/reset, and only add cron/heartbeat entries if you trust the agent to run these tasks. If you need stronger privacy, ask for automatic redaction/encryption or avoid persisting sensitive conversations.
功能分析
Type: OpenClaw Skill Name: memory-distill Version: 1.0.0 The 'memory-distill' skill is a utility designed to manage conversation context by summarizing and categorizing chat history into local markdown files (e.g., MEMORY.md, USER.md). It utilizes standard OpenClaw features like Cron jobs and HEARTBEAT for automation and does not exhibit any signs of data exfiltration, malicious execution, or unauthorized access to sensitive system files.
能力评估
Purpose & Capability
The name/description (distilling conversation memory into structured files, scheduling via Cron/HEARTBEAT) align with the instructions: scanning session history, extracting decisions/tasks/knowledge, writing MEMORY.md and memory/YYYY-MM-DD.md, and configuring cron or heartbeat triggers. No unrelated binaries, env vars, or external services are requested.
Instruction Scope
Instructions explicitly direct the agent to scan the current conversation history and write structured memory files and reports — this is coherent with the purpose. Note: the skill will read user conversation content (potentially sensitive) and persist summaries to workspace files; SKILL.md leaves sensitive-data handling largely to manual marking and does not provide automated redaction or encryption guidance.
Install Mechanism
Instruction-only skill with no install spec or external downloads. Lowest-risk delivery method; nothing is written to disk by an installer beyond the agent following file-write instructions at runtime.
Credentials
No environment variables, credentials, or config paths are required. The requested scope (local file writes, cron/heartbeat integration) is proportionate to the described functionality.
Persistence & Privilege
always:false and normal agent invocation are used. The skill does not request permanent platform-wide privileges or modify other skills' configs. It suggests creating cron jobs and updating HEARTBEAT.md, which is expected for scheduled automation but should be done intentionally by the user.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install memory-distill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /memory-distill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of memory-distill: a system for extracting and condensing key information from conversations. - Automatically summarizes long dialogues, classifies and saves content to structured files, and supports scheduled cleanup of expired items. - Integrates with Cron for scheduled distillation and HEARTBEAT for dynamic triggers. - Supports trigger phrases for manual operation and flexible configuration for retention and scheduling. - Includes best practices, configuration guides, and example workflows in documentation.
元数据
Slug memory-distill
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Memory Distill 是什么?

对话记忆蒸馏系统。从对话中提取关键信息、压缩长对话为精简摘要、自动分类存储到结构化文件、支持定期清理过期内容。支持 Cron 定时自动执行和 HEARTBEAT 心跳集成。触发词:蒸馏记忆、整理对话、压缩上下文、记忆压缩、清理对话、记忆整理、上下文压缩、定时蒸馏。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 206 次。

如何安装 Memory Distill?

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

Memory Distill 是免费的吗?

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

Memory Distill 支持哪些平台?

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

谁开发了 Memory Distill?

由 systiger(@systiger)开发并维护,当前版本 v1.0.0。

💬 留言讨论