plugins/claude-code-expert/skills/claude-code-sync/SKILL.md
Idempotent update of an existing Claude Code setup — re-fingerprint the repo, propagate updates to sub-repos, refresh docs/context, section-merge CLAUDE.md/README.md, fix configuration drift. Use this skill whenever the user runs /cc-sync, asks to "update the claude setup", "propagate to sub-repos", "fix drift", "resync", or reports that the .claude/ directory has gone stale.
npx skillsauth add markus41/claude claude-code-syncInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Updates an existing setup without blowing away user customizations. Idempotent — safe to run weekly, monthly, or on a schedule.
cc-always.md, cc-patterns.md) into the repo's .claude/rules/.--fix-drift flag): find config that drifted from plugin defaults — missing hooks, missing MCP servers, outdated skill versions — and repair..claude/ dirs..claude/..claude/sync-state.json with timestamp, plugin version, delta summary.CLAUDE.md sections are identified by ## headings. Sync protocol:
| Section | Action |
|---|---|
| ## Build & Test | Replace (regenerated from fingerprint) |
| ## Tech Stack | Replace |
| ## Key Paths | Replace |
| ## Architecture | Preserve (user-curated) |
| ## Conventions | Merge (preserve user additions, update detected items) |
| ## Don't Touch | Merge (preserve user additions) |
| ## Knowledge Library (Obsidian) | Replace if managed-by-plugin marker present |
| Any other section | Preserve as-is |
Managed sections carry a <!-- plugin:cc-setup managed --> marker. Unmarked sections are never touched.
--fix-drift)Compares current state to plugin baseline:
| Check | Fix |
|---|---|
| Missing .claude/rules/cc-always.md | Copy from plugin |
| Missing .claude/rules/cc-obsidian-intro.md | Copy from plugin |
| cc-patterns.md older than plugin's | Offer update (user confirms) |
| Hook script path doesn't match registered hook | Reconcile or remove dead registration |
| Settings allowlist has entries for removed tools | Prune |
| MCP server in .mcp.json has no backing install | Warn |
| Skills in .claude/skills/ belong to old plugin version | Offer replacement |
Never deletes user-added config. All destructive fixes require explicit confirmation.
For monorepos (turbo/nx/lerna/pnpm-workspaces), sync walks workspace packages and:
.claude/ → sync it (same protocol as root)..claude/ → create a minimal one that references the root's CLAUDE.md.If docs/context/ does not exist, create from 22 templates:
docs/context/README.mddocs/context/architecture/overview.mddocs/context/architecture/modules.mddocs/context/conventions/code-style.mddocs/context/conventions/git-workflow.mddocs/context/conventions/testing.mddocs/context/decisions/0001-use-claude-code.mddocs/context/runbooks/deploy.mddocs/context/runbooks/rollback.mddocs/context/glossary.mdcc_kb_docs_context_templates).claude/sync-state.json:
{
"version": "1.0",
"last_synced": "2026-04-16T14:00:00Z",
"plugin_version": "8.0.0",
"stack_fingerprint": "node-ts-nextjs-postgres-prisma-jest-vercel",
"sub_repos_synced": 0,
"drift_fixed": ["added missing cc-obsidian-intro.md", "pruned 2 dead hook registrations"],
"next_check_due": "2026-05-16"
}
| Need | Tool |
|---|---|
| Hook pack recommendations after stack change | cc_docs_hook_pack_recommend(signals) |
| LSP config for newly detected language | cc_kb_lsp_config(language) |
| Topology for new work patterns | cc_docs_team_topology_recommend(...) |
.claude/sync-state.json → can't tell what changed since last sync.--fix-drift without user confirmation → destroys custom config that looks like drift.tools
Build Teams-native agents with the Teams SDK (formerly Teams AI Library v2) — App class, activity routing, adaptive cards, streaming, AI-generated labels, feedback, message extensions, Teams-as-MCP-server, and the bring-your-own-AI pattern with Agent Framework.
tools
Run agents on Microsoft Foundry (formerly Azure AI Foundry) Agent Service — prompt agents vs hosted agents, threads/runs and the Responses API, built-in tools (Bing grounding, code interpreter, file search, MCP, OpenAPI, A2A), connected agents, Entra agent identity, SDKs, and observability/evaluations.
tools
Build and host custom engine agents with the Microsoft 365 Agents SDK — AgentApplication, the Activity protocol, channel reach via Azure Bot Service, hosting Agent Framework or Semantic Kernel engines, and the Agents Toolkit/Playground workflow. Successor to the Bot Framework SDK.
tools
Design, govern, and extend Microsoft Copilot Studio agents — topics, generative orchestration, knowledge, tools and MCP, agent flows, autonomous triggers, publishing channels, Copilot Credits pricing, and solution-based ALM on Power Platform.