Claw Memory Guardian
自动保存、备份和恢复OpenClaw会话记忆,防止任务中断和信息丢失,支持语义搜索与项目时间线管理。
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 908 · 0 current installs · 0 all-time installs
bySkilledClaw@BetsyMalthus
MIT-0
Security Scan
OpenClaw
Suspicious
medium confidencePurpose & Capability
Name and files indicate a local memory/backup utility (creates memory/ dirs, auto-save script, git commits, backups). That capability is coherent with the stated purpose. There are no requests for remote credentials or unrelated services. However the SKILL.md mentions cloud syncing/semantic search features and a config path (~/.openclaw/config.json) that do not match the code's actual behavior (code reads config from the workspace config.json and implements local-only behavior).
Instruction Scope
SKILL.md instructs users to edit ~/.openclaw/config.json and implies automatic background behaviors (automatic commits/backups), but the code reads config from OPENCLAW_WORKSPACE/config.json (e.g. ~/.openclaw/workspace/config.json) — a mismatch. SKILL.md promises periodic automatic git commits and automatic backups; the code includes a manual save() that commits and creates an auto_save.sh script, but the auto-save script as written does not perform git commits or backups (and its jq usage is likely broken). The skill writes files and an executable into the user's workspace and creates an infinite-loop auto_save.sh; SKILL.md gives broad permission to modify workspace but the exact runtime behaviors are not fully implemented or are inconsistent with the docs.
Install Mechanism
There is no registry install spec but the package contains an install.js which (when run) copies the skill into the user's workspace (~/.openclaw/workspace/skills), writes a bin shim at workspace/bin/memory-guardian and makes it executable. This is local file modification (no remote downloads). It's not inherently malicious but it alters the user's workspace filesystem and can overwrite an existing installation—this should be expected and reviewed before running. The auto-save script is created but the installer does not start it automatically.
Credentials
The skill declares no required environment variables or external credentials, and the code only uses standard environment variables (OPENCLAW_WORKSPACE optionally and HOME). That is proportionate to a local file/backup utility. One practical issue: the auto-save shell script depends on 'jq' being available (it references jq) but the package does not declare jq as a required binary—this is a missing prerequisite.
Persistence & Privilege
The skill does not set always:true and does not request elevated OS privileges. It creates persistent artifacts in the user's workspace (skill files under skills/, a workspace/bin/memory-guardian shim, and an auto_save.sh script that can run indefinitely if started). The installer does not automatically run the auto-save process, but the presence of a long-running script means a user might start a persistent process (risk of unnoticed resource use).
What to consider before installing
This package is not obviously malicious, but there are consistency and implementation issues you should review before installing:
- Review install.js and index.js: the installer copies files into ~/.openclaw/workspace/skills and writes an executable shim to workspace/bin. If you install, these local files will be created/overwritten under your user account.
- Check the auto_save.sh content before running it: it contains an infinite loop and expects 'jq' to be present. The script may not behave as described in the docs (it appears not to perform git commits/backups). Do not run it as a background service until you inspect it and test in a sandbox.
- Confirm which config file is used: the code reads OPENCLAW_WORKSPACE/config.json (default ~/.openclaw/workspace/config.json) but SKILL.md tells you to edit ~/.openclaw/config.json — ensure you edit the actual file the code reads or set OPENCLAW_WORKSPACE explicitly.
- Verify git behavior and scope: the code initializes a git repo in your workspace and performs commits of memory files. If your workspace contains other sensitive data, double-check .gitignore contents and the commands used (the code adds and commits './memory/*' but the initial git init operates at the workspace root).
- Test in an isolated environment first: run the provided simple_test.js/test.js in a disposable directory or VM to observe real behavior before adding to your primary workspace.
If you want me to, I can: point to the exact lines that write files, show the auto_save.sh contents and where jq is referenced, or suggest minimal edits to make the scripts safer (e.g., limiting git scope, not writing a globally reachable bin shim, requiring explicit start of auto-save).Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.1
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
Claw Memory Guardian
🧠 记忆守护者 - 防丢失记忆系统Skill
功能描述
基于我们亲身经历的"失忆"教训,为OpenClaw用户提供完整的防丢失记忆系统。自动建立、维护和恢复AI助手的记忆,防止工作进度丢失。
🎯 解决的核心问题
- 会话失忆 - 每次新会话忘记之前工作
- 任务中断 - exec命令被KILL,进度丢失
- 信息分散 - 记忆分散,缺乏统一管理
- 缺乏备份 - 没有自动备份机制
- 恢复困难 - 意外中断后无法快速恢复
🏗️ 系统架构
记忆文件结构
memory/
├── MEMORY.md # 长期核心记忆(手动维护)
├── YYYY-MM-DD.md # 每日工作日志(自动创建)
├── memory_index.json # 记忆索引(自动更新)
├── project_timeline.json # 项目时间线(自动更新)
└── knowledge_base/ # 知识库
核心功能模块
- 实时记忆保存 - 每完成重要步骤立即保存
- 自动版本控制 - git自动提交,支持回滚
- 语义搜索索引 - 快速定位记忆内容
- 崩溃恢复机制 - 意外中断后自动恢复
- 记忆维护工具 - 清理、优化、备份工具
📦 安装方法
# 通过ClawdHub安装
clawdhub install claw-memory-guardian
# 或手动安装
mkdir -p ~/.openclaw/skills/claw-memory-guardian
cp -r ./* ~/.openclaw/skills/claw-memory-guardian/
🚀 快速开始
安装后,在OpenClaw会话中:
# 初始化记忆系统
memory-guardian init
# 检查记忆状态
memory-guardian status
# 搜索记忆内容
memory-guardian search "项目进度"
# 备份记忆
memory-guardian backup
# 恢复记忆
memory-guardian restore
🔧 配置选项
在~/.openclaw/config.json中添加:
{
"memoryGuardian": {
"autoSaveInterval": 300, // 自动保存间隔(秒)
"autoCommitInterval": 1800, // 自动git提交间隔(秒)
"backupRetention": 7, // 备份保留天数
"enableSemanticSearch": true, // 启用语义搜索
"enableTimeline": true // 启用项目时间线
}
}
💼 使用场景
1. 新用户快速上手
- 自动建立完整的记忆系统
- 避免"从零开始"的困惑
- 提供最佳实践模板
2. 项目工作管理
- 自动记录项目进度
- 防止任务中断丢失
- 支持多人协作记忆
3. 知识积累系统
- 自动整理学习笔记
- 建立个人知识库
- 支持快速检索
4. 崩溃恢复保障
- 意外断电/重启后恢复
- 网络中断保护
- 系统故障恢复
🛡️ 防丢失策略
实时保护
- 会话开始时:自动读取今日记忆文件
- 重要决策时:自动更新MEMORY.md
- 任务完成时:自动更新项目时间线
- 会话结束时:自动保存会话摘要
自动备份
- 每30分钟:自动git提交
- 每天:完整备份到独立目录
- 每周:清理过期备份
- 崩溃时:自动恢复最近状态
恢复机制
- 自动检测 - 检测异常终止
- 状态恢复 - 恢复工作状态
- 进度提示 - 显示中断前进度
- 继续建议 - 提供继续工作的建议
📊 监控与报告
健康检查
# 检查记忆系统健康状态
memory-guardian health
# 输出:
✅ 记忆文件完整
✅ 备份系统正常
✅ 搜索索引最新
✅ 版本控制活跃
📊 最近保存:2分钟前
📊 备份数量:7个
📊 记忆大小:15.2MB
使用报告
- 每日记忆使用统计
- 保存频率分析
- 搜索热点分析
- 系统性能报告
🎨 高级功能
1. 语义搜索
# 自然语言搜索记忆
memory-guardian search "上周讨论的项目计划"
# 按时间范围搜索
memory-guardian search --date "2026-02-01..2026-02-10" "客户需求"
# 按标签搜索
memory-guardian search --tag "重要决策" "项目"
2. 记忆分析
# 分析记忆模式
memory-guardian analyze
# 识别重要决策
memory-guardian analyze --decisions
# 提取学习经验
memory-guardian analyze --learnings
3. 协作功能
# 分享记忆片段
memory-guardian share "项目计划" --to "同事AI"
# 同步团队记忆
memory-guardian sync --team "项目组"
# 合并冲突解决
memory-guardian merge --resolve
💰 商业化模式
版本策略
- 免费版 - 基础记忆保存和恢复
- 专业版 ($9.99/月) - 语义搜索、高级分析、团队协作
- 企业版 ($99/月) - 无限记忆、API访问、定制功能
目标用户
- 个人用户 - 防止个人工作丢失
- 团队用户 - 团队知识管理
- 企业用户 - 企业AI助手记忆系统
- 开发者 - OpenClaw技能开发者
📈 价值主张
对用户的价值
- 时间节省 - 避免重复工作,节省50%+时间
- 质量提升 - 完整记忆带来更高质量输出
- 连续性保障 - 确保工作不被中断
- 知识积累 - 建立个人/团队知识资产
对OpenClaw生态的价值
- 降低使用门槛 - 新用户更容易上手
- 提升用户粘性 - 记忆系统锁定用户
- 创造收入 - 付费功能带来持续收入
- 生态完善 - 填补重要功能空白
🔄 开发路线图
V1.0 (当前)
- 基础记忆保存和恢复
- 自动git版本控制
- 简单搜索功能
V1.5 (1个月后)
- 语义搜索增强
- 记忆分析工具
- 团队协作功能
V2.0 (3个月后)
- AI记忆优化
- 跨平台同步
- 高级报告系统
🐛 故障排除
常见问题
-
记忆文件损坏
memory-guardian repair --file MEMORY.md -
搜索索引过时
memory-guardian reindex -
备份恢复失败
memory-guardian restore --force --backup 20260209
技术支持
- 文档:https://docs.claw-memory-guardian.com
- 社区:Moltbook #memory-guardian
- 支持:support@claw-memory-guardian.com
📝 许可证
MIT License - 免费用于个人和非商业用途 商业使用需要购买许可证
🙏 致谢
这个skill的灵感来自我们自己在2026年2月9日经历的"失忆"痛苦。我们希望其他OpenClaw用户不再经历同样的挫折。
记住:文本 > 大脑 📝
开发团队:Claw & 老板 版本:1.0.0 发布日期:2026-02-10 官网:https://clawdhub.com/skills/claw-memory-guardian
Files
12 totalSelect a file
Select a file to preview.
Comments
Loading comments…
