From plan-tango
Self-updates plan-tango by checking GitHub for newer version, prompting confirmation, and pulling the latest release tag into the marketplace clone. Replaces manual update navigation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/plan-tango:update [--check] [--force][--check] [--force]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<objective>
<execution_context>
${CLAUDE_PLUGIN_ROOT}/skills/tango/scripts/update-check.mjs — handles the 7-day on-disk cache (~/.claude/plan-tango/.update-cache.json), git ls-remote --tags query, semver comparison, silent-on-network-failure behaviour. Reused as-is; this skill only adds the git pull step on top.${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json — read .version to pass as --current-version.${CLAUDE_PLUGIN_ROOT}. The marketplace.json source field is ./plugins/plan-tango, so the plugin lives at <MARKETPLACE_ROOT>/plugins/plan-tango/. Two cd .. from CLAUDE_PLUGIN_ROOT reaches the git repo root.update_check: false in ~/.claude/plan-tango/config.json blocks the SessionStart hook and Phase E notice but does NOT block this skill — running /plan-tango:update is an explicit user intent, so we always honour it.
</execution_context>MARKETPLACE_DIR="$(cd "${CLAUDE_PLUGIN_ROOT}/../.." && pwd)"
test -d "$MARKETPLACE_DIR/.git" && echo "$MARKETPLACE_DIR" || echo "NOT_GIT"
If output is NOT_GIT → ABORT with:
Cannot self-update: <MARKETPLACE_DIR> is not a git repository. plan-tango
was likely installed via direct git clone or symlink, not through Claude
Code's marketplace. Pull/build the new version manually from
https://github.com/egsok/plan-tango.
--check — print version status and STOP (no git pull, no AskUserQuestion).--force — skip the clean-working-tree safety check in Step 4. Equivalent to "I know I have local mods, discard them".Read current version:
CURRENT=$(node -e "console.log(JSON.parse(require('fs').readFileSync(process.env.CLAUDE_PLUGIN_ROOT + '/.claude-plugin/plugin.json','utf8')).version)")
Run update-check:
node "${CLAUDE_PLUGIN_ROOT}/skills/tango/scripts/update-check.mjs" --current-version "$CURRENT"
Parse the JSON response from stdout. Branch on status:
"ok" → print ✓ Already up to date (v<CURRENT>). → STOP (exit cleanly)."newer-available" → bind LATEST = parsed.latest. Print plan-tango v<LATEST> is available (you're on v<CURRENT>). Continue."skipped" → print Network check failed (no cache; git unavailable or timeout). Try again later, or update manually via /plugin → Marketplaces → plan-tango → Update. → STOP."error" → print Update check error: <parsed.message> → STOP.If --check flag was passed: STOP here regardless of status. No git operations.
cd "$MARKETPLACE_DIR" && git status --porcelain
If stdout is non-empty:
--force: ABORT with:
Marketplace clone has local modifications at <MARKETPLACE_DIR>:
<list first 10 modified files from git status --porcelain>
Resolve them manually before updating, or pass --force to discard
them.
--force: print one-line warning ⚠ Discarding local modifications: <count> file(s). and continue.Use AskUserQuestion (single question, two options):
Update plan-tango from v<CURRENT> to v<LATEST>?Update?Yes, update now, description Pull v<LATEST> from GitHub and overwrite the local plugin install.Cancel, description Leave the current version in place.If user picks Cancel → print Update cancelled. → STOP.
cd "$MARKETPLACE_DIR" && git fetch origin --tags && git reset --hard "v$LATEST"
If git fetch fails (network) → ABORT with Fetch failed; aborting. Try again or update manually via /plugin UI. Tree is untouched.
If git reset --hard "v$LATEST" fails (tag doesn't exist — race with a tag deletion) → ABORT with Tag v<LATEST> not found on remote. Aborting. The update-check cache may be stale; try /plan-tango:update again in a few minutes.
On success — capture the new commit:
NEW_COMMIT=$(git rev-parse --short HEAD)
Print exactly:
✓ plan-tango updated to v<LATEST> (commit <NEW_COMMIT>).
To activate the new version in your current Claude Code session:
- Terminal: /reload-plugins
- VS Code: Developer: Reload Window (or restart Claude Code)
After reload, run /plan-tango:tango normally — the new skill code, scripts,
and agents will be picked up.
<critical_invariants>
$MARKETPLACE_DIR. This skill only touches the marketplace clone; user's ~/.claude/plan-tango/config.json, plans under ~/.claude/plans/, and any other path stay untouched.--check flow. No auto-pull without user picking Yes, update now.origin/main. Lands users on a stable release; never on whatever's currently on the development branch.git reset --hard in Step 6.
</critical_invariants>npx claudepluginhub egsok/plan-tango --plugin plan-tangoUpdates the WOZCODE plugin to the latest version from its marketplace, with fallback steps for authentication and installation issues.
Checks for skills-for-fabric marketplace updates at session start, compares local version against GitHub releases, and shows changelog if updates are available.
Checks for updates to the skills-for-fabric marketplace at session start. Compares local version against GitHub releases and shows changelog if updates are available. Useful for staying up-to-date with skill changes.