ワンクリックで
nav-sync-claude
// Sync project CLAUDE.md to the installed Navigator version, preserving customizations. Use when user says "sync CLAUDE.md", "update CLAUDE.md", or when detecting outdated Navigator configuration.
// Sync project CLAUDE.md to the installed Navigator version, preserving customizations. Use when user says "sync CLAUDE.md", "update CLAUDE.md", or when detecting outdated Navigator configuration.
Manage Navigator task documentation - create implementation plans, archive completed tasks, update task index. Use when user starts new feature, completes work, or says "document this feature".
Validate and release Navigator plugin to marketplace. Auto-invoke when user says "release plugin", "publish navigator", "create release", or "deploy new version".
Query project knowledge graph. Search across tasks, SOPs, memories, and concepts. Use when user asks "what do we know about X?", "show everything related to X", or "remember this pattern/pitfall/decision".
Initialize Navigator documentation structure in a project. Auto-invokes when user says "Initialize Navigator", "Set up Navigator", "Create Navigator structure", or "Bootstrap Navigator".
Load Navigator documentation navigator when starting development session, resuming work, or beginning new feature. Use when user mentions starting work, beginning session, resuming after break, or checking project status.
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.
| name | nav-sync-claude |
| description | Sync project CLAUDE.md to the installed Navigator version, preserving customizations. Use when user says "sync CLAUDE.md", "update CLAUDE.md", or when detecting outdated Navigator configuration. |
| allowed-tools | Read, Write, Edit, Bash |
| version | 1.0.0 |
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:
python3 "$SKILL_BASE_DIR/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:
python3 "$SKILL_BASE_DIR/functions/claude_updater.py" extract CLAUDE.md > /tmp/nav-customizations.json
This extracts:
Apply latest template with extracted customizations:
# Template fetching now automatic via get_template_path():
# 1. Tries GitHub (version-matched)
# 2. Falls back to bundled if offline
python3 "$SKILL_BASE_DIR/functions/claude_updater.py" generate \
--customizations /tmp/nav-customizations.json \
--template "$SKILL_BASE_DIR/../../templates/CLAUDE.md" \
--output CLAUDE.md
Template Source Priority:
https://raw.githubusercontent.com/alekspetrov/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:
if [ -f ".agent/.nav-config.json" ]; then
python3 "$SKILL_BASE_DIR/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):
python3 "$SKILL_BASE_DIR/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",
"description": "Brief project description",
"tech_stack": ["Next.js", "TypeScript", "PostgreSQL"],
"code_standards": ["Custom rule 1", "Custom rule 2"],
"forbidden_actions": ["Custom restriction 1"],
"pm_tool": "github",
"custom_sections": {
"Deployment": "Custom deployment instructions..."
}
}
Generate mode:
[Project Name] with project_name[Brief project description] with description[List your technologies...] with tech_stackPurpose: 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 (auto-update on session start)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"