← 返回 Skills 市场
Enhanced Memory System V3
作者
minmengxhw-cpu
· GitHub ↗
· v1.3.0
· MIT-0
87
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install enhanced-memory-v3
功能描述
完整记忆系统 - 文件系统记忆 + 向量搜索 + 四类记忆分类 + AutoDream 自动整合
使用说明 (SKILL.md)
Memory System 🧠
完整记忆系统 - 文件系统记忆 + 向量搜索 + 四类记忆分类 + AutoDream 自动整合 + Feedback 双向记录
特性
- 📁 文件系统存储 - 基于 Markdown 文件,无数据库依赖
- 🔍 语义搜索 - 支持 Ollama 向量搜索
- ⚡ 自动加载 - 会话启动时自动加载相关记忆
- 💾 Memory Flush - 上下文接近阈值时自动持久化
- 📝 四类记忆分类 - User / Feedback / Project / Reference
- 🔄 Feedback 双向记录 - 同时记录纠正和确认
- 🌙 AutoDream - 定时自动整合记忆,保持记忆新鲜
安装
clawhub install memory-system
核心概念
1. 四类记忆
| 类型 | 作用域 | 用途 | 保存时机 |
|---|---|---|---|
| User | 私密 | 用户角色、偏好、知识 | 了解用户任何细节 |
| Feedback | 私密/团队 | 用户的纠正和确认 | 用户纠正或确认时 |
| Project | 团队 | 项目进展、目标、决策 | 了解项目动态时 |
| Reference | 团队 | 外部系统指针 | 发现外部资源时 |
2. Feedback 双向记录
为什么重要?
只记录"不要做什么" → AI 会变得保守,不敢做决定
双向记录 → AI 既能避免错误,也能复用成功经验
### 不要mock数据库
**Type:** negative
**Why:** 上一季度mock测试通过了但生产迁移失败
**How to apply:** 集成测试必须用真实数据库
### 接受单PR而非多个小PR
**Type:** positive
**Why:** 拆分反而造成不必要的开销
**How to apply:** 重构类需求优先合并为大PR
3. AutoDream 🌙
自动记忆整合系统,在空闲时整理记忆。
触发条件:
- 距离上次整合 >= 24 小时
- 新增 >= 3 个会话
整合任务:
- 扫描现有记忆文件
- 识别过时信息并删除
- 更新 MEMORY.md 索引
- 合并重复记忆
工具
memory_search
语义搜索记忆文件。
{
"query": "用户偏好",
"type": "user",
"topK": 5
}
memory_write
写入或追加记忆。
{
"file": "feedback/dev-rules.md",
"content": "### 不要mock数据库\
**Type:** negative\
**Why:** ...\
**How to apply:** ...",
"type": "feedback",
"mode": "append"
}
memory_flush
手动触发记忆持久化。
{ "force": true }
memory_dream ⭐
执行 AutoDream 记忆整合。
{ "force": false }
- 默认检查触发条件(时间 + 会话数)
force: true强制执行
memory_dream_status
查看 AutoDream 状态。
{}
返回:
- 上次整合时间
- 距下次触发还需多久
- 当前记忆文件数
配置
{
"skills": {
"memory-system": {
"memoryDir": "~/.openclaw/workspace/memory",
"flushMode": "safeguard",
"softThresholdTokens": 300000,
"vectorEnabled": true,
"embeddingModel": "nomic-embed-text",
"autoDream": {
"enabled": true,
"minHours": 24,
"minSessions": 3
}
}
}
}
AutoDream 配置
| 参数 | 默认值 | 说明 |
|---|---|---|
enabled |
true | 是否启用 |
minHours |
24 | 最小触发间隔(小时) |
minSessions |
3 | 最小新增会话数 |
目录结构
memory/
├── MEMORY.md # 索引文件
├── .auto-dream-state.json # AutoDream 状态
├── user/ # 用户记忆
├── feedback/ # 反馈记忆
│ ├── positive/ # 正面确认
│ └── negative/ # 纠正指导
├── project/ # 项目记忆
├── reference/ # 引用记忆
└── sessions/ # 会话历史
最佳实践
保存记忆
了解用户 → 保存到 user/
收到反馈 → 保存到 feedback/
了解项目 → 保存到 project/
发现资源 → 保存到 reference/
格式规范
### [标题]
**Type:** negative | positive
**Why:** [原因]
**How to apply:** [何时应用]
**Date:** YYYY-MM-DD
索引规范
- 每条索引 \x3C= 150 字符
- 绝对日期代替相对日期
- 定期清理过时记忆
版本
1.3.0 - AutoDream 支持 MiniMax LLM 整合
1.2.0 - AutoDream 自动整合系统
1.1.0 - 引入四类记忆分类 + Feedback 双向记录
作者:团宝 (openclaw)
安全使用建议
This skill largely does what it says (file-based memories, vector search, auto-consolidation), but it will: (1) scan and change files under your configured memoryDir, (2) call a third-party MiniMax LLM (sending memory contents) if AutoDream runs and an API key is present, and (3) call a local Ollama embedding endpoint via shell commands. Before installing: review the executeDream/autoDream code path to confirm what gets sent to MiniMax and what files may be deleted or modified; do not provide MINIMAX_CODING_API_KEY unless you trust the MiniMax service and accept that your memory files may be transmitted; consider disabling AutoDream (autoDream.enabled=false) or running the skill in a sandboxed environment; prefer a local Ollama instance for embeddings and audit the child_process usage for injection risk; and if you are concerned about leaking private data, keep sensitive material out of the configured memoryDir or avoid installing this skill.
功能分析
Type: OpenClaw Skill
Name: enhanced-memory-v3
Version: 1.3.0
The skill bundle contains a critical shell injection vulnerability in `src/embed.ts`, where user-provided text is interpolated into a `curl` command executed via `child_process.exec` without sufficient sanitization of shell metacharacters. Additionally, the 'AutoDream' feature in `src/autoDream.ts` exfiltrates potentially sensitive memory data (including 'private' user preferences) to an external third-party API (api.minimaxi.com). While these behaviors are presented as features for memory consolidation and vector embeddings, the combination of insecure command execution and automated file deletion (`fs.unlink`) based on external LLM responses poses a significant risk to system integrity and data privacy.
能力评估
Purpose & Capability
The skill's source code implements the advertised file-based memory, vector search (Ollama), AutoDream consolidation, and read/write of memory files — so overall capability aligns with the description. However, the code requires integration with an external LLM (MiniMax) via an API key (process.env.MINIMAX_CODING_API_KEY) which is not declared in the skill's required env vars/metadata; that omission is an incoherence and a security-relevant surprise.
Instruction Scope
SKILL.md describes AutoDream and file operations, but the runtime code will (a) scan and modify user memory files (add/delete/update), (b) send memory file contents to an external MiniMax API for consolidation, and (c) call a local Ollama endpoint using shell curl. The SKILL.md does not clearly document the external MiniMax endpoint or the need for an API key in configuration/installation instructions, which is scope creep relative to what a casual reader would expect.
Install Mechanism
There is no external installer or download step — the skill is delivered as source files. No package downloads or remote installers are executed at install time. Runtime behavior (network calls, shell exec) is where risks appear, not in an install mechanism.
Credentials
The repository and code read process.env.MINIMAX_CODING_API_KEY (and CHANGELOG documents it) but the registry metadata claimed 'required env vars: none' and did not declare this credential. The code also relies on process.env.HOME and attempts to import OpenClaw internals (sessionStatus) to get token counts. Asking (implicitly) for an external LLM API key that will receive user memory files is a disproportionate secret requirement that was not disclosed.
Persistence & Privilege
always:false (not force-installed) and hooks (onSessionStart, onHeartbeat) are present so the skill can auto-run its AutoDream and auto-load behavior during sessions. Autonomous invocation is platform-default, but here it means AutoDream could periodically scan/modify local memory files and call an external LLM without further user prompts — combine this with the undeclared API key usage for added risk.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install enhanced-memory-v3 - 安装完成后,直接呼叫该 Skill 的名称或使用
/enhanced-memory-v3触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.3.0
v1.3.0: AutoDream LLM整合调用
元数据
常见问题
Enhanced Memory System V3 是什么?
完整记忆系统 - 文件系统记忆 + 向量搜索 + 四类记忆分类 + AutoDream 自动整合. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 87 次。
如何安装 Enhanced Memory System V3?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install enhanced-memory-v3」即可一键安装,无需额外配置。
Enhanced Memory System V3 是免费的吗?
是的,Enhanced Memory System V3 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Enhanced Memory System V3 支持哪些平台?
Enhanced Memory System V3 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Enhanced Memory System V3?
由 minmengxhw-cpu(@minmengxhw-cpu)开发并维护,当前版本 v1.3.0。
推荐 Skills