| name | ss-update | ||||
|---|---|---|---|---|---|
| description | Check for skill-sommelier plugin updates and apply them. Compares installed plugin git HEAD against remote, shows changelog, and pulls updates. Use when the user says "update skills", "check for updates", "am I up to date", "update skill-sommelier", or "new skills available". | ||||
| allowed-tools |
|
Check if the installed skill-sommelier plugin is up to date and apply updates.
Find the installed plugin directory and read the current version.
PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/skill-sommelier"
- Check if
$PLUGIN_DIRexists - If not found, report: "skill-sommelier is not installed via the marketplace. Install with
/plugin marketplace add JasonLo/skill-sommelier" and stop - Run
git -C "$PLUGIN_DIR" rev-parse HEADto get the local SHA - Run
git -C "$PLUGIN_DIR" log -1 --format="%h %s (%cr)"to get a human-readable current version
Fetch the latest remote state without modifying the local clone.
- Run
git -C "$PLUGIN_DIR" fetch origin main --quiet - Get remote SHA:
git -C "$PLUGIN_DIR" rev-parse origin/main - If the fetch fails (no internet, auth issues), report the error and stop
Compare local HEAD against remote HEAD.
- If local SHA == remote SHA → report "skill-sommelier is up to date" with the current SHA short hash, show days since last commit using
git -C "$PLUGIN_DIR" log -1 --format="%cr", and stop - If different, get the changelog:
git -C "$PLUGIN_DIR" log --oneline HEAD..origin/main - Count new commits and list changed skills:
git -C "$PLUGIN_DIR" diff --name-only HEAD..origin/main -- skills/
Display a clear summary to the user:
- Installed:
<short-sha>(<date>) - Latest:
<short-sha>(<date>) - New commits:
<count> - Changed skills: list each affected skill directory
- Commit log: show the oneline log from Phase 3
Ask: "Would you like to update now?"
Only proceed if the user confirms.
- Check for local modifications:
git -C "$PLUGIN_DIR" status --porcelain- If there are local changes, warn the user and ask whether to proceed (changes will be overwritten)
- Pull the update:
git -C "$PLUGIN_DIR" pull origin main --ff-only - If
--ff-onlyfails (diverged history), try:Only with user confirmation since this discards local changes.git -C "$PLUGIN_DIR" reset --hard origin/main - Verify: run
git -C "$PLUGIN_DIR" rev-parse HEADand confirm it matches the remote SHA - Report success with the new version
- Plugin not installed: Direct user to
/plugin marketplace add JasonLo/skill-sommelier - No internet / fetch fails: Report error clearly, do not attempt update
- Local modifications in plugin dir: Warn before overwriting
- Already up to date: Report and stop early
- Diverged history: Offer
reset --hardwith explicit user confirmation