Token导航 LogoToken导航TokenDH.com
效率敏感数据clawhub未标认证来源可访问clear审计提醒

seamless-restart无缝重启

Agent Skill

seamless-restart 用于补充效率相关能力,适合在 OpenClaw 中需要让 Agent 承接效率相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

8,837

周安装

361

GitHub Stars

公开资料未说明

下载量

2,859
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:seamless-restart(无缝重启)
来源仓库:https://github.com/zihaofeng2001/seamless-restart
安装命令:
openclaw skills install seamless-restart
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install seamless-restart

简介

seamless-restart 实现 OpenClaw 网关重启时的上下文自动恢复与通知机制。

  • 适用于需要频繁重启而不丢失会话状态的场景,提升操作连续性。
  • 可在配置文件中定义恢复策略与通知渠道,减少人工干预。
  • 需确保重启前后权限一致,避免因环境变化导致功能异常。
  • 建议在低峰期执行重启操作,并通过日志监控恢复完整性。

SKILL.md

name
seamless-restart
description
>-
metadata
openclaw
emoji
🔄

Seamless Restart

Zero-downtime gateway restart protocol with automatic context recovery. Prevents the common problem where agents lose context and go silent after gateway restarts.

Why This Exists

Gateway restarts (config changes, updates, manual restarts) cause context loss because a new API session starts with no conversation history. Without this protocol, the agent wakes up with no memory of what it was doing and no way to proactively notify the user.

The Protocol

Every gateway restart MUST follow these three steps in order:

Step 1: Save State to NOW.md

Before restarting, update NOW.md in the workspace root with:

# NOW.md - Current State Snapshot

## Last Updated
- **Time**: [current timestamp]
- **Session**: [which channel/chat the user is in]
- **Status**: [what was happening]

## Active Tasks
- [list any in-progress tasks]

## Recent Context
- [key context points the next session needs to know]

## Post-Restart Action
- [specific actions to take after restart, e.g. notify user, continue task]

Keep it concise. This file is read on every session start, so avoid bloat.

Step 2: Notify + Schedule Recovery Cron

Send a pre-restart notification to the user, then schedule a one-shot cron job that fires ~1 minute after restart to trigger recovery:

Send notification:

message(action=send, channel=<current_channel>, target=<current_channel_id>,
  message="⚡ Restarting gateway — back in ~1 minute...")

Schedule recovery cron:

cron(action=add, job={
  "name": "restart-recovery",
  "schedule": {"kind": "at", "at": "<1 minute from now in ISO-8601 UTC>"},
  "payload": {
    "kind": "systemEvent",
    "text": "RESTART RECOVERY: You just restarted. Read NOW.md immediately.
      Then notify the user you are back and summarize what you were doing.
      Send the notification to the same channel the user was in before restart."
  },
  "sessionTarget": "main",
  "enabled": true
})

The cron job is automatically deleted after it fires (one-shot).

Step 3: Execute Restart

Now restart the gateway:

gateway(action=restart, note="<human-readable reason>")

Or for config changes:

gateway(action=config.patch, raw=<config>, note="<reason>")

Both trigger a SIGUSR1 restart.

Post-Restart (Automatic)

When the recovery cron fires after restart:

  1. Read NOW.md to restore context
  2. Send recovery notification to the user confirming the restart completed
  3. Resume any active tasks listed in NOW.md
  4. Clear the Post-Restart Action section of NOW.md (set to "none")

Channel-Specific Notification

Adapt the notification target based on where the user was chatting:

ChannelNotification Method
Discordmessage(action=send, channel=discord, target=<channelId>, guildId=<guildId>)
Telegrammessage(action=send, channel=telegram, target=<chatId>)
OtherUse the channel and target from the pre-restart session

Always include the channel target in the NOW.md so the recovery cron knows where to send.

Edge Cases

Multiple restarts in quick succession: If another restart is needed before the recovery cron fires, cancel the old cron and create a new one. Only one recovery cron should exist at a time.

Restart during sub-agent tasks: Note any running sub-agents in NOW.md. After restart, sub-agents that were in progress will have been terminated. The user should be informed which tasks were interrupted.

Unexpected restarts (crashes): This protocol only covers intentional restarts. For crash recovery, the heartbeat mechanism is the fallback — if the agent misses heartbeats, it should check NOW.md on the next activation.

Integration with AGENTS.md

Add this to your User Rules or Operations section:

- **Gateway restart protocol**: Always use the seamless-restart skill for any
  gateway restart. Three steps: (1) update NOW.md, (2) notify + set recovery cron,
  (3) restart. Never restart without steps 1 and 2.

Example: Full Restart Flow

1. Agent needs to restart for a config change

2. Agent updates NOW.md:
   "Status: Applying new Gemini API key. Session: Discord #misc.
    Post-Restart: Notify Zihao in Discord #misc that config is applied."

3. Agent sends: "⚡ Applying config change — restarting, back in ~1 min..."

4. Agent creates one-shot cron for T+60s:
   systemEvent → "RESTART RECOVERY: Read NOW.md, notify user, resume."

5. Agent calls: gateway(action=config.patch, raw={...}, note="New API key")

6. Gateway restarts. ~60s later, cron fires.

7. Agent reads NOW.md, sends: "✅ Back online. Config change applied successfully."

8. Agent clears Post-Restart Action in NOW.md.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

70.64%
按下载量换算2,020

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills