首页龙虾技能列表 › Auto Updater Pro — 技能工具

🔄 Auto Updater Pro — 技能工具

v1.1.0

Enhanced auto-updater with detailed logging, missed run recovery, and Gateway restart protection.

2· 526·9 当前·9 累计
by @newolf20000·MIT-0
下载技能包
License
MIT-0
最后更新
2026/4/12
安全扫描
VirusTotal
可疑
查看报告
OpenClaw
安全
high confidence
The skill's requested actions, files, and commands are consistent with an auto-updater for Clawdbot and installed skills; it is instruction-only and does not request unrelated credentials or hidden installs.
评估建议
This skill is coherent with its stated purpose, but take these precautions before enabling automatic runs: 1) Run the update flow manually or as a dry-run first (clawdhub update --all --dry-run) to inspect what will change. 2) Backup or snapshot any important configuration/data — updating skills can alter behavior. 3) Confirm where update reports/emails will be delivered and that those delivery credentials are correct. 4) Avoid blindly granting sudo to cron jobs; prefer fixing permissions for th...
详细分析 ▾
用途与能力
Name/description match the instructions: the SKILL.md tells the agent to update Clawdbot and installed skills, set up a cron job, log progress, and report results. Referenced commands (clawdbot, clawdhub, npm/pnpm/bun) are appropriate for this purpose and no unrelated credentials or binaries are requested.
指令范围
Instructions stay within update/log/report scope and only read/write log and script files under the user's home (~/.clawdbot, ~/.openclaw). They instruct running global package updates and clawdhub update --all (expected for an updater). Note: the guide suggests using sudo to fix EACCES errors — upgrading globally may require elevated privileges; the user should avoid running automated sudo without understanding implications. Email/chat delivery is referenced but relies on existing Clawdbot delivery config (no SMTP details included).
安装机制
No install spec and no code files — instruction-only. Nothing is downloaded from external URLs or written to arbitrary system paths by the skill itself, so installation risk is low.
凭证需求
The skill declares no required env vars or credentials and the runtime instructions do not request secrets. It relies on local tools and existing Clawdbot delivery configuration for reporting; this is proportionate to its function.
持久化与权限
The skill is not always:true and uses Clawdbot's cron (expected). It will cause system changes when run (updating software and writing logs), which is inherent to an auto-updater. Users should be aware updates will modify other skills (supply-chain risk) and that autonomous runs will perform those updates unless cron/skill is disabled.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

🖥️ OSmacOS · Linux

版本

latestv1.1.02026/2/22

Enhanced with detailed logging, missed run recovery, 30s delay after updates, email reports, and better error handling

● 可疑

安装命令 点击复制

官方npx clawhub@latest install auto-updater-pro
镜像加速npx clawhub@latest install auto-updater-pro --registry https://cn.clawhub-mirror.com

技能文档

Enhanced auto-updater with detailed logging, missed run recovery, and Gateway restart protection.

Version: 1.1.0 (Updated 2026-02-22)

What's New:

  • ✅ Detailed logging at each step (prevents state loss on restart)
  • ✅ Missed run recovery (auto-runs if Gateway was offline)
  • ✅ 30-second delay after updates (prevents interruption)
  • ✅ Email report support (less intrusive than chat messages)
  • ✅ Better error handling and retry logic

Note: This is an enhanced version of the original auto-updater skill with production-ready features.


What It Does

This skill sets up a daily cron job that:

  • Updates Clawdbot itself (via clawdbot doctor or package manager)
  • Updates all installed skills (via clawdhub update --all)
  • Messages you with a summary of what was updated
  • New: Logs every step to prevent state loss on Gateway restart
  • New: Auto-recovers if the scheduled time was missed

Setup

Quick Start

Ask Clawdbot to set up the auto-updater:

Set up daily auto-updates for yourself and all your skills.

Or manually add the cron job:

clawdbot cron add \
  --name "Daily Auto-Update" \
  --cron "0 4   " \
  --tz "America/Los_Angeles" \
  --session isolated \
  --wake now \
  --deliver \
  --message "Run daily auto-updates: check for Clawdbot updates and update all skills. Report what was updated."

Recommended Configuration (v1.1.0+)

For production use, add these settings to your cron job:

{
  "schedule": {
    "expr": "0 4   ",
    "kind": "cron",
    "tz": "Asia/Shanghai"
  },
  "missedRunPolicy": "run-immediately",
  "payload": {
    "kind": "agentTurn",
    "message": "...",
    "timeoutSeconds": 600
  }
}

Key Settings:

  • missedRunPolicy: "run-immediately" - Auto-runs if Gateway was offline at scheduled time
  • timeoutSeconds: 600 - Allow 10 minutes for updates to complete
  • tz: "Asia/Shanghai" - Set to your timezone

Configuration Options

