with one click
nexus-upgrade
// Upgrade Nexus from published release bundles. Use when asked to upgrade Nexus, update Nexus, or get the latest Nexus version.
// Upgrade Nexus from published release bundles. Use when asked to upgrade Nexus, update Nexus, or get the latest Nexus version.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | nexus-upgrade |
| version | 1.1.0 |
| description | Upgrade Nexus from published release bundles. Use when asked to upgrade Nexus, update Nexus, or get the latest Nexus version. |
| allowed-tools | ["Bash","Read","Write","AskUserQuestion"] |
This skill upgrades an installed, managed Nexus release from a published release bundle. It is intentionally release-channel based: install tagged Nexus bundles, not arbitrary branch heads.
Upgrade Nexus to the latest published release and show what's new.
/nexus-upgrade follows the release contract resolved by nexus-update-check.
This helper updates Nexus itself from published releases. Users upgrade Nexus
versions, not upstream repos. The installed version is the tagged Nexus release
bundle for v{version} on the configured release_channel, not branch head.
Release detection is channel-based through release_channel and published
release.json manifests.
Managed installs include both managed_release and managed_vendored. The
installer writes .nexus-install.json, and successful upgrades record
just-upgraded.json in the host update-state.
If the current project has a managed vendored install at .claude/skills/nexus
with .nexus-install.json, /nexus-upgrade targets that install. Otherwise it
targets the managed global install.
Vendored copies sync to the same published Nexus release as the managed global
install.
Set this once for the snippets below:
if [ -n "${NEXUS_ROOT:-}" ]; then
:
else
_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd -P)
if [ -f "$_ROOT/.claude/skills/nexus/.nexus-install.json" ]; then
NEXUS_ROOT="$_ROOT/.claude/skills/nexus"
else
NEXUS_ROOT="${HOME:-}/.claude/skills/nexus"
fi
fi
This section is referenced by all skill preambles when they detect UPGRADE_AVAILABLE.
First, check whether automatic upgrade is enabled:
_AUTO=""
[ "${NEXUS_AUTO_UPGRADE:-}" = "1" ] && _AUTO="true"
[ -z "$_AUTO" ] && _AUTO=$("$NEXUS_ROOT/bin/nexus-config" get auto_upgrade 2>/dev/null || true)
echo "AUTO_UPGRADE=$_AUTO"
If AUTO_UPGRADE=true or AUTO_UPGRADE=1, skip AskUserQuestion, log Auto-upgrading Nexus v{old} -> v{new}..., and proceed directly to Step 2.
Otherwise, ask:
Nexus v{new} is available (you're on v{old}). Upgrade now?["Yes, upgrade now", "Always keep me up to date", "Not now", "Never ask again"]If the user chooses Yes, upgrade now, proceed to Step 2.
If the user chooses Always keep me up to date:
"$NEXUS_ROOT/bin/nexus-config" set auto_upgrade true
Tell the user: Auto-upgrade enabled. Future updates will install automatically.
If the user chooses Not now, record snooze state with escalating backoff (24h, 48h, then 1 week) and continue with the current skill. Do not mention the upgrade again in this run.
If the user chooses Never ask again:
"$NEXUS_ROOT/bin/nexus-config" set update_check false
Tell the user: Update checks disabled. Run "$NEXUS_ROOT/bin/nexus-config" set update_check true to re-enable.
Install the candidate release bundle through the Nexus-owned helper:
NEXUS_UPGRADE_TO_VERSION="{new}" \
NEXUS_UPGRADE_TO_TAG="v{new}" \
"$NEXUS_ROOT/bin/nexus-upgrade-install"
The helper resolves the candidate release.json, downloads the tagged tar.gz
bundle, backs up the current install, runs ./setup, writes .nexus-install.json,
and clears stale update-state on success. It only accepts an already-managed
install with .nexus-install.json; legacy migration stays in Task 4.
Read the upgraded install's CHANGELOG.md. Summarize the entries between the
old version and the new version as 5-7 bullets grouped by theme. Focus on
user-facing changes.
Format:
Nexus v{new} — upgraded from v{old}!
What's new:
- [bullet 1]
- [bullet 2]
- ...
Happy shipping!
After showing what's new, continue with whatever skill the user originally invoked.
When invoked directly as /nexus-upgrade:
"$NEXUS_ROOT/bin/nexus-update-check" --force 2>/dev/null || \
"$NEXUS_ROOT/bin/nexus-update-check" --force 2>/dev/null || true
If the output is UPGRADE_AVAILABLE <old> <new>, follow Steps 1-4 above.
If there is no output, tell the user they are already on the latest version.
Before reporting completion, verify the installed release state:
"$NEXUS_ROOT/bin/nexus-version" 2>/dev/null || cat "$NEXUS_ROOT/VERSION" 2>/dev/null
cat "$NEXUS_ROOT/.nexus-install.json" 2>/dev/null
If the upgrade ran, the reported version must match the installed release tag. If no upgrade was available, the fresh update check output is the evidence.