← 返回 Skills 市场
wangjipeng977

session-continuity

作者 王继鹏 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
76
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install session-continuity
功能描述
Use when a session is about to end with unfinished work, after context loss or compaction, after a crash, or when the user wants to resume a multi-step task....
使用说明 (SKILL.md)

Session Continuity

Save your place. Resume exactly where you left off — even days later.


Core Position

Most agents lose all state when sessions die. This skill treats checkpoints as first-class artifacts: written proactively before context is at risk, read automatically on session start, consumed to restore full working context.

This is not "note-taking." A checkpoint is a machine-readable resume signal. If it can't restore the exact next action with enough context to execute it, the checkpoint is incomplete.


Modes

/checkpoint save \x3Cname>

Save current task state to a named checkpoint file. Use before closing any session with unfinished work, before manual reset, approaching context limits, or when the task spans multiple sessions.

Trigger when:

  • About to close a session with active work
  • Context >70% and work is incomplete
  • Multi-day task where tomorrow you need to continue
  • After a milestone, to mark the resume point

Do not use for: trivial one-shot tasks that complete in a single reply.

/checkpoint save meeting-prep
/checkpoint save build-login-page --task "Build login page with OAuth fallback"
/checkpoint save analyze-q1-data

What gets saved:

  • Task name and one-line summary
  • Current progress (what was done)
  • Blockers and uncertainties
  • Exact next action (the very next command or step)
  • Relevant file paths and recent decisions
  • Context snippets critical to continue

Output: Confirmation with checkpoint name and file path.


/checkpoint list

List all available checkpoints in the workspace.

Use when:

  • Starting a new session and want to see what was left open
  • User asks "what was I working on?"
  • About to start work and want to check for existing resume points

Output: Table of checkpoints with name, created time, task summary, and age (how long since last saved).


/checkpoint resume \x3Cname>

Read a checkpoint and restore the session to that resume point.

Trigger when:

  • Session starts and a recent checkpoint exists
  • User says "continue where we left off", "resume task X"
  • You detect \x3Csummary> tag or compaction recovery signals
  • User asks "where did we stop?"

Behavior:

  1. Read the checkpoint file
  2. Present the task summary and last progress
  3. State the exact next action
  4. Confirm before proceeding — user must approve resumption

Output: "Resuming: [task name]. Last progress: [summary]. Next action: [action]. Ready to continue? (yes/no)"


/checkpoint delete \x3Cname>

Delete a named checkpoint. Use when a task is fully complete and the checkpoint is no longer needed.

Do not use for: archiving — delete only when the task is truly done.


Execution Steps

For /checkpoint save \x3Cname>

Before writing, gather context:

  1. Read SESSION-STATE.md — this is the WAL source; it contains active task state, decisions, current goal
  2. Scan conversation history — what has been done since session start?
  3. Verify directory exists — run ls memory/checkpoints/; if missing, create it
  4. Draft checkpoint content — fill every section of the Checkpoint File Format:
    • Task: one-line summary (infer from SESSION-STATE.md and conversation)
    • Progress: specific completed items — file paths, line ranges, command outputs
    • Next Action: exact next step — which file to edit, which command to run
    • Blockers: concrete obstacles with names and error messages
    • Key Decisions: reasoning that led to current state, not just facts
    • Relevant Context: file paths, user preferences, anything not inferable from files alone
  5. Write the completed checkpoint to memory/checkpoints/\x3Cname>.md
  6. Confirm to user: checkpoint name, task, next action

Naming rules (strict):

  • Use kebab-case: build-login-page, q1-data-analysis
  • Must be specific enough to identify the task at a glance
  • Forbidden names: task, work, save, untitled, backup

If SESSION-STATE.md is empty: derive checkpoint content entirely from the conversation. Do not skip the checkpoint just because SESSION-STATE.md is empty.

For /checkpoint resume \x3Cname>

  1. Read memory/checkpoints/\x3Cname>.md
  2. Verify referenced files still exist — check each file path in the checkpoint; flag any that are missing or changed as potentially stale
  3. Present the checkpoint as a structured recovery briefing:
    📌 Resume: \x3Ctask name>
    Saved: \x3Cdate> (\x3Cage>)
    
    ✅ Progress:
    - \x3Citem 1>
    - \x3Citem 2>
    
    🔜 Next action: \x3Cexact command or step>
    
    ⚠️ Stale warnings (if any): \x3Cfiles that no longer exist>
    
  4. Wait for user confirmation ("yes" / "no")
  5. If confirmed: execute the next action; if stale, re-verify paths first
  6. If rejected: delete the checkpoint and start fresh

/checkpoint auto Protocol (internal)

Not a user-invokable mode. The agent scans every message for these trigger signals and acts autonomously:

Trigger signals (scan in priority order):

  1. Context >70% — call session_status; if usedTokens/contextWindow > 0.70, trigger
  2. Close signals — user says "goodnight", "晚安", "logout", "exit", "明天见"
  3. Idle with work — session idle >10 min and SESSION-STATE.md is non-empty
  4. Long operation — about to run a command expected to take >30s

When triggered:

  1. Read current SESSION-STATE.md content
  2. Write to memory/checkpoints/autosave.md (overwrite previous autosave)
  3. Append entry to memory/checkpoints/autosave-log.md
  4. No user-visible output — only write to the log file

Autosave never overwrites named checkpoints. Named checkpoints are preserved indefinitely until explicitly deleted.


