← Back to Skills Marketplace
minmengxhw-cpu

Enhanced Memory System V3

by minmengxhw-cpu · GitHub ↗ · v1.3.0 · MIT-0
cross-platform ⚠ suspicious
87
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install enhanced-memory-v3
Description
完整记忆系统 - 文件系统记忆 + 向量搜索 + 四类记忆分类 + AutoDream 自动整合
README (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 个会话

整合任务:

  1. 扫描现有记忆文件
  2. 识别过时信息并删除
  3. 更新 MEMORY.md 索引
  4. 合并重复记忆

工具

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)

Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install enhanced-memory-v3
  3. After installation, invoke the skill by name or use /enhanced-memory-v3
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.3.0
v1.3.0: AutoDream LLM整合调用
Metadata
Slug enhanced-memory-v3
Version 1.3.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Enhanced Memory System V3?

完整记忆系统 - 文件系统记忆 + 向量搜索 + 四类记忆分类 + AutoDream 自动整合. It is an AI Agent Skill for Claude Code / OpenClaw, with 87 downloads so far.

How do I install Enhanced Memory System V3?

Run "/install enhanced-memory-v3" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Enhanced Memory System V3 free?

Yes, Enhanced Memory System V3 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Enhanced Memory System V3 support?

Enhanced Memory System V3 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Enhanced Memory System V3?

It is built and maintained by minmengxhw-cpu (@minmengxhw-cpu); the current version is v1.3.0.

💬 Comments