skills/o9k-sync-setup/SKILL.md
Set up o9k-sync for cross-device memory sync. Use on 'sync einrichten', 'setup sync', or when /o9k-config detects o9k-sync is missing. Covers first-device setup, additional-device restore, and MCP auto-sync.
npx skillsauth add Bumblebiber/hmem o9k-sync-setupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Zero-knowledge encrypted sync for hmem. Memories are encrypted client-side (AES-256-GCM) before leaving the device — the server only sees opaque blobs.
o9k-sync connectThe connect command replaces setup and restore with a single smart wizard:
npx o9k-sync connect
It automatically:
Custom / Self-hosted servers: The --server-url flag accepts any o9k-sync compatible
server, not just the default. Examples: https://yourdomain.com/o9k-sync for a self-hosted
instance, or http://localhost:3100 for a local development server.
For non-interactive use:
# New account
npx o9k-sync connect --user-id myname --passphrase "pass" --o9k-path ~/.hmem/memory.hmem
# Existing account
npx o9k-sync connect --user-id myname --passphrase "pass" --token abc123... --o9k-path ~/.hmem/memory.hmem
# Custom server
npx o9k-sync connect --server-url http://localhost:3100 --user-id myname --passphrase "pass" --o9k-path ~/.hmem/memory.hmem
The legacy setup and restore commands still work for backwards compatibility.
If not using connect, pick manually:
A) First device — no sync account exists yet → o9k-sync setup
B) Additional device — account exists on another machine → o9k-sync restore
npm install -g o9k-sync
npx o9k-sync setup
This will:
https://sync.hmem.dev)Important: Remember the passphrase — it's the encryption key. Losing it means losing access to synced data. There is no recovery.
Add HMEM_SYNC_PASSPHRASE to your .mcp.json env block:
{
"mcpServers": {
"hmem": {
"env": {
"HMEM_PATH": "/path/to/your/memory.hmem",
"HMEM_SYNC_PASSPHRASE": "your-passphrase-here"
}
}
}
}
Without this, hmem works normally but won't auto-sync. With it, every read_memory pulls
and every write_memory pushes automatically (with 30s cooldown).
npx o9k-sync push
The user needs these values on their other devices:
.o9k-sync-config.json.o9k-sync-config.json.o9k-sync-tokenShow the user where these files are (in the same directory as your .hmem file):
cat "$(dirname "$HMEM_PATH")/.o9k-sync-config.json"
cat "$(dirname "$HMEM_PATH")/.o9k-sync-token"
npm install -g o9k-sync
The user needs:
https://your-server.example.com/o9k-sync)bbbee).o9k-sync-token)npx o9k-sync restore
This prompts for all values interactively. Or pass them as flags:
npx o9k-sync restore \
--server-url https://sync.example.com/o9k-sync \
--user-id myname \
--token abc123... \
--passphrase "my passphrase" \
--o9k-path ~/.hmem/memory.hmem
IMPORTANT: The --o9k-path must point to the exact .hmem file path.
The filename is used as identity for sync — it must match across devices.
After restore, the output shows entry count and path:
✓ Restore complete: 325 entries in ~/.hmem/memory.hmem
Set HMEM_PATH in your .mcp.json to this path.
Add HMEM_SYNC_PASSPHRASE to .mcp.json env block and restart the AI tool.
Broadcast messages to all synced devices. Each device sees announcements once on the next pull.
# From the directory containing .o9k-sync-config.json:
npx o9k-sync announce --message "Server URL changing to https://new-server/o9k-sync"
# Or via curl:
curl -X POST https://server/o9k-sync/announcements \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"message":"Your urgent message here"}'
# List all announcements:
curl -s https://server/o9k-sync/announcements -H "Authorization: Bearer $TOKEN"
# Edit (by ID from list):
curl -X PUT https://server/o9k-sync/announcements/2 \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"message":"Corrected message"}'
# Delete:
curl -X DELETE https://server/o9k-sync/announcements/2 \
-H "Authorization: Bearer $TOKEN"
Announcements appear as yellow warnings before pull output. They indicate urgent action is needed.
Act on them immediately — before any other work. Do not write to memory, do not start tasks. Read the message, execute the requested action (config change, URL update, etc.), verify it worked, then continue with normal work.
| Problem | Cause | Fix |
|---------|-------|-----|
| 401 Token verification failed | Passphrase special chars broken by shell | Use --passphrase flag or HMEM_SYNC_PASSPHRASE env in .mcp.json |
| Config not found | o9k-sync looks in wrong directory | Run from the directory containing your .hmem file, or use --config flag |
| 0 entries after sync | Different HMEM_PATH filename on devices | Filename must match — it's used as sync identity |
| read_memory returns empty | ~/.claude.json caches old HMEM_PATH | Check ~/.claude.json for stale MCP env overrides |
| "npm ERR" on update | Running npm update inside a project dir | Always use npm update -g o9k-sync (global flag!) |
HMEM_PATH points directly to the .hmem file (e.g. ~/.hmem/memory.hmem)
The parent directory is derived automatically.
Config files are always stored next to the .hmem file:
.o9k-sync-config.json — server URL, user ID, salt (not secret)
.o9k-sync-token — auth token (chmod 600, never commit)
.o9k-sync.json — sync state (last push/pull timestamps)
For redundancy, you can configure multiple servers in hmem.config.json as an array.
o9k-sync will push to and pull from all configured servers, so data survives if one
server goes down. See the o9k-sync README for the exact schema.
tools
Update flow for its-over-9k (hmem). Runs `npm update -g`, syncs skills, applies migrations, verifies hooks, shows the changelog. Use when the user asks to update/upgrade hmem, o9k, o9k-mcp, or its-over-9k (any language), or when the startup version-check flags a new release. Runs the npm update itself — don't assume it's already done.
development
Mandatory entry point for every Cortex session — invoke at conversation start, after /clear, and after any load_project call. All stable context (H-entries, projects, device, sync) is pre-injected by the hook — no read_memory(mode='essentials') needed. Surfaces pending git work, Next Steps + open T-tasks, and runs the O-entry routing check.
tools
Curate an .hmem file (your own or foreign) — mark obsolete/irrelevant, fix titles, consolidate duplicates, repair broken links. **Requires the `hmem-curate` MCP server** (skill prompts the user to enable it on entry). Use whenever the user says 'aufräumen', 'memory aufräumen', 'Speicher aufräumen', 'hmem aufräumen', 'clean up memory', 'tidy up hmem', 'curate memory', 'consolidate duplicates', 'merge duplicate entries', 'fix broken links', 'kümmer dich um die Memory', or invokes /o9k-curate. Also trigger when `memory_health()` flags BLOCKER/WARNING issues, when a P-entry's load_project output exceeds 4k tokens (session-start noise check defers to this skill), or before any batch cleanup of L, E, D, P entries. Skipping this skill and editing memory directly bypasses health checks, severity triage, and obsolete-chain integrity — never curate without it.
testing
Add a new rule and place it correctly — decide between a cross-project R-entry and a project-specific subnode under the active project's Rules section. Use whenever the user says 'neue Regel', 'Regel hinzufügen', 'new rule', 'add a rule', or invokes /o9k-new-rule. Critical safeguard: project-specific rules placed as R-entries pollute the session-start Rules listing across every project — get the scope right BEFORE writing.