Claude
Skills
Sign in
Back

nav-upgrade

Included with Lifetime
$97 forever

Automates Navigator plugin updates. Detects current version, updates plugin, verifies installation, updates project CLAUDE.md, and validates new features. Auto-invoke when user mentions upgrading Navigator or getting new features.

General

What this skill does


# Navigator Upgrade Skill

Automate Navigator plugin updates with version detection, conflict resolution, and post-update validation.

## When to Invoke

Auto-invoke when user says:
- "Update Navigator"
- "Upgrade Navigator plugin"
- "Get latest Navigator version"
- "Update to Navigator v3.3.0"
- "Install new Navigator features"
- "Check for Navigator updates"

## What This Does

**6-Step Workflow**:
1. **Version Detection**: Check current Navigator version vs latest
2. **Plugin Update**: Execute `/plugin update navigator`
3. **Verification**: Confirm update succeeded
4. **CLAUDE.md Update**: Update project configuration (via nav-sync-claude)
5. **Hooks Setup**: Install/update token monitoring hooks in project
6. **Feature Discovery**: Show new features available

**Time Savings**: Manual update (10-15 min) → Automated (2 min)

---

## Prerequisites

- Navigator plugin installed
- Project initialized with Navigator
- Internet connection for plugin update

---

## Workflow Protocol

### Step 1: Version Detection

**Execute**: `version_detector.py`

**Check both stable and pre-release versions**:
```bash
# Current installed version
grep '"version"' .claude-plugin/plugin.json

# Get all releases (including pre-releases)
curl -s https://api.github.com/repos/alekspetrov/navigator/releases

# Parse:
# - Latest stable (prerelease: false)
# - Latest pre-release (prerelease: true)
# - Compare with current version
```

**Output scenarios**:

**Scenario 1: Stable update available**
```json
{
  "current_version": "4.0.0",
  "latest_stable": "4.2.0",
  "latest_prerelease": null,
  "recommendation": "update_to_stable"
}
```

**Scenario 2: Pre-release available (user on stable)**
```json
{
  "current_version": "4.0.0",
  "latest_stable": "4.0.0",
  "latest_prerelease": "4.3.0",
  "recommendation": "offer_prerelease_option"
}
```

**Present choice**:
```
✅ You're on the latest stable version (v4.0.0)

⚡ Experimental version available: v4.3.0

New in v4.3.0 (Experimental):
• Multi-Claude agentic workflows
• 30% success rate (use for simple features)
• PM integration with ticket closing

Options:
[1] Stay on stable v4.0.0 (recommended)
[2] Try experimental v4.3.0 (early adopter)

Your choice [1-2]:
```

**Scenario 3: Already on latest (stable or pre-release)**
```
✅ You're on v4.3.0 (latest experimental)

Latest stable: v4.0.0
Status: You're ahead of stable (testing experimental features)

New features in your version:
- Multi-Claude workflows
- Task agents in sub-Claude phases
```

Skip to Step 5 (Feature Discovery).

**Scenario 4: On pre-release, newer stable available**
```
⚠️  You're on v4.3.0 (experimental)
Latest stable: v4.6.0

Recommendation: Update to stable v4.6.0
Experimental features from v4.3.0 are now stable.
```

---

### Step 2: Plugin Update

**Scenario-based update strategy**:

#### Scenario 2: Pre-release Available (User on Stable)

When pre-release detected, present choice using AskUserQuestion tool:

```markdown
✅ You're on latest stable version (v4.0.0)

⚡ Experimental version available: v4.3.0

New in v4.3.0 (Experimental):
• Multi-Claude agentic workflows
• 30% success rate (use for simple features)
• PM integration with ticket closing

**Question**: Which version would you like?

**Options**:
[1] **Stay on stable v4.0.0** (recommended)
    - Production-ready
    - No experimental features
    - Most reliable

[2] **Try experimental v4.3.0** (early adopter)
    - Multi-Claude workflows
    - Latest features
    - 30% completion rate
    - Help test new functionality

Your choice?
```

**If user chooses [1] (Stay stable)**:
```
✓ Staying on v4.0.0 (latest stable)

No action needed. Run nav-upgrade again when you're ready to try experimental features.
```

