您的位置:首页 > 手游攻略 > 自动更新器:自动化系统与技能维护 - Openclaw Skills

自动更新器:自动化系统与技能维护 - Openclaw Skills

作者:互联网  时间: 2026-08-10 12:15:01  

下载入口:https://github.com/openclaw/skills/tree/main/skills/maximeprades/auto-updater

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install auto-updater

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 <project>/skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 auto-updater。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

什么是 自动更新器?

自动更新器是一项关键的维护技能,旨在确保您的本地 AI 代理环境在无需人工干预的情况下保持安全、稳定和功能完整。通过与 cron 系统直接集成,它为管理 Openclaw 技能和核心 Clawdbot 二进制文件提供了一个稳健的框架,确保您始终拥有最新的改进和错误修复。

该技能对于依赖一致且最新工具链的开发人员特别有价值。它处理包管理和技能注册表同步的复杂性,提供无缝的后台体验,并最终通过您首选的通信渠道直接发送简明每日状态报告。

自动更新器 应用场景

  • 自动保持 Openclaw 技能与最新的社区补丁和功能同步。
  • 通过在非高峰时段安排核心系统更新,减少手动 DevOps 开销。
  • 通过确保版本平价来维护多个环境的系统健康。
  • 在每个更新周期后通过自动化诊断检查排除与版本相关的冲突。
自动更新器 工作原理
  1. 该技能在代理调度程序中注册一个循环 cron 任务,通常设置为凌晨执行。
  2. 在预定时间,该技能通过系统的包管理器启动对核心代理最新版本的检查。
  3. 它对所有已安装的 Openclaw 技能执行全面更新命令,将本地版本与远程注册表进行比较。
  4. 更新应用后,它会运行内部诊断序列,执行任何必要的数据库迁移或配置调整。
  5. 系统捕获所有更新操作的输出,包括版本跨度(例如 v1.0.1 到 v1.1.0)。
  6. 生成格式化的摘要报告并发送给用户,突出显示更新内容并确认系统就绪状态。

自动更新器 配置指南

要为您的 Openclaw 技能激活自动化维护,您可以发出直接的自然语言命令:

为你自己和所有技能设置每日自动更新。

或者,您可以使用命令行界面手动配置调度参数:

clawdbot cron add r
  --name "Daily Auto-Update" r
  --cron "0 4 * * *" r
  --tz "America/Los_Angeles" r
  --session isolated r
  --wake now r
  --deliver r
  --message "运行每日自动更新:检查 Clawdbot 更新并更新所有技能。报告更新内容。"

自动更新器 数据架构与分类体系

自动更新器利用结构化的元数据格式来跟踪您的 Openclaw 技能和系统二进制文件的状态:

属性 描述
Cron 配置 存储执行频率、时区和会话隔离设置。
版本注册表 所有活跃 Openclaw 技能及其当前语义化版本 (SemVer) 字符串的映射。
更新日志 捕获更新命令的 stdout/stderr,以便在发生故障时提供故障排除数据。
迁移状态 跟踪更新后任务(通过 doctor 命令)是否成功完成。
name: auto-updater
description: "Automatically update Clawdbot and all installed skills once daily. Runs via cron, checks for updates, applies them, and messages the user with a summary of what changed."
metadata: {"version":"1.0.0","clawdbot":{"emoji":"??","os":["darwin","linux"]}}

Auto-Updater Skill

Keep your Clawdbot and skills up to date automatically with daily update checks.

What It Does

This skill sets up a daily cron job that:

  1. Updates Clawdbot itself (via clawdbot doctor or package manager)
  2. Updates all installed skills (via clawdhub update --all)
  3. Messages you with a summary of what was updated

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 r
  --name "Daily Auto-Update" r
  --cron "0 4 * * *" r
  --tz "America/Los_Angeles" r
  --session isolated r
  --wake now r
  --deliver r
  --message "Run daily auto-updates: check for Clawdbot updates and update all skills. Report what was updated."

Configuration Options

Option Default Description
Time 4:00 AM When to run updates (use --cron to change)
Timezone System default Set with --tz
Delivery Main session Where to send the update summary

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.

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

  1. Verify cron is enabled: check cron.enabled in config
  2. Confirm Gateway is running continuously
  3. Check cron job exists: clawdbot cron list

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

Disabling Auto-Updates

Remove the cron job:

clawdbot cron remove "Daily Auto-Update"

Or disable temporarily in config:

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

Resources

最新游戏

更多

Copyright©2010-2019. All rights reserved | 波波三国游戏官网|[email protected]

备案编号:湘ICP备2022015115号-4