📦 虾尊记忆自动管理器 — 技能工具
v1.0.0记忆自动主动管理:每15分钟自动扫描对话,发现重要信息自动写入每日memory。解决"主动感知靠自觉经常失效"的问题。 使用场景: - 每次对话结束后自动检查是否有遗漏的重要信息 - 自动记录完成的任务、决策、教训、配置变更 - 增量扫描对话历史,不遗漏不重复 - user + assistant 消息双读,确保...
0· 45·0 当前·0 累计
安全扫描
OpenClaw
安全
high confidenceThe skill behaves consistently with its stated purpose (periodic scanning of conversation transcripts and writing daily memory files); it does not request unrelated credentials or network installs, but it does persist chat content which has privacy implications.
评估建议
This skill is coherent with its stated goal, but it persistently reads transcripts and writes user/assistant content to disk. Before installing: (1) review whether you want all transcripts (including potential secrets) saved into ~/.openclaw/workspace/memory; (2) consider file permissions or encryption for that directory; (3) check the cron deliver settings (Feishu/channel) to avoid accidentally posting sensitive summaries to external channels; (4) test the script manually (python3 ~/.openclaw/s...详细分析 ▾
✓ 用途与能力
Name/description match what the files and SKILL.md implement: a cron-driven scanner that reads session transcripts and writes daily memory files. Requested tools (exec, read, write) and the presence of scripts (memory-scan.py, setup.sh) are proportionate to this goal. No unrelated external services or credentials are requested.
ℹ 指令范围
SKILL.md and cron messages explicitly instruct running memory-scan.py to read the main session transcript(s) (~/.openclaw/agents/main/sessions/*.jsonl) and to write into ~/.openclaw/workspace/memory/*. That is expected, but it means the skill will persist both user and assistant message contents (up to truncation limits) into durable files — this can capture sensitive data. The instructions also include weekly merging and optional delivery notifications (feishu); those are consistent with the purpose but expand the blast radius (notifications may expose content if channel configuration is broad).
✓ 安装机制
No remote downloads or package installs. setup.sh copies local scripts into ~/.openclaw and registers crons via the openclaw CLI. This is a low-risk local install pattern. One minor mismatch: setup.sh attempts a sed replacement of a hardcoded filename GUID that does not appear in memory-scan.py (harmless but may be a leftover).
✓ 凭证需求
The skill declares no required environment variables or credentials and indeed operates on local filesystem paths. It does read transcripts and writes memory files as expected; no unexplained secrets, API keys, or config paths are requested.
ℹ 持久化与权限
always is false and the skill is user-invocable (normal). It writes persistent files under ~/.openclaw/workspace/memory and creates cron entries to run periodically, which is expected for this function. Because it persists conversation contents and may send notifications, users should be aware of the ongoing presence and storage of chat data — but the requested privileges are consistent with the stated goal and do not modify other skills or system-wide configs.
安全有层次,运行前请审查代码。
运行时依赖
无特殊依赖
版本
latestv1.0.02026/4/15
memory-auto-manager 1.0.0 - 自动化记忆管理系统上线,每15分钟定时扫描对话,主动补录遗漏的重要信息。 - 支持自动记录任务完成、决策、教训、配置变更等关键信息,避免遗忘或重复。 - 实现 user + assistant 消息双读,确保AI回复重要信息不丢失。 - 提供每日自动归档与每周自动合并,方便追踪和汇总历史重要事项。 - 适配 OpenClaw 平台,依赖cron、Python和主会话transcript。
● 无害
安装命令
点击复制官方npx clawhub@latest install xiazun-memory-auto
镜像加速npx clawhub@latest install xiazun-memory-auto --registry https://cn.longxiaskill.com镜像同步中
技能文档
自动记忆管理系统,解决"agent经常忘记记录重要信息"的问题。
核心机制
Hybrid 方案:cron 自动扫描 + AI 对比判断
每15分钟 cron 自动触发
↓
exec 运行 memory-scan.py
↓
读取主会话 transcript .jsonl(增量:只读新消息,user+assistant 都读)
↓
读取当前 memory 文件
↓
AI 分析:对话 vs 现有memory → 判断是否有遗漏
↓
有遗漏 → 写入 memory/YYYY-MM-DD.md + 更新 last-memory-write.json
无遗漏 → 静默结束
判断标准
满足任一 → 必须写入 memory:
- 完成了什么(任务、里程碑)
- 确认了什么(方案、决策)
- 发现了什么(关键数据)
- 犯了什么错(教训、踩坑)
- 配置改了什么
- 有阻塞/待确认
不写入:过程讨论、简单确认、无结论的闲聊
文件结构
~/.openclaw/
├── agents/main/sessions/
│ └── {session-id}.jsonl ← 主会话 transcript
├── scripts/
│ └── memory-scan.py ← 扫描脚本
└── workspace/
├── memory/
│ ├── YYYY-MM-DD.md ← 每日 memory
│ ├── last-memory-write.json ← 上次写入时间
│ └── scan-state.json ← 增量扫描状态
└── HEARTBEAT.md ← 汇报规则
快速安装
Step 1:创建 cron(自动检查,每15分钟)
openclaw cron add \
--name "Memory自动检查V3" \
--every "15m" \
--session isolated \
--message "你是记忆管理员。执行memory扫描:
- exec 运行:python3 ~/.openclaw/scripts/memory-scan.py
- 读取输出的新消息内容(user + assistant)
- 分析是否有重要信息(完成的任务/决策/教训/配置变更)
- 有重要信息?→ 写入 memory/YYYY-MM-DD.md + 更新 last-memory-write.json
- 输出:检查完成,写入X条/无新增
判断标准:
- 完成了什么(任务、里程碑)
- 确认了什么(方案、决策)
- 发现了什么(关键数据)
- 犯了什么错(教训、踩坑)
- 配置改了什么
- 有阻塞/待确认" \
--tools "exec,read,write" \
--no-deliver
Step 2:创建 cron(每周六记忆合并)
openclaw cron add \
--name "每周六记忆合并" \
--cron "0 0 6" \
--tz "Asia/Shanghai" \
--session isolated \
--message "你是记忆管理员。每周六自动执行记忆合并。
- 读取本周所有 memory/YYYY-MM-DD.md 文件
- 提炼重要信息:里程碑/教训/关键数据/配置变更/决策
- 合并写入 MEMORY.md 对应区块
- 更新 last-memory-write.json 的 lastMemoryMerge
- 向用户发送合并完成通知" \
--timeout-seconds 300 \
--deliver \
--channel feishu \
--to "user:ou_xxxxxxxx" # 替换为实际 user id
Step 3:创建 scan-state.json
echo '{"last_scan_ts": 0}' > ~/.openclaw/workspace/memory/scan-state.json
Step 4:确认 transcript 路径
# 找到主会话 transcript 文件
ls -lt ~/.openclaw/agents/main/sessions/*.jsonl | head -1
然后更新 memory-scan.py 中的 TRANSCRIPT 变量,或设置环境变量 MEMORY_SCAN_TRANSCRIPT。
每日 memory 文件格式
# YYYY-MM-DD 工作日志今日完成
- [任务名称]
- 具体内容决策(HH:MM 新增)
- [具体决策及原因]
教训/发现
- [踩坑记录]
配置变更
- [改了哪些配置]
待确认
- [待确认的事项]
last-memory-write.json 格式
{
"lastDailyWrite": "2026-04-15T15:09:00+08:00",
"lastMemoryMerge": "2026-04-05T00:00:00+08:00",
"todayEntries": 8,
"lastEntry": "上一条写入的内容摘要"
}
验证方法
# 查看 cron 状态 openclaw cron list | grep Memory# 查看最近运行记录 openclaw cron runs --id | head -50
# 查看 memory 文件 cat ~/.openclaw/workspace/memory/YYYY-MM-DD.md
# 查看 scan 状态 cat ~/.openclaw/workspace/memory/scan-state.json
局限性
- 无法感知纯 AI 端的思考(transcript 只记录显式消息)
- 如果用户几小时不说话,memory 不会更新
- AI 判断仍有误差可能
依赖
- OpenClaw cron 系统
- Python 3
- 主会话 transcript 文件可访问
版本
- v2.0:增量扫描 + user/assistant 双读
- v1.0:固定窗口扫描 + 只读 user 消息