← Back to Skills Marketplace
wyblhl

Memory Manager

by wyblhl · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
168
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install memory-manager-wyblhl
Description
自动管理 OpenClaw 的记忆系统,包括工作记忆、短期记忆、长期记忆、记忆合并与压缩。 Triggers: memory manager, memory management, 记忆管理,memory compression, memory cleanup
README (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% -

🔐 安全保护

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

记忆管理技能结束

Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install memory-manager-wyblhl
  3. After installation, invoke the skill by name or use /memory-manager-wyblhl
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Added proper YAML frontmatter - unique slug
Metadata
Slug memory-manager-wyblhl
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Memory Manager?

自动管理 OpenClaw 的记忆系统,包括工作记忆、短期记忆、长期记忆、记忆合并与压缩。 Triggers: memory manager, memory management, 记忆管理,memory compression, memory cleanup. It is an AI Agent Skill for Claude Code / OpenClaw, with 168 downloads so far.

How do I install Memory Manager?

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

Is Memory Manager free?

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

Which platforms does Memory Manager support?

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

Who created Memory Manager?

It is built and maintained by wyblhl (@wyblhl); the current version is v1.0.0.

💬 Comments