/navigator:nav-sync-claudefrom navigator
Migrates a project's CLAUDE.md to the latest Navigator version, detecting outdated slash commands and preserving project-specific customizations.
Ships in navigator. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Update project's CLAUDE.md to latest Navigator version (v3.1) while preserving project-specific customizations.
Invoke this skill when the user:
DO NOT invoke if:
Check if CLAUDE.md exists and detect version:
if [ ! -f "CLAUDE.md" ]; then
echo "❌ No CLAUDE.md found in current directory"
echo ""
echo "Run 'Initialize Navigator in this project' first."
exit 1
fi
Use version_detector.py to analyze CLAUDE.md:
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$(cat "${NAVIGATOR_CONFIG_HOME:-${XDG_CONFIG_HOME:-$HOME/.config}/navigator}/plugin-root" 2>/dev/null)}"
[ -d "$PLUGIN_DIR/skills" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-sync-claude/functions/version_detector.py" CLAUDE.md
This script checks for:
/nav:start, /nav:doc, etc.)Outputs:
outdated - Has /nav: commands or v1/v2 markerscurrent - Already v3.1 with natural languageunknown - Can't determine (custom/non-Navigator file)If current:
✅ CLAUDE.md is already up to date (v3.1)
No migration needed.
Exit successfully.
If unknown:
⚠️ CLAUDE.md doesn't appear to be a Navigator file
This might be a custom configuration. Manual review recommended.
Proceed with migration anyway? [y/N]
If user declines, exit. If accepts, continue.
Always create backup before modifying:
cp CLAUDE.md CLAUDE.md.backup
echo "📦 Backup created: CLAUDE.md.backup"
Use claude_updater.py to parse current CLAUDE.md:
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$(cat "${NAVIGATOR_CONFIG_HOME:-${XDG_CONFIG_HOME:-$HOME/.config}/navigator}/plugin-root" 2>/dev/null)}"
[ -d "$PLUGIN_DIR/skills" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-sync-claude/functions/claude_updater.py" extract CLAUDE.md > /tmp/nav-customizations.json
This records the file's layout verbatim, with fenced code blocks kept whole (a
# comment inside a bash block is not a header):
# header as written; project_name is the part before
- Claude Code Configuration when the title has that shape, else the whole title## header## section in order, {"header", "body"}, bodies byte for byte
(### subsections, fences and --- rules included)## Navigator when present, else
the section whose body carries the **Navigator runtime** paragraph; empty when none## Context section existsThe flat lists stay for readers of the JSON and for hand-written customizations without
a sections layout: description, core_principle and tech_stack (from
Context), code_standards and forbidden_actions (every bullet, template defaults
included; a default the project removed stays removed), pm_tool, and
custom_sections with custom_section_anchors (every ## header the lists do not
render, with the standard section each one precedes).
Apply latest template with extracted customizations:
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$(cat "${NAVIGATOR_CONFIG_HOME:-${XDG_CONFIG_HOME:-$HOME/.config}/navigator}/plugin-root" 2>/dev/null)}"
[ -d "$PLUGIN_DIR/skills" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
# Template fetching now automatic via get_template_path():
# 1. Tries GitHub (version-matched)
# 2. Falls back to bundled if offline
python3 "$PLUGIN_DIR/skills/nav-sync-claude/functions/claude_updater.py" generate \
--customizations /tmp/nav-customizations.json \
--template "$PLUGIN_DIR/templates/CLAUDE.md" \
--output CLAUDE.md
Generate stamps **Last Updated** with today's date and **Navigator Version** with the
installed plugin version (--stamp-date / --stamp-version override them). A dry run
writes anywhere: --output /tmp/CLAUDE.preview.md. The hook-liveness guard checks the
project root, never the output directory: --project-root DIR, else the source_dir
that extract recorded, else the current directory. It exits 3 and leaves CLAUDE.md
untouched when .agent/.nav-runtime-state.json is absent or older than 7 days.
Template Source Priority:
https://raw.githubusercontent.com/qf-studio/navigator/v{version}/templates/CLAUDE.md
templates/CLAUDE.md from installed plugin
What this does:
Display changes for user review:
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "📝 CHANGES TO CLAUDE.MD"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
# Show unified diff
diff -u CLAUDE.md.backup CLAUDE.md || true
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
Show summary of changes:
✅ CLAUDE.md Updated to v3.1
Key changes:
✓ Removed slash command references (e.g., /nav:start)
✓ Added natural language examples ("Start my Navigator session")
✓ Added skills architecture explanation
✓ Updated Navigator workflow section
✓ Preserved your project-specific customizations:
- Tech stack: [list]
- Code standards: [count] custom rules
- Forbidden actions: [count] custom rules
Backup saved: CLAUDE.md.backup
Next steps:
1. Review changes: git diff CLAUDE.md
2. Test: "Start my Navigator session" should work
3. Commit: git add CLAUDE.md && git commit -m "chore: update CLAUDE.md to Navigator v3.1"
4. Remove backup: rm CLAUDE.md.backup
Rollback if needed: mv CLAUDE.md.backup CLAUDE.md
If config exists, migrate to latest version with new sections:
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$(cat "${NAVIGATOR_CONFIG_HOME:-${XDG_CONFIG_HOME:-$HOME/.config}/navigator}/plugin-root" 2>/dev/null)}"
[ -d "$PLUGIN_DIR/skills" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
if [ -f ".agent/.nav-config.json" ]; then
python3 "$PLUGIN_DIR/skills/nav-sync-claude/functions/config_migrator.py" .agent/.nav-config.json
fi
What this does:
simplification configauto_update configtask_mode configExample output:
✅ Config migrated: v5.4.0 → v5.6.0
Changes:
+ auto_update: (new section added)
+ task_mode: (new section added)
~ version: 5.4.0 → 5.6.0
Dry run (preview changes without applying):
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$(cat "${NAVIGATOR_CONFIG_HOME:-${XDG_CONFIG_HOME:-$HOME/.config}/navigator}/plugin-root" 2>/dev/null)}"
[ -d "$PLUGIN_DIR/skills" ] || PLUGIN_DIR="$HOME/.claude/plugins/marketplaces/navigator-marketplace"
python3 "$PLUGIN_DIR/skills/nav-sync-claude/functions/config_migrator.py" .agent/.nav-config.json --dry-run
Purpose: Detect CLAUDE.md version (outdated, current, unknown)
Usage:
python3 version_detector.py CLAUDE.md
Output: Prints one of: outdated, current, unknown
Exit codes:
Detection logic:
Navigator Version: X.X.X/nav:start, /jitd:, etc."Start my Navigator session"Heuristics:
/nav: → outdatedPurpose: Extract customizations and generate updated CLAUDE.md
Usage:
# Extract customizations
python3 claude_updater.py extract CLAUDE.md > customizations.json
# Generate updated file
python3 claude_updater.py generate \
--customizations customizations.json \
--template ../../templates/CLAUDE.md \
--output CLAUDE.md
Extract mode outputs JSON:
{
"project_name": "MyApp",
"title": "MyApp - Claude Code Configuration",
"description": "Brief project description",
"tech_stack": ["Next.js", "TypeScript", "PostgreSQL"],
"core_principle": "API-first design with type safety",
"code_standards": ["**Architecture**: KISS, DRY, SOLID principles", "Custom rule 1"],
"forbidden_actions": ["No Claude Code mentions in commits/code", "Custom restriction 1"],
"violations_marker": false,
"pm_tool": "github",
"custom_sections": {
"Deployment": "Custom deployment instructions..."
},
"custom_section_anchors": {
"Deployment": "Forbidden Actions"
},
"has_context": true,
"preamble": "",
"sections": [
{"header": "Context", "body": "Brief project description\n\n**Tech Stack**: ..."},
{"header": "Navigator", "body": "**Navigator runtime**: ..."},
{"header": "Deployment", "body": "Custom deployment instructions..."},
{"header": "Forbidden Actions", "body": "- ❌ No Claude Code mentions in commits/code"}
],
"navigator_section": "Navigator",
"source_dir": "/path/to/project"
}
Generate mode with a sections layout (what extract records): the project's own
title, preamble and sections come back in their own order, bodies byte for byte, and
only Navigator-owned text changes. A round trip on an already-current file changes only
the two stamp lines.
- Claude Code Configuration stays)## Navigator takes the template's body; a section that carries the
**Navigator runtime** paragraph under another name (## Navigator Integration)
keeps its header and every other line and gets the template's paragraph in place## Context only as the two stamp lines when the file has no stamps anywhere
(no description or tech-stack placeholders), ## Navigator only when no section
carries the runtime paragraph, the standards and forbidden sections with the
template's defaults (## Code Standards counts as the standards section)**Last Updated** (today) and **Navigator Version** (installed plugin)
wherever the file keeps themGenerate mode without a sections layout (hand-written JSON): the template's
structure around the flat lists, as before.
[Project Name] with project_name[Brief project description] with description (line breaks kept)[List your technologies...] with tech_stack**Core Principle** placeholder with core_principle (multi-line)[Customize ...] placeholder
with code_standards (an empty list keeps the template's)forbidden_actions; the
[Add project-specific violations here] marker stays only when the project had itPurpose: Migrate .nav-config.json to latest version, adding missing sections
Usage:
# Migrate config (applies changes)
python3 config_migrator.py .agent/.nav-config.json
# Preview changes without applying
python3 config_migrator.py .agent/.nav-config.json --dry-run
# JSON output
python3 config_migrator.py .agent/.nav-config.json --json
Version-specific configs added:
simplification (code clarity improvements)auto_update (session-start update notice; v8: never updates from a hook)task_mode (unified workflow orchestration)Output example:
✅ Config migrated: v5.4.0 → v5.6.0
Changes:
+ auto_update: (new section added)
+ task_mode: (new section added)
~ version: 5.4.0 → 5.6.0
Exit codes:
No CLAUDE.md found:
❌ No CLAUDE.md found in current directory
This project doesn't appear to have Navigator initialized.
Run "Initialize Navigator in this project" first.
Backup failed:
❌ Failed to create backup: CLAUDE.md.backup
Check file permissions and disk space.
Parse error:
❌ Failed to parse CLAUDE.md
The file might be corrupted or have unusual formatting.
Manual review required.
Backup saved at: CLAUDE.md.backup
Template not found:
❌ Navigator template not found
This might be a plugin installation issue.
Try reinstalling Navigator plugin: /plugin update navigator
Migration is successful when:
If migration fails or user is unhappy:
# Restore backup
mv CLAUDE.md.backup CLAUDE.md
# Or compare and manually fix
diff CLAUDE.md.backup CLAUDE.md
This skill:
What gets updated:
What gets preserved:
User: "Update my CLAUDE.md to v3.1"
functions/claude_updater.py (opens in a new tab)functions/config_migrator.py (opens in a new tab)functions/test_claude_updater.py (opens in a new tab)functions/test_config_migrator.py (opens in a new tab)functions/test_template_shape.py (opens in a new tab)functions/version_detector.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub qf-studio/navigator --plugin navigator33 skills in this plugin
/backend-endpointCreate REST/GraphQL API endpoint with validation, error handling, and tests. Auto-invoke when user says "add endpoint", "create API", "new route", or "add route"./backend-testGenerate backend tests (unit, integration, mocks) for existing code. Auto-invoke when user says "write test for", "add test", "test this", or "create test"./database-migrationCreate database migration with schema changes and rollback. Auto-invoke when user says "create migration", "add table", "modify schema", or "change database".Other plugins' skills for the same job