good-memory

Session 历史记录恢复技能。Session重置后自动恢复对话上下文,解决系统自动重置导致的"失忆"问题。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "good-memory" with this command: npx skills add acilgit/good-memory

Good-Memory v2.0.0

帮助 Agent 在 session 重置后快速恢复对话上下文。通过检测 .reset. 后缀的 session 文件实现,安装后自动运行,无需手动操作

核心特性

  • 全平台支持:支持飞书、Discord、Telegram、Signal等所有OpenClaw平台
  • 零配置:安装后自动生效,不需要修改配置
  • 轻量高效:仅基于文件名匹配,不需要解析文件内容,速度快
  • 低侵入性:默认只修改main的AGENTS.md,不影响其他Agent
  • 自动清理:历史记录最多保留10条,自动清理过期文件

工作原理

  1. 重置检测:每次session启动时自动检测两种重置类型:
    • 显式重置:session 文件被系统添加 .reset. 后缀(系统自动重置 /new /reset 命令触发)
    • 隐式切换:新 session UUID 生成但旧 session 未打 reset 标记(系统自动会话轮换/后台重启触发)
  2. 历史恢复:如果检测到重置/切换,自动读取上一个会话文件的最后50条对话
  3. 自动提示:首条回复会告知用户已恢复历史记录

安装

🚀 一键安装(推荐)

# 下载并安装
curl -sSL https://wry-manatee-359.convex.site/api/v1/download?slug=good-memory | bash -s install

手动安装

# 1. 创建目录
mkdir -p ~/.openclaw/workspace/skills/good-memory
cd ~/.openclaw/workspace/skills/good-memory

# 2. 下载解压
curl -L https://wry-manatee-359.convex.site/api/v1/download?slug=good-memory | unzip -

# 3. 执行安装
bash scripts/install.sh

环境变量(可选)

如果你的OpenClaw安装在非默认路径,可以设置:

export OPENCLAW_BASE="/path/to/your/openclaw"  # 默认:/root/.openclaw
export SESSIONS_DIR="/path/to/sessions"        # 默认:$OPENCLAW_BASE/agents/main/sessions
export AGENTS_MD="/path/to/AGENTS.md"          # 默认:$OPENCLAW_BASE/workspace/AGENTS.md

手动使用

# 查看最新的reset文件
bash ~/.openclaw/workspace/skills/good-memory/scripts/recovery.sh latest

# 读取最新reset的50条记录
bash ~/.openclaw/workspace/skills/good-memory/scripts/recovery.sh read --lines 50

# 列出所有reset文件
bash ~/.openclaw/workspace/skills/good-memory/scripts/recovery.sh list

数据结构

session-tracker.json 格式(简化版):

{
  "description": "Session tracker - maps agent+chat to session files",
  "last_updated": "2026-03-27T15:00:00Z",
  "agents": {
    "main": {
      "ou_123456": {
        "session_key": "",
        "active": "/path/to/current.jsonl",
        "active_uuid": "abc123",
        "last_history": "/path/to/old.jsonl.reset.2026-03-27T15:00:00Z",
        "history": [
          "/path/to/old.jsonl.reset.2026-03-27T15:00:00Z",
          "/path/to/older.jsonl.reset.2026-03-26T10:00:00Z"
        ]
      }
    }
  }
}

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Gigo Lobster Resume

🦞 GIGO · gigo-lobster-resume: 续跑入口:v2 stable 当前会清理旧 checkpoint 并从头重跑;保留此 slug 作为旧 checkpoint 兼容入口。 Triggers: 继续试吃 / 恢复评测 / resume tasting / continue lobster...

Registry SourceRecently Updated
General

YiHui CONTEXT MODE

context-mode is an MCP server that saves 98% of your context window by sandboxing tool outputs. It routes large file reads, shell outputs, and web fetches th...

Registry SourceRecently Updated
General

xinyi-drink

Use when users ask about 新一好喝/新一咖啡 drinks, stores, menu, activities, Skill用户大礼包, today drink recommendations, afternoon tea, feeling sleepy, or personalized...

Registry SourceRecently Updated
General

vedic-destiny

吠陀命盘分析中文入口。用于完整命盘研判、命主盘 Rashi chart 与九分盘 Navamsha chart 联读、既往事件回看、出生时间稳定度判断、事业主题、婚姻主题、时空盘专题,以及基于 Jagannatha Hora PDF、星盘截图或文本命盘数据的系统拆盘。当用户提到完整星盘、事业方向、婚姻问题、关系窗...

Registry SourceRecently Updated