/claude-code-expert:cc-stack-syncfrom claude-code-expert
Idempotent sync of Claude Code setup: re-fingerprint repo, propagate to sub-repos, section-merge CLAUDE.md, fix drift, auto-install LSPs. Keeps .claude/ configuration up to date.
Ships in claude-code-expert. 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.
None: SKILL.md is the whole skill.
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.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub thelobbi/claude --plugin claude-code-expert21 skills in this plugin
/cc-agentic-patternsSelect and wire an agentic design pattern (reflection, prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer, ReAct, blackboard) into the 5-layer Claude Code stack. Use this skill whenever deciding how to structure a multi-step task, whether to spawn subagents, how to run parallel review, or when to use which pattern. Triggers on: "which pattern", "orchestrate", "parallel review", "self-review", "chain of thought", "eval-optimizer loop", "blackboard", "ReAct", "how to decompose this task"./cc-agent-teamsSelect and coordinate multi-agent teams (topology kits, role-based squads, lifecycle, worktree isolation). Use this skill whenever launching parallel agents, designing a review board, running a debug council, scheduling an orchestrator-workers team, configuring agent tool restrictions, or deciding between solo and team execution. Triggers on: "launch a team", "parallel agents", "review board", "debug council", "architect-implementer-reviewer", "swarm", "multi-agent", "subagents for X", "team topology", "agent lifecycle"./cc-auto-modeAuto mode permission handling — classifier-based approvals, PermissionDenied hook, defer permissionDecision, and autonomy profiles for hands-off Claude Code usageOther plugins' skills for the same job