Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add JasonLo/skill-sommelier --skill "ss-repo-update"
Install specific skill from multi-skill repository
# Description
>-
# SKILL.md
name: ss-repo-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:
- Bash
- Read
- Grep
- WebFetch
Self-Update
Check if the installed skill-sommelier plugin is up to date and apply updates.
Phase 1 β Locate installed plugin
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
Phase 2 β Check remote for updates
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
Phase 3 β Compare versions
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/
Phase 4 β Present update summary
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?"
Phase 5 β Execute update
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:
git -C "$PLUGIN_DIR" reset --hard origin/main
Only with user confirmation since this discards local changes. - Verify: run
git -C "$PLUGIN_DIR" rev-parse HEADand confirm it matches the remote SHA - Report success with the new version
Edge Cases
- 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
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.