nav-sync-claude
Skill355 starsChanged 13 months agoMITView on GitHub
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.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- alekspetrov/navigatorword for word, first seen Oct 31, 2025
Other versions1 project uses a version of this.
Word for word · 1
- alekspetrov/navigator★ 355100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- backend-endpointSkill
- backend-testSkill
- database-migrationSkill
- frontend-componentSkill
- frontend-testSkill
- nav-briefSkill
- nav-compactSkill
- nav-deep-researchSkill
- nav-diagnoseSkill
- nav-featuresSkill
- nav-graphSkill
- nav-initSkill
- nav-loopSkill
- nav-markerSkill
- nav-onboardSkill
- nav-pilotSkill
- nav-profileSkill
- nav-releaseSkill
- nav-simplifySkill
- nav-skill-creatorSkill
- nav-sopSkill
- nav-startSkill
- nav-statsSkill
- nav-taskSkill
- nav-trizSkill
- nav-upgradeSkill
- nav-workflowSkill
- plugin-slash-commandSkill
- product-designSkill
- visual-regressionSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 9 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Update project's CLAUDE.md to latest Navigator version (v3.1) while preserving project-specific customizations.
- Distinctive: line 20
DO NOT invoke: if:
- Distinctive: line 29
Check if CLAUDE.md exists and detect version:
- Very specific: line 40
Use version_detector.py to analyze CLAUDE.md:
- Distinctive: line 75
If user declines, exit. If accepts, continue.
- Distinctive: line 79
Always create backup before modifying:
- Very specific: line 88
Use claude_updater.py to parse current CLAUDE.md:
- Very specific: line 101
sections: every ## section in order, {"header", "body"}, bodies byte for byte (### subsections, fences and --- rules included)
- Distinctive: line 142
Always up-to-date with release
- Distinctive: line 204
If config exists, migrate to latest version with new sections:
- Very specific: line 258
Check for version marker: Navigator Version: X.X.X
- Very specific: line 259
Check for slash commands: /nav:start, /jitd:, etc.
- Very specific: line 260
Check for natural language examples: "Start my Navigator session"
- Distinctive: line 261
Check for skills section
- Very specific: line 267
No version + no Navigator markers → unknown
- Distinctive: line 430
If migration fails or user is unhappy:
- Distinctive: line 466
nav-start: Start session (uses updated CLAUDE.md)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Navigator CLAUDE.md Updater Skill
Update project's CLAUDE.md to latest Navigator version (v3.1) while preserving project-specific customizations.
When to Invoke
Invoke this skill when the user:
- Says "update my CLAUDE.md", "migrate CLAUDE.md to v3"
- Says "update Navigator configuration", "fix my CLAUDE.md"
- Mentions outdated commands like "/nav:start" and wants to upgrade
- Complains that Claude doesn't understand Navigator workflow
DO NOT invoke if:
- CLAUDE.md already references v3.1 and natural language commands
- User is editing CLAUDE.md for project-specific reasons (not Navigator updates)
- Working on plugin's root CLAUDE.md (not user projects)
Execution Steps
Step 1: Detect Current CLAUDE.md Version
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
fiUse 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.mdThis script checks for:
- Version markers (e.g., "Navigator Version: 3.1.0")
- Slash command references (
/nav:start,/nav:doc, etc.) - Skills vs commands language
- Natural language examples
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.
Step 2: Backup Current CLAUDE.md
Always create backup before modifying:
cp CLAUDE.md CLAUDE.md.backup
echo "📦 Backup created: CLAUDE.md.backup"Step 3: Extract Project-Specific Customizations
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.jsonThis records the file's layout verbatim, with fenced code blocks kept whole (a
# comment inside a bash block is not a header):
- title: the first
#header as written; project_name is the part before- Claude Code Configurationwhen the title has that shape, else the whole title - preamble: the text between the title and the first
##header - sections: every
##section in order,{"header", "body"}, bodies byte for byte (###subsections, fences and---rules included) - navigator_section: the section Navigator owns —
## Navigatorwhen present, else the section whose body carries the**Navigator runtime**paragraph; empty when none - has_context: whether a
## Contextsection exists - source_dir: the directory CLAUDE.md was read from (the project root for the liveness guard)
The 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).
Step 4: Generate Updated CLAUDE.md
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.mdGenerate 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:
- GitHub (version-matched): Fetches from
https://raw.githubusercontent.com/qf-studio/navigator/v{version}/templates/CLAUDE.md- Matches installed plugin version (e.g., v4.3.0)
- Always up-to-date with release
- Works with pre-releases
- Bundled (fallback): Uses
templates/CLAUDE.mdfrom installed plugin- Offline fallback
- Guaranteed availability
What this does:
- Loads template (GitHub or bundled)
- Replaces placeholders with extracted data
- Preserves custom sections
- Updates Navigator workflow to natural language
- Removes slash command references
- Adds skills explanation
Step 5: Show Diff and Confirm
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 "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"Step 6: Verify and Commit
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.mdStep 7: Update .nav-config.json
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
fiWhat this does:
- Detects current config version
- Adds missing sections based on version:
- v5.4.0+:
simplificationconfig - v5.5.0+:
auto_updateconfig - v5.6.0+:
task_modeconfig
- v5.4.0+:
- Updates version marker to current
Example 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.0Dry 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-runPredefined Functions
functions/version_detector.py
Purpose: Detect CLAUDE.md version (outdated, current, unknown)
Usage:
python3 version_detector.py CLAUDE.mdOutput: Prints one of: outdated, current, unknown
Exit codes:
- 0: Success (version detected)
- 1: File not found
- 2: Parse error
Detection logic:
- Check for version marker:
Navigator Version: X.X.X - Check for slash commands:
/nav:start,/jitd:, etc. - Check for natural language examples:
"Start my Navigator session" - Check for skills section
Heuristics:
- Has
/nav:→ outdated - Version < 3.0 → outdated
- Version >= 3.0 + natural language → current
- No version + no Navigator markers → unknown
functions/claude_updater.py
Purpose: 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.mdExtract 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.
- Loads template
- Writes the title as recorded (a title without
- Claude Code Configurationstays) - Writes the preamble and every section in source order
## Navigatortakes 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- Adds a template section the project lacks after the template section that precedes
it:
## Contextonly as the two stamp lines when the file has no stamps anywhere (no description or tech-stack placeholders),## Navigatoronly when no section carries the runtime paragraph, the standards and forbidden sections with the template's defaults (## Code Standardscounts as the standards section) - Stamps
**Last Updated**(today) and**Navigator Version**(installed plugin) wherever the file keeps them
Generate mode without a sections layout (hand-written JSON): the template's
structure around the flat lists, as before.
- Replaces
[Project Name]withproject_name - Replaces
[Brief project description]withdescription(line breaks kept) - Replaces
[List your technologies...]withtech_stack - Replaces the
**Core Principle**placeholder withcore_principle(multi-line) - Replaces the template's code-standards list and its
[Customize ...]placeholder withcode_standards(an empty list keeps the template's) - Replaces the template's forbidden-actions list with
forbidden_actions; the[Add project-specific violations here]marker stays only when the project had it - Inserts each custom section before its anchor section (end of file without one)
- Stamps the two lines as above
functions/config_migrator.py
Purpose: 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 --jsonVersion-specific configs added:
- v5.4.0:
simplification(code clarity improvements) - v5.5.0:
auto_update(session-start update notice; v8: never updates from a hook) - v5.6.0:
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.0Exit codes:
- 0: Success (config migrated or already current)
- 1: Error (file not found, invalid JSON)
Error Handling
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.backupTemplate not found:
❌ Navigator template not found
This might be a plugin installation issue.
Try reinstalling Navigator plugin: /plugin update navigatorSuccess Criteria
Migration is successful when:
- CLAUDE.md backed up successfully
- Version detected correctly
- Customizations extracted
- New file generated with v3.1 template
- Project-specific content preserved
- Diff shown to user for review
- Commit instructions provided
Rollback Procedure
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.mdNotes
This skill:
- Preserves all customizations (tech stack, standards, restrictions)
- Non-destructive (always creates backup)
- Idempotent (running multiple times is safe)
- Transparent (shows diff before finalizing)
What gets updated:
- Navigator version marker
- Slash commands → natural language
- Workflow examples
- Skills vs commands explanation
- Token optimization strategy
What gets preserved:
- Project name and description
- Tech stack
- Code standards
- Forbidden actions
- PM tool configuration
- Custom sections
Related Skills
- nav-init: Initialize Navigator in new project (creates CLAUDE.md from scratch)
- nav-start: Start session (uses updated CLAUDE.md)
- nav-task: Task documentation (benefits from updated workflow)
Examples
Example 1: Simple Update
User: "Update my CLAUDE.md to v3.1"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