OptionDefaultDescription
Time4:00 AMWhen to run updates (use --cron to change)
TimezoneSystem defaultSet with --tz
DeliveryMain sessionWhere to send the update summary
Timeout300sRecommended: 600s for npm updates
Missed RunNoneRecommended: run-immediately

How Updates Work

Clawdbot Updates

For npm/pnpm/bun installs:

npm update -g clawdbot@latest
# or: pnpm update -g clawdbot@latest
# or: bun update -g clawdbot@latest

For source installs (git checkout):

clawdbot update

Always run clawdbot doctor after updating to apply migrations.

Skill Updates

clawdhub update --all

This checks all installed skills against the registry and updates any with new versions available.


Update Summary Format

After updates complete, you'll receive a message like:

🔄 Daily Auto-Update Complete

Clawdbot: Updated to v2026.1.10 (was v2026.1.9)

Skills Updated (3):

  • prd: 2.0.3 → 2.0.4
  • browser: 1.2.0 → 1.2.1
  • nano-banana-pro: 3.1.0 → 3.1.2

Skills Already Current (5): gemini, sag, things-mac, himalaya, peekaboo

No issues encountered.


Detailed Logging (v1.1.0+)

To prevent state loss during Gateway restarts, the update process logs every step:

Log File Location

~/.openclaw/workspace/memory/openclaw-update-YYYY-MM-DD.md

Log Format

# OpenClaw 更新日志 YYYY-MM-DD

更新前

  • 开始时间:HH:mm:ss
  • 当前版本:x.x.x
  • 最新版本:x.x.x

更新中

  • 更新开始:HH:mm:ss
  • 更新命令:...
  • 更新完成:HH:mm:ss
  • 验证版本:x.x.x

更新后

  • 状态:已是最新 / 已更新 / 更新失败
  • 报告发送:成功 / 失败
  • 完成时间:HH:mm:ss

更新内容

(从 CHANGELOG 或 npm 获取)

Six-Phase Update Process

Phase 1: Preparation

  • Record start time
  • Check current version
  • Write to log file immediately

Phase 2: Check for Updates

  • Check latest version (npm view)
  • Append to log file
  • Compare versions

Phase 3: Execute Update

  • Record update start
  • Run openclaw update run or npm install -g openclaw@latest
  • Immediately log completion
  • Verify new version

Phase 4: Persist State

  • Append full results to log
  • Wait 3 seconds for disk sync

Phase 5: Send Report

  • Send email/chat report
  • Log delivery status

Phase 6: Delay Restart (Critical!)

  • Wait 30 seconds before any Gateway restart
  • Ensures npm processes complete
  • Prevents state loss

Manual Commands

Check for updates without applying:

clawdhub update --all --dry-run

View current skill versions:

clawdhub list

Check Clawdbot version:

clawdbot --version

Troubleshooting

Updates Not Running

  • Verify cron is enabled: check cron.enabled in config
  • Confirm Gateway is running continuously
  • Check cron job exists: clawdbot cron list
  • Check if missed run policy is set: missedRunPolicy: "run-immediately"

Update Failures

If an update fails, the summary will include the error. Common fixes:

  • Permission errors: Ensure the Gateway user can write to skill directories
  • Network errors: Check internet connectivity
  • Package conflicts: Run clawdbot doctor to diagnose
  • Gateway restart interruption: Check log file for partial completion

Gateway Restart During Update

If Gateway restarts during update (common with npm installs):

  • Check log file: ~/.openclaw/workspace/memory/openclaw-update-.md
  • Verify version: openclaw --version
  • Manually send report if needed (log file has all info)

Disabling Auto-Updates

Remove the cron job:

clawdbot cron remove "Daily Auto-Update"

Or disable temporarily in config:

{
  "cron": {
    "enabled": false
  }
}

Best Practices

1. Schedule During Low Activity

Choose a time when you're unlikely to be using the system:

"expr": "0 4   "  // 4:00 AM

2. Enable Missed Run Recovery

Prevents missing updates if Gateway is offline:

"missedRunPolicy": "run-immediately"

3. Use Email for Reports

Less intrusive than chat messages:

  • Configure email-163-com or similar skill
  • Send plain text reports
  • Include log file path

4. Log Everything

Always write to log file before sending reports:

  • Prevents state loss
  • Enables debugging
  • Provides audit trail

5. Wait After Updates

Add 30-second delay before any Gateway restart:

sleep 30

Resources


Version History

v1.1.0 (2026-02-22)

Improvements:

  • ✅ Added detailed logging at each step
  • ✅ Added missed run recovery policy
  • ✅ Added 30-second delay after updates
  • ✅ Added email report support
  • ✅ Improved error handling

Bug Fixes:

  • 🐛 Fixed state loss on Gateway restart
  • 🐛 Fixed missed scheduled runs
  • 🐛 Fixed report delivery failures

v1.0.0 (2026-01-13)

  • ✅ Initial release
  • ✅ Basic daily update check
  • ✅ Simple report format

Published: 2026-02-22 Maintainer: OpenClaw Team License: MIT

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务