Install
openclaw skills install smart-updaterIntelligent upgrade management for OpenClaw skills, extensions, and core. HITL (Human-in-the-Loop) mode: scan installed assets, read changelogs, analyze risk...
openclaw skills install smart-updaterPrinciple: 宁可不升,不可升坏。
A final report is invalid unless ALL of the following are true:
inventory.json exists (Phase 1 complete)scan-result.json exists (Phase 2 complete)If any condition is not met, do NOT generate the report. Output BLOCKED with the missing items instead.
bash ~/.openclaw/workspace/skills/smart-updater/scripts/inventory.sh
Scans all installed assets → ~/.openclaw/inventory.json
bash ~/.openclaw/workspace/skills/smart-updater/scripts/scan.sh
Checks each trackable asset for updates → ~/.openclaw/scan-result.json
Execute Phases 1–5 below in order.
Action: Run inventory.sh
Output: ~/.openclaw/inventory.json
Exit criteria: File exists and contains assets array
Asset types: core/npm, extension/npm, extension/local, extension/github, skill/clawhub, skill/github, skill/local, builtin/bundled
Do not continue until Phase 1 exit criteria are met.
Action: Run scan.sh
Output: ~/.openclaw/scan-result.json
Exit criteria: File exists and contains updates array
Do not continue until Phase 2 exit criteria are met.
If updates is empty → report "all up to date" and stop. No further phases needed.
Action: For EACH update in scan-result.json, fetch changelog/release notes.
Output: Changelog summary per update candidate.
| Source | How to fetch |
|---|---|
| ClawHub | clawhub inspect <slug> --versions --limit 5 |
| npm | npm info <pkg> --json → check repository, then web_fetch GitHub releases |
| GitHub | cd <dir> && git log --oneline HEAD..origin/main or changelogUrl from scan-result |
Note: scan-result.json may already contain a changelog array for ClawHub skills. Use it if present, but verify/supplement if sparse.
For each update, record:
Exit criteria: Every update candidate has EITHER:
⛔ Do not continue to Phase 4 until Phase 3 exit criteria are met.
Action: Assign risk level to each update using this matrix:
| Condition | Risk | Action |
|---|---|---|
| patch + bugfix | 🟢 Low | Recommend |
| minor + feature | 🟡 Medium | Suggest |
| major + breaking | 🔴 High | Require confirmation |
| extension type | 🟡+ | Always full Gate 2 flow |
| changelog unavailable | 🟠 Unknown | Flag for manual review |
| new executable scripts | 🟠+ | Suggest skill-vetter |
| name conflict | 🔴 | Block upgrade (Gate 1) |
Exit criteria: Every update candidate has a risk level assigned.
Before generating the report, verify:
If ANY checkbox fails → output BLOCKED: <missing items>. Do NOT proceed.
Only now read references/report-format.md and generate the report using that template.
The report MUST include changelog summaries from Phase 3. If Phase 3 data is absent, return to Phase 3.
Present the report and wait. Do NOT auto-upgrade. Do NOT proceed without explicit user selection.
When the user selects updates to apply:
Execute upgrades one at a time, sequentially. Each must pass Three Gates:
Gate 1: Pre-flight → Gate 2: Isolation → Gate 3: Post-flight → ✅
fail↓ fail↓ fail↓
阻止升级 中止+回滚 回滚+通知
For detailed gate definitions and rollback procedures: Read references/three-gates.md
For each upgrade: Announce → Gate 1 → Gate 2 (backup+execute) → Gate 3 (verify) → Report result
| File | Purpose |
|---|---|
~/.openclaw/inventory.json | Asset inventory (Phase 1) |
~/.openclaw/scan-result.json | Scan results with changelog data (Phase 2) |
references/report-format.md | Report template (Phase 5 only) |
references/three-gates.md | Detailed gate definitions |
~/.openclaw/skill-backups/ | Skill backup directory |
~/.openclaw/extensions-backup/ | Extension backup directory |
~/.openclaw/plist-backup/ | Gateway plist backup (core upgrades) |