← 返回 Skills 市场
2197
总下载
4
收藏
9
当前安装
7
版本数
在 OpenClaw 中安装
/install restart-guard
功能描述
Deterministic OpenClaw gateway restart with down/up state-machine verification, origin-session proactive ACK, and backward-compatible config.
安全使用建议
This skill will automatically perform gateway restarts and then try to proactively notify the originating session and external channels. Before installing or enabling it:
- Be aware it is designed to auto-run on simple natural-language triggers (e.g. "restart now") and may restart a gateway without extra confirmation. Consider requiring explicit human confirmation in your deployment if you don't want one-shot voice/text triggers to restart production.
- Review and limit the GATEWAY_AUTH_TOKEN and any notification tokens (Telegram/Discord/Slack/webhook) it will use. The code will also read ~/.openclaw/.env to resolve tokens — inspect that file for other secrets before allowing the skill access.
- Audit the included scripts (restart.py, guardian.py, notify.py, write_context.py) in your environment and test in a staging system first. Pay attention to the notification webhook URLs and content templates to avoid accidental secret leakage.
- If you want stricter safety, modify the workflow to require an explicit confirmation step before executing the auto_restart flow, or limit agent permissions so automatic invocation cannot be triggered by casual chat.
功能分析
Type: OpenClaw Skill
Name: restart-guard
Version: 2.2.0
The OpenClaw AgentSkills skill bundle is classified as 'suspicious' due to its inherent high-risk capabilities, such as restarting the OpenClaw gateway, performing system-level operations (e.g., `lsof`, `kill`), and sending notifications to external services (Telegram, Discord, Slack, generic webhooks). While these actions are aligned with the skill's stated purpose of deterministic gateway restart and reporting, they represent significant control over the system and external communication channels. The code demonstrates strong security awareness, with explicit fixes for past vulnerabilities (webhook template injection, host/port validation, shell metacharacter rejection in commands) detailed in `CHANGELOG.md` and verified by `tests/test_security_fixes.py`. Sensitive data is redacted from logs and diagnostics. No evidence of intentional malicious behavior (e.g., credential theft, unauthorized exfiltration to unknown endpoints, persistence mechanisms) was found. The `README.md` explicitly notes that the skill may be marked 'suspicious' due to its capabilities, not malicious intent, which aligns with this classification.
能力评估
Purpose & Capability
Name/description (deterministic gateway restart + notifications) aligns with the included scripts and config. Required binaries (python3, curl) and GATEWAY_AUTH_TOKEN are consistent with the HTTP/CLI notification paths and restart operations. The skill also includes multi-channel notification support (telegram/discord/slack/webhook/openclaw passthrough), which is expected for its stated delivery guarantees.
Instruction Scope
SKILL.md and the implementation explicitly require the agent to auto-run the full restart flow on simple natural-language triggers (e.g. "restart now") and to infer the origin session automatically. That gives the agent discretion to perform a destructive, high-impact operation without additional interactive confirmation. The code reads local files (openclaw.json, ~/.openclaw/.env) and writes local diagnostics/context files; while these are relevant to restart/notification, automatic inference and the directive "do not expose internal scripts/steps unless user explicitly asks" reduce transparency and increase risk of unintended restarts or hidden actions.
Install Mechanism
This is an instruction-only skill with bundled Python scripts (no external install/download step). There is no remote URL or archive extract in the install spec — code is present in the skill bundle and runs locally. No high-risk install mechanism detected.
Credentials
The skill declares a single required env var (GATEWAY_AUTH_TOKEN) which is reasonable for using the gateway HTTP tool. However, notify logic will read other notification secrets (TELEGRAM_BOT_TOKEN, DISCORD_WEBHOOK_URL, SLACK_WEBHOOK_URL, RESTART_GUARD_WEBHOOK_URL, etc.) from environment or from a user dotfile (~/.openclaw/.env). The code will open and parse that dotfile to resolve keys, which can expose unrelated secrets stored there. The number/variety of optional env keys is proportional to multi-channel notifications but the implicit dotenv access and passthrough to external webhooks warrant caution.
Persistence & Privilege
always is false and the skill does not request permanent platform-wide inclusion. It spawns a detached guardian process to persist across a gateway restart (intended behavior) and the guardian exits after completion. Autonomous invocation is enabled (platform default); combined with the explicit 'must auto-run' trigger policy in SKILL.md this increases the operational blast radius, but the skill itself does not set always:true or modify other skills' configs.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install restart-guard - 安装完成后,直接呼叫该 Skill 的名称或使用
/restart-guard触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.2.0
Security fixes and work directory rename
v2.1.2
- Add "metadata" section to declare required binaries (`python3`, `curl`) and environment variables for integration with external channels.
- Increment version to 2.1.2.
- No functional or workflow changes; documentation update only.
v2.1.1
restart-guard 2.1.1
- Enforced strict non-shell execution mode for verify/diagnostics commands; commands with shell metacharacters (e.g., pipes) will now be rejected.
- Documentation updates in SKILL.md clarifying command execution policy and notes.
- Added new test file: tests/test_restart_runtime_helpers.py.
- Various test and script file enhancements and maintenance.
v2.1.0
Release v2.1.0: enhanced restart state machine, origin-session proactive ACK, disaster fallback delivery, zero-config auto flow, bilingual docs.
v1.1.0
Version 1.1.0 (restart-guard)
- Added notification script (notify.py) to support multi-channel failure/health alerts.
- Guardian now broadcasts notifications to all configured channels (Telegram, Discord, Slack, webhook), not just one fallback.
- Updated config.example.yaml to reflect new notification options.
- Documentation and usage flow updated in SKILL.md.
- Removed old README.md, consolidating information to SKILL.md.
v1.0.1
Improved SKILL.md (concise), README.md (comprehensive with flow diagram), generic config paths
v1.0.0
test
元数据
常见问题
Restart Guard 是什么?
Deterministic OpenClaw gateway restart with down/up state-machine verification, origin-session proactive ACK, and backward-compatible config. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2197 次。
如何安装 Restart Guard?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install restart-guard」即可一键安装,无需额外配置。
Restart Guard 是免费的吗?
是的,Restart Guard 完全免费(开源免费),可自由下载、安装和使用。
Restart Guard 支持哪些平台?
Restart Guard 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Restart Guard?
由 zjianru(@zjianru)开发并维护,当前版本 v2.2.0。
推荐 Skills