Skip to content
Development
Command

/recover

Restore memory from your GitHub backup when local memory files are lost or corrupted. Also works for cross-device sync.

From plugin
13219 skills19 commands9 hooks
shell
$ npx -y skills add HelloRuru/claude-memory-engine --agent claude-code

Ships 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/recover

Context preview

What this command does when you run it.

Restore memory from your GitHub backup when local memory files are lost or corrupted. Also works for cross-device sync.

Command definition

recover.md

/recover -- Disaster Recovery + Cross-Device Sync

Restore memory from your GitHub backup when local memory files are lost or corrupted. Also works for cross-device sync.

Prerequisites

You need a GitHub repo set up as your memory backup (the one you push to with `/backup` or `/sync`). If you haven't created a backup repo yet, this command won't work.

Cross-Device Sync (v1.6)

bash ~/.claude/scripts/hooks/memory-backup.sh pull

The `pull` mode does two things: 1. `git pull` from GitHub to get the latest 2. Distribute `repo/memory/*.md` into every local project directory that has a `memory/` folder (newer file wins, won't overwrite local changes)

This solves the "Device A pushed but Device B can't see it" problem -- each device has different working directories, so `projects/` paths differ. Global memory must be actively distributed.

When to Use

  • Switched to a new computer and need to bring over memories from another device
  • Local memory files were accidentally deleted
  • SessionStart hook isn't working
  • Memory files appear corrupted or empty
  • Another device pushed new memory and you want to pick it up (for routine use, `/sync` is more convenient)

Steps

1. **Protect current state** -- Run `/backup` first to push any remaining local changes 2. **Pull from GitHub** -- `bash ~/.claude/scripts/hooks/memory-backup.sh pull` 3. **Verify** -- Read MEMORY.md, scan all index entries 4. **Report** -- "Recovered! Found {N} index entries, {M} memory files"

Notes

  • Under normal conditions, SessionStart hook auto-loads the last session summary + recent memory changes. You should NOT need this command regularly
  • This is the "break glass" option for when the automated system fails
  • Always push before pulling to avoid overwriting local changes
Read more
Read it on GitHub ↗
Ships withclaude-memory-engine

Claude Code 的記憶系統 | A memory system built with hooks + markdown. Zero dependencies.

Get the whole plugin, auto-invoked
Stats
132
Stars
0
Views
27
Forks
Maintained
Maintenance
JavaScript
Language
MIT
License
2mo ago
Last commit
4mo ago
Created

Repo: HelloRuru/claude-memory-engine