Smart Auto Updater
Scanned@ruiwang20010702
npx machina-cli add skill @ruiwang20010702/smart-auto-updater --openclawSmart Auto-Updater
AI-powered auto-updater that intelligently decides whether to update based on impact assessment. Safe, intelligent, and configurable.
What it does
1. Check Phase
- Checks for OpenClaw updates
- Checks for skill updates via ClawHub
- Fetches changelog and diff
2. AI Analysis Phase
- Analyzes changes using LLM
- Evaluates system impact (架构/性能/兼容性)
- Classifies risk level (HIGH/MEDIUM/LOW)
3. Decision Phase
| Risk Level | Action |
|---|---|
| HIGH | Skip update, send detailed report |
| MEDIUM | Skip update, send warning + report |
| LOW | Auto-update, send summary |
4. Report Phase
- Generates readable update report
- Includes risk assessment
- Provides upgrade recommendations
Quick Start
Basic usage
# Run smart update check
openclaw sessions spawn \
--agentId smart-auto-updater \
--message "Run smart update check"
With custom parameters
openclaw sessions spawn \
--agentId smart-auto-updater \
--message "Check updates with custom settings: auto-update LOW risk, report MEDIUM risk"
Configuration
Environment Variables
# AI Model (optional, defaults to configured model)
export SMART_UPDATER_MODEL="minimax-portal/MiniMax-M2.1"
# Auto-update threshold (default: LOW)
# Options: NONE (report only), LOW, MEDIUM
export SMART_UPDATER_AUTO_UPDATE="LOW"
# Risk tolerance (default: MEDIUM)
# HIGH: Only auto-update LOW risk
# MEDIUM: Auto-update LOW + MEDIUM risk
# LOW: Auto-update all
export SMART_UPDATER_RISK_TOLERANCE="MEDIUM"
# Report level (default: detailed)
# Options: brief, detailed, full
export SMART_UPDATER_REPORT_LEVEL="detailed"
Report Format
High Risk Report
🔴 Smart Auto-Updater Report
Update Available: v1.2.3 → v1.3.0
⚠️ Risk Level: HIGH
📋 Changes Summary:
- Breaking API changes detected
- Database migration required
- 3 files modified
🏗️ Impact Assessment:
- Architecture: MAJOR changes to core components
- Performance: Potential impact on startup time
- Compatibility: Breaks backward compatibility
🚫 Decision: SKIPPED
💡 Recommendations:
1. Review changelog manually
2. Test in staging environment
3. Schedule maintenance window
🗓️ Next Check: 24 hours
Low Risk Auto-Update
🟢 Smart Auto-Updater Report
Updated: v1.2.3 → v1.2.4
✅ Risk Level: LOW
📋 Changes:
- Bug fixes (2)
- Performance improvements (1)
🏗️ Impact Assessment:
- Architecture: No changes
- Performance: Minor improvement
- Compatibility: Fully compatible
✅ Decision: AUTO-UPDATED
📊 Summary:
- OpenClaw: v1.2.3 → v1.2.4
- Skills updated: 2
- Skills unchanged: 15
- Errors: none
⏱️ Next Check: 24 hours
Architecture
┌──────────────────┐
│ Trigger (Cron) │
└────────┬─────────┘
│
▼
┌──────────────────┐
│ Check Updates │ ← clawhub update --dry-run
└────────┬─────────┘
│
▼
┌──────────────────┐
│ AI Analysis │ ← Analyze changes, assess risk
└────────┬─────────┘
│
┌────┴────┐
│ │
▼ ▼
┌───────┐ ┌───────┐
│ HIGH │ │ MEDIUM│
│ Skip │ │ Skip │
└───┬───┘ └───┬───┘
│ │
▼ ▼
┌───────┐ ┌───────┐
│ LOW │ │ Report│
│ Update│ │ Only │
└───┬───┘ └───────┘
│ │
└────┬─────┘
│
▼
┌──────────────────┐
│ Generate Report │ ← Send summary
└──────────────────┘
Safety Features
- Dry Run First - Always check before acting
- Risk Classification - AI-powered impact assessment
- Configurable Thresholds - Set your own risk tolerance
- Detailed Logging - Every decision is logged
- Manual Override - Always can review before updating
Troubleshooting
Updates keep being skipped
- Check risk tolerance setting
- Verify AI model is available
- Review changelog manually
False positives (too many HIGH risk)
- Lower risk tolerance
- Check AI model prompts
- Review specific change patterns
Reports not being delivered
- Verify delivery channel configuration
- Check gateway status
- Review session configuration
References
references/risk-assessment.md→ AI risk assessment methodologyreferences/report-templates.md→ Report format examplesreferences/integration.md→ Integration with cron/jobs
Overview
Smart Auto-Updater uses AI to decide if an update should be applied by assessing changes and system impact. It fetches updates from OpenClaw and ClawHub, analyzes diffs with an LLM, classifies risk, and either auto-updates or reports for safety.
How This Skill Works
It runs a three-phase process: Check Phase fetches updates and changelogs, AI Analysis Phase evaluates changes and system impact to assign HIGH/MEDIUM/LOW risk, and Decision Phase applies the update only when allowed or generates a report. The Report Phase then delivers a readable upgrade summary with risk assessment and recommendations.
When to Use It
- You want automated updates but with safety guarantees and risk-based decisions.
- Managing OpenClaw and ClawHub updates without manual intervention.
- You need automatic updates for low-risk changes while high-risk changes are reported.
- You require detailed post-update reports and upgrade recommendations.
- You want configurable AI model, risk tolerance, and report level.
Quick Start
- Step 1: Run smart update check
- openclaw sessions spawn \n --agentId smart-auto-updater \n --message "Run smart update check"
- Step 2: Check updates with custom settings: auto-update LOW risk, report MEDIUM risk
- openclaw sessions spawn \n --agentId smart-auto-updater \n --message "Check updates with custom settings: auto-update LOW risk, report MEDIUM risk"
- Step 3: Review the generated report and follow recommendations
Best Practices
- Start with conservative thresholds (NONE or REPORT) to validate behavior before auto-updating.
- Tune SMART_UPDATER_RISK_TOLERANCE and SMART_UPDATER_AUTO_UPDATE to match your risk appetite.
- Enable detailed SMART_UPDATER_REPORT_LEVEL to get actionable upgrade recommendations.
- Run dry-run checks regularly to verify what would be updated without applying it.
- Review generated reports and logs before approving automated updates in production.
Example Use Cases
- Automatically apply low-risk OpenClaw and skill updates while skipping high-risk changes and sending a report.
- Use custom parameters to auto-update LOW risk and produce MEDIUM risk reports for governance reviews.
- Schedule nightly updates with detailed reports to track changes and decisions.
- Operate in staging first with auto-updates enabled at LOW risk, then rollout to production after verification.
- Audit updates by comparing the generated report against changelogs and diffs from ClawHub.