← Back to Skills Marketplace
sdt328606

Session Sync

by sdT328606 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
37
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install stitch-session-sync
Description
Cross-session memory sync protocol. Ensures memory consistency across Feishu, webchat, and any other channels.
README (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 天归档脚本
Usage Guidance
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install stitch-session-sync
  3. After installation, invoke the skill by name or use /stitch-session-sync
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug stitch-session-sync
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Session Sync?

Cross-session memory sync protocol. Ensures memory consistency across Feishu, webchat, and any other channels. It is an AI Agent Skill for Claude Code / OpenClaw, with 37 downloads so far.

How do I install Session Sync?

Run "/install stitch-session-sync" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Session Sync free?

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

Which platforms does Session Sync support?

Session Sync is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Session Sync?

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

💬 Comments