ops-update

GitHub

一键升级本地claude-ops插件,自动刷新目录、处理缓存、执行迁移并同步依赖,确保环境清洁。适用于版本落后或缓存异常场景。

claude-ops/skills/ops-update/SKILL.md Lifecycle-Innovations-Limited/claude-ops

Trigger Scenarios

插件版本过旧需要更新 发布新版本后同步 缓存状态异常需清理

Install

npx skills add Lifecycle-Innovations-Limited/claude-ops --skill ops-update -g -y
More Options

Non-standard path

npx skills add https://github.com/Lifecycle-Innovations-Limited/claude-ops/tree/main/claude-ops/skills/ops-update -g -y

Use without installing

npx skills use Lifecycle-Innovations-Limited/claude-ops@ops-update

指定 Agent (Claude Code)

npx skills add Lifecycle-Innovations-Limited/claude-ops --skill ops-update -a claude-code -g -y

安装 repo 全部 skill

npx skills add Lifecycle-Innovations-Limited/claude-ops --all -g -y

预览 repo 内 skill

npx skills add Lifecycle-Innovations-Limited/claude-ops --list

SKILL.md

Frontmatter
{
    "name": "ops-update",
    "description": "Upgrade the local claude-ops (\"ops\") plugin to the latest published version in one command — refresh the marketplace catalogue, update the installed plugin (with stale-cache force-reinstall fallback), reapply local cache patches, prune every old cache version, rewrite stale version-pinned paths, run per-version migrations, then prompt to reload. Use when the box is on an older plugin version, after a release, or when the cache looks stale.",
    "allowed-tools": [
        "Bash",
        "Read",
        "AskUserQuestion"
    ],
    "argument-hint": "[--dry-run|--force|--to X.Y.Z|--no-prune|--no-patches|--no-rewrite|--no-localsync]"
}

OPS ► UPDATE — one-command local plugin upgrade

Upgrades the local claude-ops plugin to the newest version published in the ops-marketplace catalogue, then leaves the box clean: no stale cache dirs, no dangling version-pinned paths.

