/sync
Sync memory between your local machine and GitHub backup — both directions.
$ npx -y skills add HelloRuru/claude-memory-engine --agent claude-codeShips with claude-memory-engine. Installing the plugin gets this command.
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/sync
Context preview
What this command does when you run it.
Sync memory between your local machine and GitHub backup — both directions.
Command definition
sync.md/sync -- Bidirectional Memory Sync
Sync memory between your local machine and GitHub backup — both directions.
Usage
# Bidirectional: pull latest from GitHub, then push local changes bash ~/.claude/scripts/hooks/memory-backup.sh sync # Push only (same as /backup) bash ~/.claude/scripts/hooks/memory-backup.sh push # Pull only (same as /recover) bash ~/.claude/scripts/hooks/memory-backup.sh pull
What sync does
1. **Pull** — `git pull` from GitHub, then distribute `repo/memory/*.md` into every local `projects/*/memory/` directory (newer file wins) 2. **Push** — scan all local `projects/*/memory/` directories, copy to the backup repo, commit, and push
When to use
- Switching between devices (laptop vs desktop) — run `/sync` to get the other device's latest memory
- After a long offline session — push your changes and pull anything new
- If you're unsure whether you have the latest — `/sync` is always safe
Notes
- The pull step only overwrites files when the GitHub version is newer than the local version
- The SessionEnd hook auto-commits locally after every conversation
- This command handles the **push + pull** to remote (GitHub)
- `/backup` = push only; `/recover` = pull only; `/sync` = both
Claude Code 的記憶系統 | A memory system built with hooks + markdown. Zero dependencies.
Repo: HelloRuru/claude-memory-engine
Other commands on claude-memory-engine.
- /analyze
Analyze user corrections and log them into the error notebook
Open command - /backup
Push local memory files to your GitHub backup repository.
Open command - /bb-pause
Pause the SessionEnd auto-commit hook when refactoring core engine files.
Open command - /check
Run a quick scan of the memory system's health. For daily use.
Open command - /compact-guide
Help decide when to use `/compact` based on the current conversation state.
Open command - /correct
Review the error notebook — flip through past corrections before working
Open command

