Skill Updater
by @tempest-01
Local-modification-preserving clawhub skill updater. Saves changes as diff patch, applies to new versions, reports conflicts clearly. No forced overwrites.
clawhub install skill-auto-updaterπ About This Skill
name: skill-updater description: Local-modification-preserving clawhub skill updater. Saves changes as diff patch, applies to new versions, reports conflicts clearly. No forced overwrites. metadata: openclaw: requires: bins: [python3, clawhub, diff, patch] env: [OPENCLAW_SKILLS_DIR] # default: /root/.openclaw/workspace/skills triggers: [skillζ΄ζ°, auto update, git sync]
Skill-Updater
> Local-modification-preserving clawhub skill updater.
What It Does
You modified a clawhub-installed skill β clawhub released a new version β Skill-Updater updates while preserving your local changes.
How It Works
Step 1: Save modifications
β Scans skill directory, generates unified diff patch
β Backs up originals to .skill-updater/originals/Step 2: clawhub update
β clawhub update downloads new version files
Step 3: Try to merge
β patch --dry-run attempts to apply changes to new version
β Success: written with your changes preserved β
β Fail: show diff, user decides manually
File Structure
skill-dir/
βββ .skill-updater/
β βββ mod.patch # unified diff of your changes
β βββ originals/ # snapshot of original files at install time
βββ [skill files]
CLI
# Dry-run: preview which skills have updates and conflicts
python3 git_update.pyApply updates
python3 git_update.py --applyUpdate specific skill
python3 git_update.py --apply --skill Show saved modifications
python3 git_update.py --show-patchDiscard modifications (accept new version, drop your changes)
python3 git_update.py --discard --skill
Conflict Handling
| Situation | Result | |-----------|--------| | Patch applies cleanly | New version + your changes preserved β | | Same area modified by both | Show diff, user decides | | No local modifications | Direct clawhub update β | | Choose to discard | Delete patch, accept new version |
Requirements
clawhub CLIdiff (coreutils)patch (coreutils)Before Installing
1. Dry-run first β Always run python3 git_update.py without --apply first to preview
2. Backup β For important skills, manually back up your modifications before using --discard