Do Not

  • Do not dump raw chat transcript into a checkpoint
  • Do not write vague progress like "worked on the task" — write exact file/state
  • Do not mark a task complete if next action is undefined
  • Do not save checkpoints for trivial one-shot replies
  • Do not overwrite a named checkpoint with autosave (keep named checkpoints intact)
  • Do not resume from checkpoint without presenting summary and confirming
  • Do not delete a checkpoint while the task is still active
  • Do not present a stale checkpoint as current — flag outdated file paths before resuming
  • Do not save a checkpoint without reading SESSION-STATE.md first (or conversation if empty)
  • Do not use forbidden names (task, work, save, untitled, backup)

Quality Bar

A checkpoint is complete when:

  • Task name and summary are clear
  • Progress is specific enough to verify what was done
  • Next action is executable without any additional context from the previous session
  • Blockers are listed with concrete details (file paths, error messages, decisions pending)
  • Relevant decisions are captured (not just facts — the reasoning that led to them)
  • File paths referenced are actual paths, not generic descriptions
  • Age of checkpoint is surfaced at resume (via file mtime, shown to user before confirming)

A checkpoint is incomplete if you have to ask "what were we doing?" after reading it.


Good vs. Bad Examples

Aspect Good Bad
Progress "Wrote src/auth.py lines 45-120, login flow complete" "Worked on auth"
Next action "Run pytest tests/auth_test.py to verify login" "Continue testing"
Blockers "Git conflict in src/main.py lines 80-95" "Need to fix some conflicts"
Context "User prefers verbose error messages" nothing
Naming build-login-page, q1-financial-analysis task, work, save, backup
State source Read SESSION-STATE.md first, then conversation Guessed from memory alone
Staleness Verified file paths exist before presenting Presented as if still current

Checkpoint File Format

# Checkpoint: \x3Cname>

**Created:** YYYY-MM-DD HH:MM GMT+8
**Task:** \x3Cone-line task summary>

## Progress
\x3C!-- What was completed — be specific -->

## Next Action
\x3C!-- Exact next step: file, command, decision -->

## Blockers
\x3C!-- Concrete obstacles: errors, conflicts, pending decisions -->

## Key Decisions
\x3C!-- Reasoning that led to current state, not just facts -->

## Relevant Context
\x3C!-- Files, paths, preferences, anything needed to continue -->

**Age:** Derived from file mtime at resume time (shown automatically by `/checkpoint list` script)

Architecture

memory/
└── checkpoints/
    ├── \x3Cname>.md        # Named checkpoints (user-created)
    └── autosave.md       # Auto-created before risky close events

SESSION-STATE.md           # Active working memory (existing WAL target)
memory/working-buffer.md  # Danger zone log (existing compaction recovery)

Relationship to existing files:

  • SESSION-STATE.md — active task state, written per WAL Protocol. Primary source when saving a checkpoint — read it first.
  • memory/working-buffer.md — danger zone exchanges, consumed on recovery. Check this when checkpoint content is thin.
  • memory/checkpoints/ — durable resume artifacts, survive session death. Named checkpoints never expire unless explicitly deleted.

How WAL and checkpoints differ:

  • WAL (SESSION-STATE.md): per-message decisions, corrections, preferences — updated on every significant human input
  • Checkpoint: task-level resume state — updated at natural break points or when session ends
  • WAL feeds into checkpoint: when saving, read SESSION-STATE.md to populate the checkpoint

The checkpoint system does not replace WAL; it amplifies it for multi-session durability.


References

  • references/checkpoint-format.md — full checkpoint template with examples
  • references/resume-flow.md — step-by-step resume decision tree
  • references/auto-checkpoint-signals.md — trigger signals for auto-checkpoint protocol (internal)
安全使用建议
Install only if you are comfortable with local persistent checkpoints under your OpenClaw workspace. Use simple kebab-case checkpoint names, do not let untrusted text choose checkpoint names or next commands, review checkpoint files before resuming, and avoid saving secrets or credentials in checkpoints.
能力标签
requires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose is coherent with saving and resuming task state. The provided files do not show actual OAuth/token handling despite the capability signals, but the skill intentionally captures task context, file paths, preferences, and next actions for later reuse.
Instruction Scope
The normal resume flow asks for confirmation before continuing, but SKILL.md also says to delete a checkpoint when the user rejects resumption, which could remove a saved resume point without a separate delete confirmation.
Install Mechanism
The registry says there is no install spec and no required binaries, while the repository includes a Python helper and setup.sh. The setup is local and has no external package dependencies, but the runtime helper is under-declared.
Credentials
The helper script writes and deletes files using the raw checkpoint name without enforcing the documented kebab-case naming rule, allowing path traversal outside memory/checkpoints.
Persistence & Privilege
The skill creates persistent local checkpoint and autosave files under the OpenClaw workspace. This is disclosed and purpose-aligned, but it can retain sensitive conversation or project context across sessions.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install session-continuity
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /session-continuity 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: cross-session checkpoint skill with save/list/resume/delete + auto-checkpoint protocol
元数据
Slug session-continuity
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

session-continuity 是什么?

Use when a session is about to end with unfinished work, after context loss or compaction, after a crash, or when the user wants to resume a multi-step task.... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 76 次。

如何安装 session-continuity?

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

session-continuity 是免费的吗?

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

session-continuity 支持哪些平台?

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

谁开发了 session-continuity?

由 王继鹏(@wangjipeng977)开发并维护,当前版本 v1.0.0。

💬 留言讨论