← ClaudeAtlas

claude-account-synclisted

Mirror a workspace AND all Claude Code conversation history (--resume sessions), path references, and resume ordering from one user account to another on the same SSH host, so `claude --resume` on the destination picks up exactly where the source left off. Use this whenever you switch between two accounts on a shared host — because one ran out of quota/credits, or when the user says "sync my account", "switch accounts", "move my conversation history over", or "my resume history is missing after switching". Direction is a parameter (--from / --to), so reach for it in EITHER direction; it also restores a workspace onto a fresh account.
MLliu6/lMl_skills · ★ 0 · AI & Automation · score 70
Install: claude install-skill MLliu6/lMl_skills
# claude-account-sync **English** | [中文](#中文) Move a workspace between two user accounts **on the same SSH host** with the Claude Code conversation history intact, so `claude --resume` on the destination account resumes exactly where the source account left off. Direction is just a pair of flags (`--from` / `--to`), so the same flow runs either way. ## Mental model — get this right first | Role | Flag | What happens to it | |---|---|---| | **SOURCE** (source of truth) | `--from <src-user>` | Read-only. Pulled over SSH. **Never modified.** | | **DESTINATION** | `--to <dst-user>` | Overwritten to match the source. **Backed up first.** | - **Run the sync while logged in as the DESTINATION account** — the one you are switching *to*. It writes into the destination's workspace and the destination's `~/.claude`; the source is pulled read-only over SSH. The orchestrator enforces `whoami == --to` and refuses to run otherwise, so you can never accidentally write into the source. - **Dry-run is the default.** Every script previews and mutates nothing until you add `--apply`. ## The two things that must both move The second one is the one everyone forgets, and it is why "I synced the folder but my history is gone" happens: 1. the **workspace files** at `ws_root(<user>)`, and 2. the **conversation history** — the `--resume` transcript store — which lives in the account's HOME (`~/.claude/projects/<encoded-workspace>/`), **not** in the workspace. Copying only the wo