claude-sessions-sync

claude-sessions-sync is a skill for Claude Code from serejaris/personal-corp-os. It costs 56 tokens per session (1,034 once invoked), scanned A, original, MIT.

A macOS workflow for copying Claude Code session records between two Anthropic accounts in the Claude desktop app. It distinguishes the account-specific records that control the session list from shared transcript files that must not be changed.

In plain words
What is it for?
Use it to mirror or restore visible Claude Code session records before or after changing accounts on macOS.
Why use it?
Switching accounts can hide older sessions from the app’s picker, and copying while the app is running can be undone by its cache or rewrites. The workflow defines how to close the app, find the relevant folders, and avoid touching transcripts.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions Claude Code.

Part of the personal-corp-os plugin — 32 skills, 1 agent shipped together

Good fit Use it to mirror or restore visible Claude Code session records before or after changing accounts on macOS.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/serejaris/personal-corp-os/claude-sessions-sync
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add serejaris/personal-corp-os --skill claude-sessions-sync
Clone the repo
git clone --depth 1 https://github.com/serejaris/personal-corp-os

Made for: Claude Code.

Or install personal-corp-os, the plugin that ships this one along with the rest of its 32 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for claude-sessions-sync

README.md
[![agentmods](https://agentmods.dev/badge/skills/serejaris/personal-corp-os/claude-sessions-sync/github.svg)](https://agentmods.dev/skills/serejaris/personal-corp-os/claude-sessions-sync)
Your own site
<a href="https://agentmods.dev/skills/serejaris/personal-corp-os/claude-sessions-sync"><img src="https://agentmods.dev/badge/skills/serejaris/personal-corp-os/claude-sessions-sync/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for claude-sessions-sync

Your own site · 80×15
<a href="https://agentmods.dev/skills/serejaris/personal-corp-os/claude-sessions-sync"><img src="https://agentmods.dev/badge/skills/serejaris/personal-corp-os/claude-sessions-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,034 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00056 $0.01034
Opus 5.5 $0.00022 $0.00414
Sonnet 5.5 $0.00011 $0.00207
Haiku 4.5 $0.00006 $0.00103

Measured 10d ago against content hash 5434631b90d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

claude-sessions-sync scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/claude-sessions-sync/SKILL.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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))

Read the full file on GitHub · 70 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 70 lines · 56 tokens per session scan A 5434631b90d4

Subscribe to this mod's changes

claude-sessions-sync is a skill published in the GitHub repository serejaris/personal-corp-os (239 stars, last pushed today), licensed MIT. It adds 56 tokens to every session and 1,034 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-16.

Related

Other skills, from other repositories

usage-audit

Audit a Claude Code setup for token waste and context bloat. Checks MCP servers, CLAUDE.md, skills, and settings against bloat filters. Triggers on: "audit my context", "usage audit", "token audit", "context bloat". NOT for codebase audits.

Mathews-Tom/armory · 63 tokens

janitor-discover

Find new skills on GitHub or check a specific skill before installing. Use when the user wants to search for skills, evaluate a skill URL, check overlap and security risk before installing, or compare a local skill against alternatives. Trigger with '/janitor-discover'.

khendzel/skills-janitor · 58 tokens

janitor-value

Show whether each skill is earning its context-window cost — combined tokens-used view sorted by waste. Use when the user asks 'are my skills worth it', 'what's my context budget', 'which skills are dead weight', or wants to audit skill value, token cost, or usage. Trigger with '/janitor-value'.

khendzel/skills-janitor · 69 tokens

claude-tracker-suite

Manage Claude Code sessions — search by topic or ID, browse recent sessions with full metadata (tags, summaries, titles, cost), view title/nickname history timelines, resume in Ghostty tabs, spawn interactive or headless sessions, monitor live sessions, and bootstrap new setups. Triggers on resume session, find…

tdimino/claude-code-minoan · 100 tokens

janitor-fix

Automatically fix skill problems (safe preview first). Also use with --prune to find and remove broken symlinks, empty directories, and orphaned skills. Trigger with '/janitor-fix'.

khendzel/skills-janitor · 45 tokens

photo-to-slack-emoji

Convert photos into Slack-optimized custom emojis using Nano Banana Pro (Gemini 3 Pro Image) with automatic subject identification, style transformation, and image editing. 64KB/128px compliant. Triggers on: slack emoji, photo to emoji, convert to emoji, edit emoji, emoji maker.

tdimino/claude-code-minoan · 68 tokens