r/ClaudeCode • • 5d ago

Built with Claude claude-config-sync: keep Claude Code settings, skills, agents, hooks and memory identical across Linux and Windows machines (PR-based, stdlib-only Python)

I use Claude Code on a laptop, a desktop and on a dedicated Claude VM. Their setups kept drifting apart: a skill or hook I changed on one never reached the others.

claude-config-sync fixes that. A private GitHub repo holds the one true copy. A small Python program copies changes between it and each machine.

Every change goes out as a pull request. Nothing is pushed straight to your default branch.

Repo: https://github.com/modem7/claude-config-sync (MIT) (this is also a git template repo that can be used to quickly config a private repo)

What it does

- Syncs `CLAUDE.md`, `settings.json`, agents, hooks, skills and memory

- Never syncs credentials

- Each machine gets its own `sync/<hostname>` branch and PR. You merge, and the other machines pick it up

- Hooks run a sync at the start and end of every session

- Per-machine overrides for `settings.json`, and profiles for agents, hooks and skills, so one box can differ without forking everything

- `doctor` finds a stuck sync, and `doctor remediate` fixes what is safe to fix

- Linux and Windows are supported and tested in CI. macOS is expected to work but is untested

- Python 3.12+, git 2.40+ and the `gh` CLI. No other dependencies

How I used Claude Code

- I'm upfront that it's vibe-assisted. I set the direction and review every change, and Claude Code writes much of the code, tests and docs

- Each big piece started with a design spec and an implementation plan. They're in `docs/superpowers/` if you want to see how I prompt it

- It began as bash. A few months in, I had Claude Code port it to Python with a spec first, then a phased plan

- Work is issue-driven: one issue, one branch, one PR

- I dogfood it. Claude Code's own config is synced by the tool

Lessons learned

- Know how Claude Code names its memory folder. It turns every character in the project path that isn't A-Z, a-z or 0-9 into `-`. My first version only replaced `/`, so on paths with spaces, dots or a drive letter it synced a folder Claude Code never writes

- Windows git drops the exec bit. Hooks captured on Windows arrived non-executable on Linux. The commit step now keeps or sets `+x`

- Keep per-machine values out of the shared file. A failed settings split could push one machine's overrides as shared. It now splits from the committed base and restores the clone if the split fails

- Back up before you overwrite. Apply copies any file it changes or deletes to a timestamped backup folder first

- Review everything. Hooks run automatically on every machine, so a hook change deserves the same review as a settings change

The public repo is a mirror of the tool, with my personal config removed. Feedback welcome, especially from anyone running this on Windows.

1 Upvotes

2 comments sorted by

•

u/AutoModerator 5d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Far_Reindeer8428 5d ago

config drift between machines is the quiet one, our rules diverged for a week and nobody noticed until a test behaved differently. i built oah partly for this, star it if useful https://github.com/KenSuh/open-agent-harness