← All skills
Tencent SkillHub · Developer Tools

优雅重启 Gateway。解决重启后丢失会话上下文的问题,重启前设置一次性 cron 任务,重启后自动发送消息到主会话恢复任务。默认 10 秒后唤醒。触发词:重启、restart

优雅重启 Gateway。解决重启后丢失会话上下文的问题,重启前设置一次性 cron 任务,重启后自动发送消息到主会话恢复任务。默认 10 秒后唤醒。依赖 openclaw CLI。触发词:重启、restart。

skill openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

优雅重启 Gateway。解决重启后丢失会话上下文的问题,重启前设置一次性 cron 任务,重启后自动发送消息到主会话恢复任务。默认 10 秒后唤醒。依赖 openclaw CLI。触发词:重启、restart。

⬇ 0 downloads ★ 0 stars Unverified but indexed

Install for OpenClaw

Known item issue.

This item's current download entry is known to bounce back to a listing or homepage instead of returning a package file.

Quick setup
  1. Open the source page and confirm the package flow manually.
  2. Review SKILL.md if you can obtain the files.
  3. Treat this source as manual setup until the download is verified.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Manual review
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
_meta.json, CHANGELOG.md, graceful-restart.js, SKILL.md

Validation

  • Open the source listing and confirm there is a real package or setup artifact available.
  • Review SKILL.md before asking your agent to continue.
  • Treat this source as manual setup until the upstream download flow is fixed.

Install with your agent

Agent handoff

Use the source page and any available docs to guide the install because the item currently does not return a direct package file.

  1. Open the source page via Open source listing.
  2. If you can obtain the package, extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the source page and extracted files.
New install

I tried to install a skill package from Yavira, but the item currently does not return a direct package file. Inspect the source page and any extracted docs, then tell me what you can confirm and any manual steps still required.

Upgrade existing

I tried to upgrade a skill package from Yavira, but the item currently does not return a direct package file. Compare the source page and any extracted docs with my current installation, then summarize what changed and what manual follow-up I still need.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
1.0.4

Documentation

ClawHub primary doc Primary doc: SKILL.md 10 sections Open source page

触发条件

当用户要求重启 Gateway 时,自动触发此 skill。

问题背景

Gateway 重启后,会丢失上一轮会话的任务上下文,导致: 主会话被中断,无法自动恢复 需要用户手动发送消息才能继续

功能

自动执行"重启后自唤醒"流程: 设置一次性 cron 任务(默认 10 秒后触发) 执行 Gateway 重启 重启后自动发送消息到主会话

English Description

Problem: After Gateway restarts, OpenClaw loses the previous session context - the main session is interrupted and cannot resume automatically. Solution: Auto-restart Gateway with self-wakeup. Sets a one-time cron task (default 10s) before restart, then sends a message to main session after Gateway recovers to resume tasks. ⚠️ Important: Must use this skill, NOT exec: # ✅ Correct node ~/.openclaw/workspace/skills/graceful-restart/graceful-restart.js --task "config changed" # ❌ Wrong exec openclaw gateway restart # Don't do this! Trigger: "重启", "restart Gateway"

使用方式

用户说"重启"时,自动执行: [自动触发 graceful-restart skill] 或者用户可以指定任务: 重启 Gateway,继续之前的任务:安装 Python 包

命令行调用

node ~/.openclaw/workspace/skills/graceful-restart/graceful-restart.js node ~/.openclaw/workspace/skills/graceful-restart/graceful-restart.js --task "继续安装 Python 包" node ~/.openclaw/workspace/skills/graceful-restart/graceful-restart.js --task "继续安装 Python 包" --delay 60

实现原理

使用 --session main + --system-event: Cron 在主会话里注入一个 system event Gateway 重启后,heartbeat 轮询到并交付给主会话 主会话收到消息后回复用户

注意事项

Cron 任务时间可调整(默认 10 秒) 使用 --delete-after-run 确保一次性任务自动清理

📝 更新 SOUL.md

使用此 skill 后,建议在 SOUL.md 中添加自动触发规则(见上方)。

⚠️ 重要:禁止使用 exec

Gateway 重启必须使用此 skill,禁止直接用 exec 执行: ✅ 正确: node ~/.openclaw/workspace/skills/graceful-restart/graceful-restart.js --task "配置已修改,需要重启后生效" ❌ 错误: exec openclaw gateway restart # 禁止! 这样写

Category context

Code helpers, APIs, CLIs, browser automation, testing, and developer operations.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
2 Docs1 Scripts1 Config
  • SKILL.md Primary doc
  • CHANGELOG.md Docs
  • graceful-restart.js Scripts
  • _meta.json Config