claude-code-sync
Installation
SKILL.md
Claude Code Sync
Updates an existing setup without blowing away user customizations. Idempotent — safe to run weekly, monthly, or on a schedule.
What sync does
- Re-fingerprint: scan the repo for stack changes since last setup. New framework? New DB? New CI/CD tool?
- Delta propagation: push plugin rule updates (
cc-always.md,cc-patterns.md) into the repo's.claude/rules/. - Section-merge CLAUDE.md: update the "Build & Test", "Tech Stack", "Key Paths" sections if stack changed; leave custom sections alone.
- Fix drift (
--fix-driftflag): find config that drifted from plugin defaults — missing hooks, missing MCP servers, outdated skill versions — and repair. - Propagate to sub-repos: for monorepos, walk workspace children and apply changes to their
.claude/dirs. - Scaffold docs/context/ (if absent): create the 22-template knowledge base that complements
.claude/. - Auto-install LSPs: detect missing LSP servers from the stack and offer install commands.
- Persist sync state: write
.claude/sync-state.jsonwith timestamp, plugin version, delta summary.
Section-merge protocol for CLAUDE.md
CLAUDE.md sections are identified by ## headings. Sync protocol: