claudegoodies
Skill

cloud-sync

From thedotmack

Set up or check claude-mem cloud sync with cmem.ai Pro. Use when the user says "set up cloud sync", "sync my memories", "cmem pro", "cloud backup", "sync status", or wants their memory database backed up or synced to their cmem.ai account.

Configures worker-native cloud sync of the claude-mem memory database to cmem.ai Pro.

Use it when

  • First-time setup of cmem.ai Pro cloud sync
  • Checking pending sync counts or last sync error
  • Migrating from an old standalone cloud-sync client to the worker
  • Confirming a restarted worker picked up sync credentials

Skip it if

  • You don't have a cmem.ai Pro account or sync token
  • Not using claude-mem's local worker/memory database
  • You already run the legacy standalone cloud-sync client and don't want migration

Facts

Status
Actively maintained
Last commit
Declared tools

Source preview

The instructions Claude Code reads when this skill runs.

# Cloud Sync (cmem.ai Pro)

The worker syncs memories itself: every write nudges a background flusher that
drains unsynced rows to cmem.ai. There is no daemon to install or babysit. This
skill is a thin front-end — check status, and on first run collect credentials,
retire the old standalone client, and restart the worker so it picks them up.

**Security rule for this entire skill:** NEVER print the sync token, never put
it in a command-line argument (argv is visible to other processes), and never
log it. It travels only inside heredoc-fed stdin scripts or files that already
hold it. When confirming, report its length — not its value.

## 1. Check status

Resolve the worker port (env → `~/.claude-mem/settings.json` → per-UID default
`37700 + (uid % 100)`, matching how the worker picks its own port; re-run this
in any fresh shell before the curls in step 5):

```bash
PORT="${CLAUDE_MEM_WORKER_PORT:-$(node -e "const fs=require('fs'),p=require('path'),os=require('os');const uid=(typeof process.getuid==='function'?process.getuid():77);const fallback=String(37700+(uid%100));try{const s=JSON.parse(fs.readFileSync(p.join(os.homedir(),'.claude-mem','settings.json'),'utf-8'));process.stdout.write(String(s.CLAUDE_MEM_WORKER_PORT||fallback));}catch{process.stdout.write(fallback);}" 2>/dev/null)}"
curl -s "http://127.0.0.1:${PORT}/api/sync/status"
```

Responses:

- `{"configured": true, "
View full source on GitHub →

Other skills