From nanopm
Upgrades nanopm and handles inline upgrade prompts when UPGRADE_AVAILABLE appears in skill preambles. Supports auto-upgrade, snooze with backoff, and never-ask configuration.
How this skill is triggered — by the user, by Claude, or both
Slash command
/nanopm:pm-upgradeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- portability-v2 -->
Multi-host portability rules. When invoking
AskUserQuestion:
- The
headerfield MUST be a short noun phrase (≤ 12 characters). Mistral Vibe rejects longer headers withstring_too_long. Pick from:Start,Target,Scope,Audience,Methodology,Feature,Question.- The
optionslist MUST have at least 2 items. Vibe rejects empty/single-option calls. For free-text input, always provide ≥ 2 framing options (e.g.Yes, here's the input/Skip) — never callask_user_questionwithoptions: [].
source ~/.nanopm/lib/nanopm.sh 2>/dev/null || \
source .nanopm/lib/nanopm.sh 2>/dev/null || \
{ echo "ERROR: nanopm not installed. Run: curl -fsSL https://raw.githubusercontent.com/nmrtn/nanopm/main/setup | bash"; exit 1; }
nanopm_preamble
This section is followed by all skill preambles when they detect UPGRADE_AVAILABLE {old} {new} in the preamble output.
Check if auto-upgrade is configured:
source ~/.nanopm/lib/nanopm.sh 2>/dev/null || source .nanopm/lib/nanopm.sh 2>/dev/null || true
_AUTO=$(nanopm_config_get "auto_upgrade")
echo "AUTO_UPGRADE=${_AUTO:-false}"
If AUTO_UPGRADE=true: skip AskUserQuestion. Log "Auto-upgrading nanopm v{old} → v{new}..." and proceed to Step 2.
Otherwise, ask via AskUserQuestion:
If "Yes, upgrade now": proceed to Step 2.
If "Always keep me up to date":
source ~/.nanopm/lib/nanopm.sh 2>/dev/null || source .nanopm/lib/nanopm.sh 2>/dev/null || true
nanopm_config_set "auto_upgrade" "true"
Tell user: "Auto-upgrade enabled — future updates will install automatically." Then proceed to Step 2.
If "Not now": write snooze state with escalating backoff. Then continue with the originally invoked skill without upgrading.
_SNOOZE="$HOME/.nanopm/update-snoozed"
_REMOTE_VER="{new}"
_CUR_LEVEL=0
if [ -f "$_SNOOZE" ]; then
_SV=$(awk '{print $1}' "$_SNOOZE")
if [ "$_SV" = "$_REMOTE_VER" ]; then
_CUR_LEVEL=$(awk '{print $2}' "$_SNOOZE")
case "$_CUR_LEVEL" in *[!0-9]*) _CUR_LEVEL=0 ;; esac
fi
fi
_NEW_LEVEL=$(( _CUR_LEVEL + 1 ))
[ "$_NEW_LEVEL" -gt 3 ] && _NEW_LEVEL=3
echo "$_REMOTE_VER $_NEW_LEVEL $(date +%s)" > "$_SNOOZE"
Tell user the snooze duration: level 1 → "next reminder in 24h"; level 2 → "48h"; level 3 → "1 week".
If "Never ask again":
source ~/.nanopm/lib/nanopm.sh 2>/dev/null || source .nanopm/lib/nanopm.sh 2>/dev/null || true
nanopm_config_set "update_check_disabled" "1"
rm -f "$HOME/.nanopm/update-snoozed"
Tell user: "Update checks disabled. Re-enable with: nanopm_config_set update_check_disabled 0 in your shell."
_LOCAL_REPO=""
# Check if we're inside the nanopm source repo
if [ -f "$(git rev-parse --show-toplevel 2>/dev/null)/pm-upgrade/SKILL.md" ] 2>/dev/null; then
_LOCAL_REPO=$(git rev-parse --show-toplevel)
fi
# Check common clone locations
[ -z "$_LOCAL_REPO" ] && [ -f "$HOME/Code/nanopm/pm-upgrade/SKILL.md" ] && \
_LOCAL_REPO="$HOME/Code/nanopm"
echo "LOCAL_REPO=${_LOCAL_REPO:-none}"
_OLD_VER=$(cat ~/.nanopm/VERSION 2>/dev/null || echo "unknown")
echo "OLD_VERSION=$_OLD_VER"
If LOCAL_REPO is set (git install):
cd "$_LOCAL_REPO"
git pull origin main
bash setup
If LOCAL_REPO is not set (curl / vendored install):
curl -fsSL https://raw.githubusercontent.com/nmrtn/nanopm/main/setup | bash
If the upgrade fails, tell the user: "Upgrade failed. Your current version (v{old}) is still active. Check your network connection or run the setup script manually."
rm -f ~/.nanopm/last-update-check
rm -f ~/.nanopm/update-snoozed
Fetch the changelog from GitHub:
_CHANGELOG=$(curl -fsSL --max-time 5 \
"https://raw.githubusercontent.com/nmrtn/nanopm/main/CHANGELOG.md" 2>/dev/null || echo "")
echo "$_CHANGELOG"
Find the section for the new version in the changelog. Summarize as 4-6 bullets grouped by theme (new skills, improvements, fixes). Don't list every line — focus on user-facing changes.
Format:
nanopm v{new} — upgraded from v{old}!
What's new:
- [bullet 1]
- [bullet 2]
...
After showing what's new, continue with the originally invoked skill (if this was an inline upgrade triggered by UPGRADE_AVAILABLE). If invoked standalone as /pm-upgrade, done.
When invoked directly as /pm-upgrade:
source ~/.nanopm/lib/nanopm.sh
_CHECK=$(nanopm_update_check)
echo "CHECK: $_CHECK"
If UPGRADE_AVAILABLE {old} {new} in output: follow Steps 1-6 above.
If no UPGRADE_AVAILABLE output: tell the user "You're already on the latest version (v{current})."
STATUS: DONE
npx claudepluginhub nmrtn/nanopm --plugin nanopmUpdates a local pm-skills installation to the latest release with pre-flight checks, version comparison, change preview, and structured update report.
Automates Navigator plugin updates with version detection, conflict resolution, and post-update validation. Invoked when user mentions upgrading Navigator or getting new features.
Checks for skills-for-fabric marketplace updates at session start, compares local version against GitHub releases, and shows changelog if updates are available.