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

restart-guard重启守卫

Agent Skill

restart-guard 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

68,466

周安装

2,941

GitHub Stars

4

下载量

23,999
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install restart-guard

简介

确定性 OpenClaw 网关重新启动,具有向下/向上状态机验证、原始会话主动 ACK 和向后兼容配置。

SKILL.md

name
restart-guard
version
2.2.0
description
Deterministic OpenClaw gateway restart with down/up state-machine verification, origin-session proactive ACK, and backward-compatible config.
metadata
{"openclaw":{"requires":{"bins":["python3","curl"],"env":["GATEWAY_AUTH_TOKEN"],"env_any":["TELEGRAM_BOT_TOKEN","DISCORD_WEBHOOK_URL","SLACK_WEBHOOK_URL","RESTART_GUARD_WEBHOOK_URL","FEISHU_WEBHOOK_URL"]}}}

Restart Guard

Purpose / 目标

Safely restart gateway while preserving context and guaranteeing a post-restart report path to the user session. 安全重启网关,保留上下文,并保证重启后可主动回报到用户会话。

Trigger / 触发条件

Use this skill when the task involves OpenClaw gateway restart, watchdog recovery, or post-restart reporting. 当任务涉及 OpenClaw 网关重启、看门狗恢复、重启后回报时使用。

Natural-language triggers (must auto-run, do not ask user for script commands):

  • "可以重启了"
  • "现在重启吧"
  • "restart now"
  • "go ahead and restart"

自然语言触发(必须自动执行,不让用户手工跑脚本):

  • “可以重启了”
  • “现在重启吧”
  • “restart now”
  • “go ahead and restart”

Required Preconditions / 前置条件

  • openclaw CLI is available.
  • Restart config exists (config.example.yaml or config/restart-guard.yaml.example copied to runtime path).
  • Agent can execute shell commands.
  • openclaw CLI 可用。
  • 重启配置文件存在(从示例拷贝到运行路径)。
  • agent 具备执行命令能力。

Workflow / 标准流程

0) Default behavior / 默认行为

When user expresses restart intent without specifying channel details:

  • Run full flow automatically via scripts/auto_restart.py.
  • Default --notify-mode origin.
  • Infer origin session key automatically (env/context/sessions), no user input required.
  • Auto-discover external channels and persist effective_notify_plan.
  • Before trigger, proactively announce disaster delivery route/channels to origin session.
  • After restart event arrives, net summarizes result to user.

当用户仅表达重启意图且未指定渠道细节时:

  • 使用 scripts/auto_restart.py 自动执行全流程。
  • 默认 --notify-mode origin
  • 自动推断源会话 key(env/context/sessions),无需用户补参数。
  • 自动发现外部渠道并写入 effective_notify_plan
  • 触发前先在源会话预告灾难通知路由与渠道。
  • 收到重启事件后,由 net 向用户汇总结果。

1) Discover channels and mode / 发现渠道与模式(可选)

python3 <skill-dir>/scripts/discover_channels.py --config <config-path> --json

Ask user:

  • notify mode (origin recommended, or selected, all)
  • selected channel/target if needed

询问用户:

  • 通知模式(推荐 origin,可选 selectedall
  • 若需要,指定渠道与目标

2) Write context / 写入现场

python3 <skill-dir>/scripts/write_context.py \
  --config <config-path> \
  --reason "config change" \
  --verify 'openclaw health --json' 'ok' \
  --resume "report restart result to user"

3) Execute restart / 执行重启

Recommended one-command entry:

python3 <skill-dir>/scripts/auto_restart.py \
  --config <config-path> \
  --reason "config change" \
  --notify-mode origin

推荐单命令入口:

python3 <skill-dir>/scripts/auto_restart.py \
  --config <config-path> \
  --reason "配置变更" \
  --notify-mode origin
python3 <skill-dir>/scripts/restart.py \
  --config <config-path> \
  --reason "config change" \
  --notify-mode origin \
  --origin-session-key <session-key>

Selected channel mode:

python3 <skill-dir>/scripts/restart.py \
  --config <config-path> \
  --reason "config change" \
  --notify-mode selected \
  --channel telegram \
  --target 726647436

4) Postcheck / 事后校验

python3 <skill-dir>/scripts/postcheck.py --config <config-path>

Contract / 契约

  • Event contract: restart_guard.result.v1
  • Required fields: status, restart_id
  • Context adds:

- restart_id - origin_session_key - notify_mode - channel_selection - effective_notify_plan - state_timestamps - diagnostics_file - delivery_status

  • Optional event fields:

- severity - failure_phase - error_code - delivery_attempts - delivery_route - delivery_exhausted - diagnostics_file

Notes / 注意事项

  • webui is not treated as disabled notification anymore; origin-session ACK is primary path.
  • webui 不再视为禁用通知;主路径是回发到发起会话。
  • Verify/diagnostics commands run in strict non-shell mode.
  • 校验/诊断命令以严格非 shell 模式执行(包含管道等 shell 元字符会被拒绝)。
  • For implementation-level replication details, see ENHANCED_RESTART_IMPLEMENTATION_SPEC.md.
  • 若需按工程级标准复刻实现,请参考 ENHANCED_RESTART_IMPLEMENTATION_SPEC.md
  • Do not expose internal scripts/steps unless user explicitly asks for internals.
  • 除非用户明确要求细节,否则不要向用户暴露内部脚本步骤。
  • Guardian uses strict success invariant:

- down_detected && start_attempted && up_healthy

  • Guardian success requires strict invariant:

- down_detected && start_attempted && up_healthy

Failure Handling / 故障处理

  • On timeout/failure, guardian writes local diagnostics file (restart-diagnostics-<restart_id>.md/json), sends concise summary, and retries delivery within budget.
  • 若超时或失败,guardian 会写本地诊断文件(restart-diagnostics-<restart_id>.md/json),发送简要摘要,并在预算内重试送达。
  • Fixed disaster route: origin session -> agent:main:main -> all discovered external channels.
  • 固定灾难路由:源会话 -> agent:main:main -> 所有已发现外部渠道
  • Guardian exits after successful delivery or budget exhaustion; no long-lived watchdog process after disaster handling.
  • 灾难处理结束后(送达成功或预算耗尽)guardian 必须退出,不长期驻留。

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenClaw

97.75%
按下载量换算23,459

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

未展示

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills