← 返回 Skills 市场
sdt328606

Session Sync

作者 sdT328606 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
37
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install stitch-session-sync
功能描述
Cross-session memory sync protocol. Ensures memory consistency across Feishu, webchat, and any other channels.
使用说明 (SKILL.md)

Session Sync — 跨 Session 记忆同步

问题

每个 session(飞书、webchat、新建 session)的对话上下文是独立的。 如果不主动同步,切换通道后会"失忆"。

解决方案

共享文件是唯一的跨 session 记忆桥梁。

📥 Session 启动时(必做)

  1. 读取 memory/YYYY-MM-DD.md(今天和昨天的)
  2. 读取 MEMORY.md 获取长期记忆
  3. 读取 memory/SESSION-STATE.md 获取最新任务状态
  4. 检查是否有其他活跃 session:
sessions_list(activeMinutes=120, messageLimit=3)

如果有其他 session 有近期活动,读取其历史了解上下文:

sessions_history(sessionKey="\x3Ckey>", limit=10)

📤 Session 运行中(必做)

每当你做了以下事情,立即写入 memory 文件:

  • 开始了一个新任务
  • 做了一个重要决定
  • 获得了新信息
  • 完成了一个任务
  • 切换话题

写入位置:

  • memory/YYYY-MM-DD.md — 当天日志(原始记录)
  • memory/SESSION-STATE.md — 当前活跃任务状态(覆盖更新)

📤 Session 结束前 / 对话间隙(必做)

更新 memory/SESSION-STATE.md

# Session State

## 最后更新
- 时间:YYYY-MM-DD HH:MM
- 通道:feishu / webchat
- session key:xxx

## 当前进行中的任务
- [任务名]:简述状态、下一步

## 最近重要决定
- [决定]:理由

## 待跟进
- [事项]:什么时候跟进

🔄 定期整理(建议每天一次)

memory/YYYY-MM-DD.md 中值得长期保留的内容提炼到 MEMORY.md


⚠️ 关键规则

  1. 不要假设另一个 session 知道你在做什么 — 写下来
  2. 不要假设你自己记得之前聊了什么 — 读文件
  3. SESSION-STATE.md 是"热状态" — 随时覆盖更新
  4. MEMORY.md 是"长期记忆" — 定期整理,不要频繁改
  5. memory/YYYY-MM-DD.md 是"日志" — 只追加,不删除

🧹 日志清理(自动执行)

规则:超过 7 天的 memory/YYYY-MM-DD.md 自动归档到 memory/archive/

触发时机

  • 每次 session 启动时检查一次
  • 执行清理脚本:skills/session-sync/scripts/cleanup-memory.sh

操作

bash skills/session-sync/scripts/cleanup-memory.sh

归档前确保有价值的内容已提炼到 MEMORY.md。


快速命令(给老板用)

  • "同步记忆" → 执行完整的跨 session 同步检查
  • "更新状态" → 更新 SESSION-STATE.md
  • "整理记忆" → 把日志整理到 MEMORY.md
  • "清理日志" → 执行 7 天归档脚本
安全使用建议
Install only if you are comfortable with the agent reading recent history from other sessions and writing shared long-term memory files. Before using it with sensitive work, add clear opt-in commands, review/confirmation before writes and cleanup, and rules that prevent secrets, personal data, or channel-specific confidential information from being copied into shared memory.
能力评估
Purpose & Capability
The core purpose is coherent: cross-session memory sync via shared files. However, the capability is high-impact because it requires reading memory files, active session lists, and recent histories from other channels, then writing persistent shared logs and state.
Instruction Scope
The instructions are mandatory and broad, including startup reads from other sessions and immediate logging of task activity, decisions, new information, completions, and topic switches. They do not define consent, sensitivity filtering, channel separation, or limits on what may be copied into shared memory.
Install Mechanism
The package contains a markdown skill and one shell script. Static scan and VirusTotal telemetry were clean, and there is no evidence of hidden install-time behavior.
Credentials
The requested environment access is purpose-aligned but overbroad for default operation because it spans Feishu, webchat, and other channels and can propagate private or channel-specific context into shared files.
Persistence & Privilege
The skill directs persistent logging to memory/YYYY-MM-DD.md, overwrites SESSION-STATE.md, promotes selected content into MEMORY.md, and automatically archives logs older than seven days. These actions are disclosed but lack confirmation, dry-run, sensitivity review, and retention controls.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install stitch-session-sync
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /stitch-session-sync 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of session-sync for cross-session memory consistency. - Synchronizes memory across Feishu, webchat, and other channels to maintain continuity. - Reads and writes to shared files (`memory/YYYY-MM-DD.md`, `MEMORY.md`, `memory/SESSION-STATE.md`) to persist conversation context and tasks. - Automatically archives daily logs older than 7 days. - Provides quick commands for syncing, state updating, memory organization, and log cleanup.
元数据
Slug stitch-session-sync
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Session Sync 是什么?

Cross-session memory sync protocol. Ensures memory consistency across Feishu, webchat, and any other channels. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 37 次。

如何安装 Session Sync?

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

Session Sync 是免费的吗?

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

Session Sync 支持哪些平台?

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

谁开发了 Session Sync?

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

💬 留言讨论