Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/thedotmack-cloud-sync/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 136% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -2% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 16% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 18% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 11% | 0% |
The installed worker syncs through SyncHub. There is one client, one durable operation log, and no separate sync daemon. This skill checks status or writes the three connection values issued by cmem.ai → Connect.
Security rule: never print the sync token, put it in argv, or log it. Confirm only its length. Preserve every unrelated setting and keep ~/.claude-mem/settings.json mode 0600.
Resolve the worker port and query the always-registered status route:
bashPORT="${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"
configured: true and hub.reachable: true → the worker completed anauthenticated GET /v1/sync/status against SyncHub. Report deviceId, pending counts, lastFlushAt, lastError, and the Hub head/checkpoint; stop unless the user asked to replace the connection.
configured: true and hub.reachable: false → report hub.error and saythe SyncHub connection is not verified. A zero pending count or lastError: null is not success because an empty queue performs no push.
configured: false → continue.three seconds for about 30 seconds before diagnosing the worker.
Ask for all three values shown by cmem.ai → Connect:
The Hub URL must be an absolute https:// URL. Do not substitute the cmem.ai application API URL; the installed client talks only to SyncHub.
Substitute the collected values inside this quoted stdin script. Do not echo them before or after running it:
bashnode - <<'EOF' const fs = require('fs'), os = require('os'), path = require('path'); const token = 'PASTE_TOKEN_HERE'; const userId = 'PASTE_USER_ID_HERE'; const hubUrl = 'PASTE_HUB_URL_HERE'; if (!token || !userId || !/^https:\/\/[^\s]+$/.test(hubUrl)) { console.error('token, user id, and an https SyncHub URL are required'); process.exit(1); } const dir = path.join(os.homedir(), '.claude-mem'); const file = path.join(dir, 'settings.json'); fs.mkdirSync(dir, { recursive: true }); const settings = fs.existsSync(file) ? JSON.parse(fs.readFileSync(file, 'utf8')) : {}; const target = settings.env && typeof settings.env === 'object' ? settings.env : settings; target.CLAUDE_MEM_CLOUD_SYNC_TOKEN = token; target.CLAUDE_MEM_CLOUD_SYNC_USER_ID = userId; target.CLAUDE_MEM_CLOUD_SYNC_HUB_URL = hubUrl.replace(/\/+$/, ''); fs.writeFileSync(file, JSON.stringify(settings, null, 2) + '\n', { mode: 0o600 }); fs.chmodSync(file, 0o600); console.log(`saved cloud connection: token length ${token.length}, user id length ${userId.length}`); EOF
These are the only required connection keys. The worker mints and persists a device id on first start and defaults the device name to the hostname.
bashcurl -s -X POST "http://127.0.0.1:${PORT}/api/admin/restart"
Poll the status route every five seconds for up to 30 seconds while the successor starts. Success means configured: true, hub.reachable: true, and lastError: null. The local route always makes an authenticated, read-only SyncHub status probe, even when every pending count is zero; it never uses a legacy cmem.ai Pro status route and never appends or advances sync state. Pending counts describe only writes made after the SyncHub launch baseline; setup does not migrate a pre-launch local corpus.
If hub.reachable is false, report hub.error. If lastError is non-null, report it too. Ask the user to verify the three values in cmem.ai → Connect. Never include the token.
Report device id, pending counts, last successful flush, Hub reachability and checkpoint, and any Hub/flush error. End with this privacy note:
> Cloud sync uploads your observation narratives and full prompt text to your > cmem.ai account.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | fail→pass | 10,910 | 2,296 | -79% | 1 | 1 | 0% | 666 | 1,573 | +136% | 0 | 0 | — |
case-01 | fail→fail | 7,879 | 5,980 | -24% | 1 | 1 | 0% | 1,440 | 2,304 | +60% | 0 | 0 | — |
case-02 | fail→fail | 4,493 | 10,139 | +126% | 1 | 1 | 0% | 951 | 2,442 | +157% | 0 | 0 | — |
case-03 | fail→fail | 15,957 | 6,458 | -60% | 1 | 1 | 0% | 2,872 | 1,780 | -38% | 0 | 0 | — |
case-04 | pass→pass | 6,531 | 3,488 | -47% | 1 | 1 | 0% | 1,276 | 1,998 | +57% | 0 | 0 | — |
case-05 | fail→pass | 8,950 | 1,982 | -78% | 1 | 1 | 0% | 1,658 | 1,631 | -2% | 0 | 0 | — |
case-07 | fail→pass | 7,102 | 5,076 | -29% | 1 | 1 | 0% | 1,611 | 1,871 | +16% | 0 | 0 | — |
case-08 | pass→pass | 8,211 | 2,839 | -65% | 1 | 1 | 0% | 1,482 | 1,730 | +17% | 0 | 0 | — |
case-09 | pass→pass | 3,794 | 2,250 | -41% | 1 | 1 | 0% | 776 | 1,678 | +116% | 0 | 0 | — |
case-10 | fail→pass | 8,537 | 6,210 | -27% | 1 | 1 | 0% | 1,490 | 1,757 | +18% | 0 | 0 | — |
case-11 | fail→pass | 7,650 | 1,262 | -84% | 1 | 1 | 0% | 1,327 | 1,469 | +11% | 0 | 0 | — |
case-12 | fail→pass | 18,434 | 2,277 | -88% | 1 | 1 | 0% | 1,723 | 1,715 | -0% | 0 | 0 | — |
case-13 | fail→pass | 7,572 | 1,756 | -77% | 1 | 1 | 0% | 1,478 | 1,593 | +8% | 0 | 0 | — |
case-14 | pass→pass | 7,917 | 5,333 | -33% | 1 | 1 | 0% | 1,624 | 2,363 | +46% | 0 | 0 | — |
case-15 | fail→pass | 4,293 | 1,899 | -56% | 1 | 1 | 0% | 784 | 1,611 | +105% | 0 | 0 | — |
case-21 | pass→pass | 9,820 | 4,509 | -54% | 1 | 1 | 0% | 2,225 | 2,147 | -4% | 0 | 0 | — |
case-16 | fail→pass | 7,298 | 1,059 | -85% | 1 | 1 | 0% | 1,298 | 1,424 | +10% | 0 | 0 | — |
case-17 | fail→fail | 9,625 | 2,478 | -74% | 1 | 1 | 0% | 1,745 | 1,723 | -1% | 0 | 0 | — |
case-18 | pass→pass | 8,882 | 1,856 | -79% | 1 | 1 | 0% | 1,572 | 1,599 | +2% | 0 | 0 | — |
case-19 | fail→pass | 8,697 | 2,429 | -72% | 1 | 1 | 0% | 1,798 | 1,849 | +3% | 0 | 0 | — |
case-20 | pass→fail | 13,229 | 15,362 | +16% | 1 | 1 | 0% | 2,666 | 3,824 | +43% | 0 | 0 | — |
case-22 | pass→fail | 10,838 | 8,240 | -24% | 1 | 1 | 0% | 2,337 | 1,736 | -26% | 0 | 0 | — |
case-23 | pass→pass | 7,680 | 3,588 | -53% | 1 | 1 | 0% | 1,389 | 1,721 | +24% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 19 counted toward the lift figure. The other 4 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +35 percentage points is the difference between those two pass rates over the 19 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.