🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

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.

Versionv1.1.1
Downloads848
Stars⭐ 1
TERMINAL
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.py

Apply updates

python3 git_update.py --apply

Update specific skill

python3 git_update.py --apply --skill

Show saved modifications

python3 git_update.py --show-patch

Discard 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

  • Python 3.8+
  • clawhub CLI
  • diff (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