介绍
# Auto-Updater Skill
通过每日更新检查,让您的 Clawdbot 和技能保持最新状态。
## 功能简介
该技能会设置一个每日 cron 任务,用于:
1. 更新 Clawdbot 本身(通过 `clawdbot doctor` 或包管理器) 2. 更新所有已安装的技能(通过 `clawdhub update --all`) 3. 向您发送更新摘要消息
## 设置
### 快速开始
让 Clawdbot 设置自动更新器:
``` Set up daily auto-updates for yourself and all your skills. ```
或者手动添加 cron 任务:
```bash 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." ```
### 配置选项
| 选项 | 默认值 | 描述 | |--------|---------|-------------| | Time | 4:00 AM | 运行更新的时间(使用 `--cron` 修改) | | Timezone | System default | 使用 `--tz` 设置 | | Delivery | Main session | 发送更新摘要的位置 |
## 更新原理
### Clawdbot 更新
对于 **npm/pnpm/bun 安装**: ```bash npm update -g clawdbot@latest # or: pnpm update -g clawdbot@latest # or: bun update -g clawdbot@latest ```
对于 **源码安装**(git checkout): ```bash clawdbot update ```
更新后请务必运行 `clawdbot doctor` 以应用迁移。
### 技能更新
```bash clawdhub update --all ```
这会对照注册表检查所有已安装的技能,并更新那些有新版本的技能。
## 更新摘要格式
更新完成后,您将收到类似以下的消息:
``` 🔄 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. ```
## 手动命令
检查更新但不应用: ```bash clawdhub update --all --dry-run ```
查看当前技能版本: ```bash clawdhub list ```
检查 Clawdbot 版本: ```bash clawdbot --version ```
## 故障排除
### 更新未运行
1. 验证 cron 已启用:检查配置中的 `cron.enabled` 2. 确认 Gateway 正在持续运行 3. 检查 cron 任务是否存在:`clawdbot cron list`
### 更新失败
如果更新失败,摘要中将包含错误信息。常见修复方法:
- **权限错误**:确保 Gateway 用户可以写入技能目录 - **网络错误**:检查互联网连接 - **包冲突**:运行 `clawdbot doctor` 进行诊断
### 禁用自动更新
移除 cron 任务: ```bash clawdbot cron remove "Daily Auto-Update" ```
或在配置中暂时禁用: ```json { "cron": { "enabled": false } } ```
## 资源
- [Clawdbot 更新指南](https://docs.clawd.bot/install/updating) - [ClawdHub CLI](https://docs.clawd.bot/tools/clawdhub) - [Cron 任务](https://docs.clawd.bot/cron)