smart-restart-protection

v1.0.0

智能重启保护:防止无限循环,确保OpenClaw Gateway安全重启和状态恢复

0· 248·0 current·0 all-time
byryuichi Takano@jackytianjp
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
The name/description, scripts (smart-restart.sh, check-status.sh, reset-protection.sh) and index.js all implement restart-protection, rate-limiting, backups and diagnostics — consistent with the stated purpose. However the metadata declares only 'openclaw' and 'bash' as required binaries while the scripts use other system tools (curl, ss, tar, awk, ps, find, mv, etc.) and the package includes index.js (Node). The skill implicitly requires a Node runtime to use index.js and several unix tools that are not listed in the declared requirements.
Instruction Scope
Runtime instructions and scripts operate on local OpenClaw state (~/ .openclaw/*), read/write restart-state, lock files (/tmp/openclaw-restart.lock), create backups, and call the local Gateway HTTP endpoint and openclaw CLI. This is within scope for restart protection. Notes: reset-protection.sh and index.js perform destructive reset/overwrite of restart logs and last_restart; reset scripts prompt for interactive confirmation (may hang if run non-interactively). There are no obvious remote exfiltration endpoints; network calls are to localhost or local system checks.
Install Mechanism
No install spec (files are provided with the skill). That lowers supply-chain risk compared to remote downloads. Files include shell scripts and a JS module; the presence of executable scripts means the agent or user can run them, so verify scripts before execution. There is no network download during install.
Credentials
The skill does not request external credentials or environment variables in the registry metadata. README mentions optional env vars (SRP_STATE_DIR, SRP_MAX_HOURLY, etc.) but these are not declared as required — that is fine but should be documented clearly. The scripts read/writes user-home files (~/.openclaw/*) and /tmp lock files, which is proportional to the stated functionality but does grant access to your OpenClaw state and logs.
Persistence & Privilege
The skill does not set always:true and uses its own state directory under the user's home. It writes logs, backups and state files within ~/.openclaw/restart-state and /tmp lock files; it does not attempt to modify other skills or global agent configuration. Autonomous invocation is allowed (platform default) — consider whether you want the agent to call restart/reset operations automatically.
Assessment
This skill appears to do what it says (manage safe restarts) but check a few things before installing or running it: 1) Ensure required tooling exists: besides 'openclaw' and 'bash' the scripts call curl, ss, tar, awk, find, ps, mv and the JS file implies a Node runtime — make sure those are present and trusted. 2) Inspect index.js and shell scripts for commands you don't want run on your host (index.js uses execSync/spawn wrappers that can run shell commands). 3) Understand that reset-protection and some operations will modify or clear files under ~/.openclaw/restart-state and backups — make a manual backup first. 4) If you plan to allow autonomous agent invocation, restrict or audit calls that perform 'restart' or 'reset-protection' to avoid accidental resets; consider requiring manual confirmation or running in a test environment first. 5) Run the scripts as an unprivileged user in a staging environment to validate behavior before using in production.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🔄 Clawdis
Binsopenclaw, bash
latestvk97emk4n1ez5j7gwa5qkj3w5ch82jyf9
248downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

Smart Restart Protection

智能重启保护:防止无限循环,确保OpenClaw Gateway安全重启和状态恢复

概述

这个技能为 OpenClaw Gateway 提供智能重启保护机制,防止无限循环重启,确保服务在配置变更后安全恢复,并保持会话状态连续性。

解决的问题

  1. 无限循环风险 - 防止配置错误导致的服务无限重启
  2. 状态丢失 - Gateway重启后会话和工作空间状态恢复
  3. 频率失控 - 限制重启频率,防止系统过载
  4. 并发冲突 - 防止多个重启进程同时运行

使用方法

# 智能重启
./smart-restart.sh "更新配置"

# 检查状态
./check-status.sh

# 重置保护(紧急)
./reset-protection.sh

Comments

Loading comments...