The workhorse is ${CLAUDE_PLUGIN_ROOT}/bin/ops-update. It runs a 9-step loop:

  1. Refresh catalogueclaude plugin marketplace update ops-marketplace (git-pulls the clone).
  2. Resolve target — newest version from the refreshed marketplace.json (or --to X.Y.Z).
  3. Update pluginclaude plugin update ops@ops-marketplace, with a force-reinstall fallback (rm cache + claude plugin install) for the Claude Code bug where update reports "already latest" while the cache stays stale (anthropics/claude-code#61954).
  4. Reapply patches — runs idempotent scripts in scripts/cache-patches/ against the new cache (empty when all fixes are upstream — the desired state).
  5. Prune — deletes every old cache/ops-marketplace/ops/<ver>/ except the new one.
  6. Rewrite — fixes stale cache/.../ops/<oldver>/ paths in live configs/scripts/systemd units only (never logs, memory, or transcripts — those use ${CLAUDE_PLUGIN_ROOT} at runtime so they self-resolve).
  7. Migrate — runs ops-post-update-migrate (idempotent, per-version). It also maintains a stable cache/.../ops/current/ directory (rsynced from the new version and repointed in installed_plugins.json) so Claude Code GC'ing the old versioned dir mid-session never causes "Plugin directory does not exist" hook errors.
  8. Local sync — if a linked local source checkout of this repo is present under ~/Projects, fast-forwards its main to origin/main so a dev clone never silently drifts behind the published release. Acts only on a clean main (never clobbers uncommitted WIP, a feature branch, or unpushed commits); a no-op when no checkout exists. Skip with --no-localsync.
  9. Report — old→new, what changed, and that a restart / /reload-plugins is needed to load it.
  10. Companionsbin/ops-update step 9 runs scripts/install-companions.sh against plugin-dependencies.json. Every companion with required: true is co-installed when missing and updated on every ops-update:
    • desktop-act/ops:desktop + captcha cascade
    • gsd/ops:flow project mode, /ops:projects, /ops:go
    • gstack — skills clone for /ops:flow ad-hoc (/spec /review /qa /ship)
    • superpowers — merge / orchestrate / triage checkpoints
    • feature-dev/ops:ops-feature-dev Skip only with --no-companions or OPS_SKIP_COMPANIONS=1.
# manual companion pass
bash "${CLAUDE_PLUGIN_ROOT}/scripts/install-companions.sh"
bash "${CLAUDE_PLUGIN_ROOT}/scripts/install-companions.sh --status"
# skip from ops-update:
${CLAUDE_PLUGIN_ROOT}/bin/ops-update --no-companions

How to run it

Steps 5–6 are destructive (prune + rewrite), so always dry-run first, show the plan, confirm, then apply (Rule 5).

1. Dry-run and show the plan

${CLAUDE_PLUGIN_ROOT}/bin/ops-update --dry-run

Present the output: current → target version, which cache versions would be pruned, which files would be rewritten. If the dry-run shows already on <ver> and nothing to prune/rewrite, tell the user the box is already current and stop (offer --force only if they suspect a stale cache).

2. Confirm

Use AskUserQuestion before applying:

Upgrade local claude-ops <CUR> → <NEW>?  (prunes N old cache versions, rewrites M files)
  [Apply upgrade]
  [Force re-materialise cache]   ← only if same-version stale-cache is suspected
  [Cancel]

3. Apply

${CLAUDE_PLUGIN_ROOT}/bin/ops-update          # or: --force

Stream the step-by-step output. On success, surface the final line verbatim:

Restart Claude Code (or run /reload-plugins) to load v<NEW>.

The running session will NOT see the new version until reload — this is a Claude Code constraint, not a failure.

Flags

Flag Effect
--dry-run Report only; change nothing. Always run this first.
--force Force-reinstall even when the CLI claims "already latest" (bug #61954).
--to X.Y.Z Target a specific version instead of the catalogue's newest.
--no-prune Keep old cache versions.
--no-patches Skip the cache-patch reapply step.
--no-rewrite Skip the stale-version-path rewrite step.
--no-localsync Skip fast-forwarding a linked local source checkout's main.
--no-companions Skip required companion co-install/update (desktop-act, gsd, gstack, superpowers, feature-dev).

Mobile / SSH (Rule 7)

The bin auto-detects a non-TTY and drops colour; its output is already line-per-fact, so relay it as-is — no tables, no banners.

Notes

  • Idempotent. Re-running on an already-current box is a near no-op (resolve → "already on " → nothing to prune/rewrite/migrate).
  • Public repo / no secrets (Rule 0): the script reads only $HOME/.claude/plugins state; it writes no personal data.
  • To publish a new version first, see ${CLAUDE_PLUGIN_ROOT}/bin/ops-release (bumps plugin.json + marketplace.json + CHANGELOG, opens the release PR, tags). ops-release ships it; ops-update pulls it down locally.

Version History

  • 64bad13 Current 2026-08-12 09:02

Same Skill Collection

claude-ops/skills/boss/SKILL.md
claude-ops/skills/flow/SKILL.md
claude-ops/skills/ledger/SKILL.md
claude-ops/skills/ops-accounts/SKILL.md
claude-ops/skills/ops-ar/SKILL.md
claude-ops/skills/ops-aws-audit/SKILL.md
claude-ops/skills/ops-comms/SKILL.md
claude-ops/skills/ops-competitors/SKILL.md
claude-ops/skills/ops-credentials/SKILL.md
claude-ops/skills/ops-daemon/SKILL.md
claude-ops/skills/ops-dash/SKILL.md
claude-ops/skills/ops-deploy-fix/SKILL.md
claude-ops/skills/ops-deploy/SKILL.md
claude-ops/skills/ops-desktop/SKILL.md
claude-ops/skills/ops-doctor/SKILL.md
claude-ops/skills/ops-ecom/SKILL.md
claude-ops/skills/ops-feature-dev/SKILL.md
claude-ops/skills/ops-fires/SKILL.md
claude-ops/skills/ops-fleet/SKILL.md
claude-ops/skills/ops-go/SKILL.md
claude-ops/skills/ops-gtm/SKILL.md
claude-ops/skills/ops-home/SKILL.md
claude-ops/skills/ops-inbox/SKILL.md
claude-ops/skills/ops-integrate/SKILL.md
claude-ops/skills/ops-leadgen/SKILL.md
claude-ops/skills/ops-linear/SKILL.md
claude-ops/skills/ops-mac/SKILL.md
claude-ops/skills/ops-marketing/SKILL.md
claude-ops/skills/ops-mcp/SKILL.md
claude-ops/skills/ops-merge/SKILL.md
claude-ops/skills/ops-monitor/SKILL.md
claude-ops/skills/ops-next/SKILL.md
claude-ops/skills/ops-orchestrate/SKILL.md
claude-ops/skills/ops-package/SKILL.md
claude-ops/skills/ops-pocket/SKILL.md
claude-ops/skills/ops-projects/SKILL.md
claude-ops/skills/ops-recap/SKILL.md
claude-ops/skills/ops-release/SKILL.md
claude-ops/skills/ops-resume/SKILL.md
claude-ops/skills/ops-revenue/SKILL.md
claude-ops/skills/ops-rotate-setup/SKILL.md
claude-ops/skills/ops-rotate/SKILL.md
claude-ops/skills/ops-secret-sync/SKILL.md
claude-ops/skills/ops-settings/SKILL.md
claude-ops/skills/ops-ship/SKILL.md
claude-ops/skills/ops-speedup/SKILL.md
claude-ops/skills/ops-status/SKILL.md
claude-ops/skills/ops-triage/SKILL.md
claude-ops/skills/ops-unifi/SKILL.md

Metadata

Files
0
Version
64bad13
Hash
bf8618e3
Indexed
2026-08-12 09:02

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-12 20:46
浙ICP备14020137号-1 $お客様$