**If user chooses [2] (Try experimental)**:
```bash
# Uninstall current version
/plugin uninstall navigator

# Add marketplace (if not already added)
/plugin marketplace add alekspetrov/navigator

# Install specific pre-release version
# Note: /plugin update only fetches stable, must install specific version
git clone https://github.com/alekspetrov/navigator.git /tmp/navigator-v4.3.0
cd /tmp/navigator-v4.3.0
git checkout v4.3.0

# Install from local checkout
/plugin install /tmp/navigator-v4.3.0
```

**Then verify installation**:
```bash
/plugin list | grep navigator
# Should show: navigator (v4.3.0)
```

#### Scenario 1: Stable Update Available

**Execute**: `/plugin update navigator`

**Monitor output**:
```
Updating navigator...
✅ Navigator updated to v4.2.0
```

**If update fails**:
```
❌ Update failed: [error message]

Troubleshooting:
1. Restart Claude Code
2. Try: /plugin uninstall navigator && /plugin install navigator
3. Check internet connection
4. Report issue: https://github.com/alekspetrov/navigator/issues
```

**Automatic retry** (once):
If update fails, try uninstall/reinstall automatically:
```bash
/plugin uninstall navigator
/plugin marketplace add alekspetrov/navigator
/plugin install navigator
```

---

### Step 3: Verification

**Execute**: `plugin_verifier.py`

**Verify**:
1. Plugin version matches latest
2. New skills registered in plugin.json
3. Skills are invokable

**Test new skills** (v3.3.0 example):
```bash
# Test that visual-regression skill exists
ls ~/.config/claude/plugins/navigator/skills/visual-regression/SKILL.md 2>/dev/null || echo "Skill not found"
```

**Output**:
```
✅ Update Verification

Version: v3.3.0 ✅
New Skills Registered: visual-regression ✅
Skills Invokable: ✅

Update successful!
```

**If verification fails**:
```
⚠️ Update completed but verification failed

Issue: visual-regression skill not found
Fix: Restart Claude Code to reload skills

After restarting, verify:
"Set up visual regression for Button"
```

Prompt user to restart Claude Code.

**IMPORTANT - Restart Required After All Updates**:

Claude Code caches skill paths at session start. Even successful updates require a restart to load new skills:

```
⚠️  RESTART REQUIRED

Plugin updated successfully to vX.Y.Z.
Claude Code caches skill paths at session start.

To use new/updated skills:
1. Close Claude Code
2. Reopen Claude Code
3. Run "nav start" to verify new version

Without restart:
- Old skill versions continue running
- New skills won't be available
- May see "skill not found" errors
```

This is a Claude Code behavior, not a Navigator issue. The plugin files update correctly, but the active session continues using cached skill paths from the old version.

---

### Step 4: Update Project CLAUDE.md (Automatic)

**After plugin update, automatically invoke**: `nav-sync-claude` skill

```
🔄 Syncing project CLAUDE.md with updated plugin...

✓ Using template from GitHub (v4.3.0)
✓ Extracted customizations
✓ Generated updated CLAUDE.md
```

**What happens automatically**:
1. Detects new plugin version (e.g., v4.3.0)
2. Fetches matching template from GitHub
3. Preserves project customizations
4. Updates CLAUDE.md in current project
5. Shows diff for review

**Template sync benefits**:
- ✅ CLAUDE.md always matches installed plugin version
- ✅ No template drift (v4.0 templates with v4.3 plugin)
- ✅ Pre-release templates accessible
- ✅ Offline fallback to bundled templates

**User action required**:
```
Review changes and commit:

git add CLAUDE.md
git commit -m "chore: update CLAUDE.md to Navigator v4.3.0"
```

**See**: `nav-sync-claude` skill for details.

---

### Step 5: Migrate Legacy Hooks Out of `.claude/settings.json`

**v6.13.0+**: Navigator's lifecycle hooks now ship with the plugin manifest
(`.claude-plugin/plugin.json`'s top-level `hooks` field). Claude Code only
substitutes `${CLAUDE_PLUGIN_ROOT}` for hooks declared in a plugin manifest,
so the prior approach (merging hooks into the project's `.claude/settings.json`)
produced broken commands like `/hooks/X.py` (empty expansion). Hooks ship
with the plugin from v6.13.0 onwards.

**For existing installs**, the old hook entries are duplicated in
`.claude/settings.json` and must be removed to prevent double-firing:

```bash
PLUGI
Files: 7
Size: 56.0 KB
Complexity: 46/100
Category: General

Related in General