No native way to sync Claude Code config and skills across machines
Problem
There is no built-in way to keep Claude Code configuration, hooks, and skills synchronized across multiple machines. Users who work on more than one computer must build their own sync architecture, which creates friction and secondary issues.
Background — what I built to work around this
I use Claude Code on two machines and need 30+ custom skills, hooks, rules, and settings to stay identical between them. Since no sync feature exists, I built a portable setup:
- All configuration lives in a
~/.brain/directory versioned as a Git repo - Skills are organized as plugins in a
skills-library/repo (workflow, content, design, database, deploy, meta, tasks) - A
setup.shscript registers each plugin and symlinks skills into~/.claude/skills/ - Pushing to GitHub on one machine and pulling on the other keeps everything synchronized
This works, but introduces a stale content problem: when I edit a skill on machine A and pull on machine B, Claude Code still uses the cached version from the <command-name> tag instead of reloading from disk. The Skill tool's hardcoded description says "the skill has ALREADY been loaded", so the model never calls Skill to get fresh content.
What I tried to fix the stale content issue
| Approach | Mechanism | Result |
|----------|-----------|--------|
| CLAUDE.md rule | "Always call Skill before other tools" | Model ignores — tool description wins |
| additionalContext via UserPromptSubmit | Strong override instruction | Model ignores |
| additionalContext via PreToolUse (allow) | Soft reminder after allowing | Model ignores |
| Full SKILL.md content read from disk and injected via additionalContext | Fresh content + advisory | Model ignores, uses <command-name> |
| permissionDecision: "deny" | Block non-Skill tools | Works — but shows red error |
I ended up building a two-hook system (UserPromptSubmit + PreToolUse) that forces the model to call Skill before any other tool. It works, but permissionDecision: "deny" always renders as a red error on the first /command per session — because there's no silent deny option.
Proposal 1: Native config/skill sync across machines (preferred)
A built-in sync mechanism — similar to VS Code Settings Sync — that keeps Claude Code configuration consistent across machines:
- What to sync:
settings.json, hooks, skills (SKILL.md files), CLAUDE.md rules,.claude/rules/ - How: Git-backed (GitHub repo), cloud-backed, or even a simple import/export mechanism
- Conflict resolution: Last-write-wins, merge, or manual resolution
This would eliminate the need for custom symlink architectures and the stale content problem entirely. Users wouldn't need workarounds to keep their setup portable.
Proposal 2: Silent deny for PreToolUse hooks (fallback)
If native sync is not on the roadmap, a silent deny option for PreToolUse hooks would at least make custom enforcement flows viable without alarming users:
- A new field like
"silent": truein the hook output JSON - A new
permissionDecisionvalue like"redirect"— denies but shows as informational (gray/yellow) instead of error (red) - A
"displayMode": "silent" | "info" | "error"field to control rendering
Proposal 3: Fix the stale skill content directly
An alternative that addresses the symptom without requiring full sync:
"alwaysReloadSkills": truesetting — makes the model callSkilleven when<command-name>content is present- Soften the Skill tool instruction — change "the skill has ALREADY been loaded" to allow CLAUDE.md overrides
- Detect file changes — if the skill file's mtime changed since
<command-name>was generated, automatically reload
Environment
- Claude Code version: latest (as of 2026-03-20)
- OS: macOS
- Model: Opus 4.6 (1M context)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