Muggle upgrade

From multiplex-ai/muggle-ai-works · View interactive version

Muggle upgrade is an AI agent skill from the GitHub repository multiplex-ai/muggle-ai-works. Update Muggle AI to the newest version on its current release lane. Use when user types muggle upgrade or asks to update Muggle Test tools.

How to use this skill

Skill file

Muggle Test Upgrade

Telemetry first step: see CODE0. Use skillName: "muggle-upgrade".

Running outside Claude Code (in Codex, for one)? Read CODE0 first — it maps the tools and paths this skill names to your host's.

Update all Muggle AI components to the newest version on the release lane the machine is already on. This means both the @muggleai/works CLI on npm and the Electron runner the CLI manages.

Release lanes

Two lanes ship on npm, each with its own dist-tag:

| Lane | dist-tag | Version shape |

| :--- | :------- | :------------ |

| stable | latest | 5.15.0 |

| staging | staging | 5.16.0-staging.109 |

The lane is read off the installed build, never chosen by this skill. A version carrying the -staging. prerelease identifier is on staging; any other is on stable. Stable is the default, and a machine that has never installed a prerelease stays there.

Upgrade within the lane, and compare against that lane's tag. Semver orders 5.15.0-staging.106 below 5.15.0, so a staging build measured against latest looks out of date — that comparison silently moves a staging user onto stable and takes away the lane they were testing on. It is the specific bug this section exists to prevent.

Switch lanes only when the user asks in this invocation — "switch to stable", "go back to prod", "put me on staging", or naming an explicit version to install. A bare invocation always keeps the lane it found. When the user does name a version, install exactly that and say which lane it lands on.

Steps

  1. Run /muggle:muggle-status checks to capture current versions.
  1. Capture the installed CLI and resolve its lane:

Read the lane off the installed version per the table above, then take that lane's tag as the upgrade target. Do not compare across lanes.

  1. Run muggle upgrade. It updates the Electron runner, then the npm global @muggleai/works when it is behind its own lane's tag, and prints the version each moved from and to. muggle upgrade --check reports the same without installing.
  1. If muggle upgrade reports no npm global install, or npm fails, upgrade the CLI by hand. Install the tag, not a version string, so the lane keeps resolving on later runs:
  1. Muggle Watch — gate: CODE0. The package install's postinstall already acted on always and never, so print their silent footer. On ask, run Picker 1; on Install it, run muggle watch install and report its last line.
  1. Reload plugins — the global npm install (step 3 or 4) runs a postinstall script that points Claude Code's muggle-works marketplace at the installed package, so the plugin loads from the version just installed — but Claude Code only picks up new skills/agents/hooks after a reload. With Muggle Watch installed, idle background sessions are restarted onto the new build within a few minutes; this session and other terminal sessions still need a reload by hand. Tell the user:

> Run /reload-plugins to load the updated skills, agents, and hooks.

Wait for the user to confirm they've reloaded before proceeding.

  1. Run /muggle:muggle-status again to confirm everything is healthy after upgrade.

Output

Show a before/after table for CLI, Electron runner, MCP server, and Auth, and name the lane beside the CLI version so it is visible that it did not move. Call out any version that did not change so the user understands what shipped vs what was already current.

If any component upgraded, always end with the /reload-plugins reminder — even if the user doesn't need new features right away, stale cached skills can cause confusing behavior.

If the upgrade fails at any step, report the error and suggest running /muggle:muggle-repair.

Preferences

| Preference | Gate |

| :--------- | :--- |

| autoInstallWatchService | Step 5 — run Muggle Watch as a scheduled job on any OS; postinstall acts on always/never, ask asks here, default ask |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.