← 返回 Skills 市场
wyblhl

Memory Manager

作者 wyblhl · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
168
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install memory-manager-wyblhl
功能描述
自动管理 OpenClaw 的记忆系统,包括工作记忆、短期记忆、长期记忆、记忆合并与压缩。 Triggers: memory manager, memory management, 记忆管理,memory compression, memory cleanup
使用说明 (SKILL.md)

🧠 Memory Manager - 记忆管理技能

版本: 1.0 创建时间: 2026-03-19 状态: ✅ 激活


🎯 功能说明

自动管理 OpenClaw 的记忆系统,包括:

  • 工作记忆(最近 7 天)
  • 短期记忆(最近 30 天)
  • 长期记忆(永久保存)
  • 记忆合并与压缩
  • 记忆清理与归档

📁 记忆结构

D:\OpenClaw\workspace\memory\
├── MEMORY.md                    ← 主记忆文件(始终保留)
├── capabilities.json            ← 能力评估(每次学习后更新)
├── knowledge-graph.json         ← 知识图谱(每次学习后更新)
├── learning-round-*.json        ← 学习轮次记录(保留最近 50 轮)
├── conversation-*.json          ← 会话记录(保留最近 10 个)
└── tiers/
    ├── config.json              ← 分层配置
    ├── working/                 ← 工作记忆(7 天)
    ├── short-term/              ← 短期记忆(30 天)
    └── long-term/               ← 长期记忆(永久)

🔄 自动执行任务

每轮学习后

  1. 更新 capabilities.json
  2. 更新 knowledge-graph.json
  3. 创建 learning-round-N.json
  4. 保存到 memory/tiers/working/

每日清理

  1. 合并 7 天前的工作记忆到短期记忆
  2. 合并 30 天前的短期记忆到长期记忆
  3. 删除超过 50 轮的旧学习记录
  4. 生成记忆归档报告

每周优化

  1. 压缩长期记忆文件
  2. 生成记忆统计报告
  3. 优化知识图谱结构

⚙️ 配置参数

{
  "memoryManager": {
    "enabled": true,
    "workingMemoryDays": 7,
    "shortTermMemoryDays": 30,
    "maxLearningRounds": 50,
    "maxConversations": 10,
    "autoCompact": true,
    "compactThreshold": 0.7,
    "mergeStrategy": "summarize"
  }
}

📝 记忆合并策略

合并规则

  1. 相同主题合并: 将相同主题的记忆合并为一条
  2. 时间序列合并: 按时间顺序合并连续的记忆
  3. 重要性分级: 高重要性记忆单独保留
  4. 知识关联: 建立记忆之间的关联边

压缩算法

原始记忆 → 提取关键词 → 生成摘要 → 保存核心信息 → 删除冗余

🚀 使用方法

自动触发

每轮学习完成后自动执行记忆管理

手动触发

# 运行记忆管理
node -e "require('./skills/memory-manager').run()"

# 清理旧记忆
node -e "require('./skills/memory-manager').cleanup()"

# 合并记忆
node -e "require('./skills/memory-manager').merge()"

📊 记忆质量指标

指标 目标 当前
记忆完整度 ≥95% -
检索响应时间 \x3C100ms -
压缩率 ≥50% -
关联准确率 ≥90% -

🔐 安全保护

  • ✅ 合并前自动备份
  • ✅ 删除前确认重要性
  • ✅ 关键记忆永久保留
  • ✅ 错误恢复机制

记忆管理技能结束

安全使用建议
This skill appears to be what it says: a local file-based memory manager. Before installing or enabling it broadly: 1) Review and (if needed) change the hard-coded paths (they point to D:\OpenClaw\workspace and include a probable typo 'workspace\\workspace' for learning outcomes). 2) Backup your existing memory and conversation folders. 3) Run the script in a sandbox or test workspace to confirm behavior. 4) If you need confirmations before deletes, add interactive checks or a dry-run mode; the current implementation copies then deletes files without prompting. 5) Ensure the runtime location matches the SKILL.md usage (require path). If you cannot inspect/modify the code, avoid granting autonomous invocation because it will modify files in your workspace.
功能分析
Type: OpenClaw Skill Name: memory-manager-wyblhl Version: 1.0.0 The memory-manager skill bundle is a utility designed to organize and archive local agent memory files across different tiers (working, short-term, and long-term). The implementation in index.js uses standard Node.js file system modules to move, delete, and summarize JSON records within a hardcoded workspace directory (D:\OpenClaw\workspace\memory), which aligns perfectly with the instructions in SKILL.md. No indicators of data exfiltration, unauthorized network access, or malicious intent were found.
能力评估
Purpose & Capability
Name/description (memory management) aligns with the actual code and SKILL.md: the script only reads/writes/archives/deletes files under D:\OpenClaw\workspace and manages tiers (working/short-term/long-term). There are no extraneous credentials, network calls, or unrelated binaries required.
Instruction Scope
SKILL.md and index.js both instruct file operations (merge, cleanup, archive). That's consistent, but SKILL.md promises interactive safeguards ('删除前确认重要性') and backups while the code performs copies/deletes without user confirmation. Usage examples reference require('./skills/memory-manager') which assumes packaging location; ensure the runtime path matches. The behavior is broad file modification within the workspace (deletion and archiving) — expected for this skill but impactful.
Install Mechanism
No install spec; the skill is instruction+script only. Nothing is downloaded from external URLs and no archives are extracted, so install risk is low.
Credentials
The skill requests no environment variables or credentials. All configuration is hard-coded in the script (absolute Windows paths and retention numbers).
Persistence & Privilege
always is false and model invocation is allowed (default). While that is normal, be aware an agent invoking this skill (autonomously or on user trigger) will perform deletions/archives in your workspace. If you allow autonomous runs, the blast radius is the workspace paths the script touches.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install memory-manager-wyblhl
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /memory-manager-wyblhl 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Added proper YAML frontmatter - unique slug
元数据
Slug memory-manager-wyblhl
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Memory Manager 是什么?

自动管理 OpenClaw 的记忆系统,包括工作记忆、短期记忆、长期记忆、记忆合并与压缩。 Triggers: memory manager, memory management, 记忆管理,memory compression, memory cleanup. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 168 次。

如何安装 Memory Manager?

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

Memory Manager 是免费的吗?

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

Memory Manager 支持哪些平台?

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

谁开发了 Memory Manager?

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

💬 留言讨论