본문으로 건너뛰기
cccskills
무료GitHub에 공개

claude-sessions-sync

Sync Claude Code session records between two Anthropic accounts in the Claude desktop app on macOS. Use when switching accounts (for example when one hits usage limits) and old sessions disappear from the picker, or to mirror records before/after a switch.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(3)

  • SKILL.md4.0 KB
  • README.md1.2 KB
  • README.ru.md1.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Claude sessions sync (between desktop-app accounts)

How it works (verified 2026-10-01…07, Claude Code 2.1.286, macOS):

  • Session records live in ~/Library/Application Support/Claude/claude-code-sessions/<accountUuid>/<orgUuid>/local_*.json. The second path level is the organization UUID; the app lists only the current account+org pair, which is why switching accounts hides the other side's sessions.
  • Transcripts live in ~/.claude/projects/ and are shared across all accounts — never touch them. A record points at its transcript through the cliSessionId field.
  • Active account: ~/Library/Application Support/Claude/config.json → lastKnownAccountUuid. The active org folder is the one holding the freshest record (mtime).
  • Account switches may leave empty race folders <old-account>/<new-org> — ignore them.

Procedure

  1. The app must be fully closed: pgrep -f "/Applications/Claude.app/Contents/MacOS" is empty; otherwise osascript -e 'quit app "Claude"' and wait. Copying while the app is alive can be rolled back by its in-memory list cache (LSS-cached-sessions) and record rewrites.
  2. Identify both working folders: under each account UUID take the subfolder with the most local_*.json records (or the freshest one).
  3. Run a bidirectional newest-wins sync of local_*.json — the script below. A one-way copy leaves drift: sessions you continued on one side go stale on the other.
  4. Merge archived-sessions.idx: union the archived lists of both folders, write the same file into both.
  5. Copy missing deleted_* markers in both directions, otherwise deleted sessions resurrect in the picker.
  6. Do NOT sync scheduled-tasks.json or backlog/ — each account+org pair keeps its own.
  7. Reopen the app, switch the login to the target account, verify the record count in the picker.

Script (edit FIRST/SECOND, app closed)

import os, json, shutil

SESS = os.path.expanduser("~/Library/Application Support/Claude/claude-code-sessions")
FIRST  = f"{SESS}/<account-uuid-1>/<org-uuid-1>"
SECOND = f"{SESS}/<account-uuid-2>/<org-uuid-2>"

def records(d):
    return {f: os.path.getmtime(os.path.join(d, f))
            for f in os.listdir(d) if f.startswith("local_") and f.endswith(".json")}

f_rec, s_rec = records(FIRST), records(SECOND)
for f, m in s_rec.items():
    if f not in f_rec or m > f_rec[f]:
        shutil.copy2(os.path.join(SECOND, f), os.path.join(FIRST, f))
for f, m in f_rec.items():
    if f not in s_rec or m > s_rec[f]:
        shutil.copy2(os.path.join(FIRST, f), os.path.join(SECOND, f))

arch = set()
for d in (FIRST, SECOND):
    p = os.path.join(d, "archived-sessions.idx")
    if os.path.exists(p):
        try: arch |= set(json.load(open(p)).get("archived", []))
        except Exception: pass
idx = {"v": 1, "archived": sorted(arch)}
for d in (FIRST, SECOND):
    json.dump(idx, open(os.path.join(d, "archived-sessions.idx"), "w"))

for a, b in ((FIRST, SECOND), (SECOND, FIRST)):
    for f in os.listdir(a):
        if f.startswith("deleted_") and not os.path.exists(os.path.join(b, f)):
            shutil.copy2(os.path.join(a, f), os.path.join(b, f))

Gotchas

  • Claude Code cleans old transcripts (about a month back by default): such records return to the picker but open empty. There is nothing to restore from.
  • Copies drift apart while you work on one account — rerun the sync on every switch.
  • Continuing a moved session sends its transcript to the current account (privacy note for personal-vs-work orgs).
  • There is no official cross-account migration (anthropics/claude-code#48511 closed as not planned); terminal claude --resume <id> sees all local sessions under any login.

Background write-up: https://sereja.tech/blog/claude-code-sessions-between-accounts/

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Orchestrate iterative visual style searches with branch prompts, decision graphs, feedback loops, and final direction selection.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

serejaris/personal-corp-os2322026년 10월 21일 업데이트

Audits the agent rules in the current folder (AGENTS.md, nested AGENTS.md files) and the skill descriptions the agent sees at start, then reports what to cut, move or rewrite and edits only after the user says yes. Use on «аудит правил», «проверь AGENTS.md», «почему агент не слушается правил», «проверь скиллы».

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

serejaris/personal-corp-os2322026년 10월 21일 업데이트

avatar

무료

Робот агента Personal Corp. Агент делает себе голову робота из набора деталей, хранит её в штабе в stack/avatars.json и кладёт в штаб страницу avatar/robot.html, где робот стоит за партой своего штаба и вокруг видны отделы, без сервера и интернета. На уроке по ссылке входа с экрана урока робот входит в живой класс и горит маячком, пока агент работает. Триггеры /avatar, /avatar <ссылка входа>, сделай себе аватар, покажи своего робота, приди на урок.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

serejaris/personal-corp-os2322026년 10월 21일 업데이트

benchmark

무료

Use when choosing between engines or models for an agent pipeline and the answer must come from measurement on your own data, not from marketing pages: speech recognition for meeting recordings, the model that turns a transcript into notes, the critic model that checks it. Runs every variant in an isolated container, measures time, cost per hour of input (USD and RUB, with price source and date) and quality (WER/CER and course terms for ASR; code checks plus a judge of a different model for LLM steps), writes results.json/csv and one static analytics page. Triggers on "бенчмарк", "сравни движки", "сколько стоит час записи", "какую модель взять для пайплайна", "benchmark the pipeline", "compare ASR engines".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

serejaris/personal-corp-os2322026년 10월 21일 업데이트

Use when user asks for Claude Code usage stats, weekly analytics, project activity summary, or wants to see what projects were worked on. Triggers on "аналитика", "статистика claude", "cc stats", "weekly report", "что делал"

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

serejaris/personal-corp-os2322026년 10월 21일 업데이트

Use when needing strategic project analysis from multiple independent expert perspectives. Triggers on business decisions, growth strategy, product direction, competitive analysis, or any situation where diverse C-level opinions reduce blind spots

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

serejaris/personal-corp-os2322026년 10월 21일 업데이트

serejaris의 스킬 모두 보기

이 스킬의 문제 신고