restore

An interactive command for copying saved memory, handoff notes, plans, and configuration from a backup onto the current machine. It can read a GitHub mirror, object storage, a zip file, or an extracted folder.

In plain words
What is it for?
Use it to restore machine state from a backup, compare what would be restored, approve individual conflicts, and copy selected files without writing back to the backup source.
Why use it?
It restores missing or changed files while avoiding deletion of files that exist only locally. A dry run lets you inspect the proposed changes before applying them.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/cwakim/claude-plugins/restore
Clone the repo
git clone --depth 1 https://github.com/cwakim/claude-plugins
Per session 64 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,697 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00064 $0.01697
Opus 5 $0.00032 $0.00848
Sonnet 5 $0.00013 $0.00339
Haiku 4.5 $0.00006 $0.00170

Measured yesterday against content hash f59cea8b7e6f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

restore scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/memory-backup/commands/restore.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Restore (restore [--dry-run] [path])

Copies from a backup source back onto this machine. Interactive and conservative: it adds and (only with consent) overwrites, and it never deletes anything that exists only locally. Whichever source resolves below, restore only ever reads from it: it never writes back to the source, and never pushes anywhere. With --dry-run it goes exactly as far as the plan (step 3) and stops: nothing is applied, no question is asked, and any temp extraction directory is cleaned up. Useful for checking what a restore would do, especially against the GitHub mirror, which may be weeks ahead of or behind this machine.

The mirror tree and the name-to-target derivation rules live in ${CLAUDE_PLUGIN_ROOT}/docs/layout.md; read it before building the plan. To converge this machine with a different machine's mirror, use merge (${CLAUDE_PLUGIN_ROOT}/commands/merge.md) instead: restore maps a mirror back onto the machine it came from (or a replacement for it), merge reconciles two machines' divergent state.

Resolve the source

  • <path> given: a zip made by zip <path>, or its already-extracted folder. If <path> is a file (a .zip), extract it into a fresh temp directory (mktemp -d) and use that as the source root; if it is already a directory, use it directly. Verify the source root contains at least one machines/<hostname>/ subtree; if not, say so and stop. No GitHub involved at all: no clone, no gh, no network, and no need for /backup setup to have ever run.
  • No <path>: a configured backup target. Two kinds can be configured, and both may be at once (see docs/object-storage.md):
    • GitHub mirror (~/.claude/memory-backup/ is a clone with an origin). If it is not configured, this is probably the disaster-recovery path: ask for the backup repo (owner/name), verify it exists, and clone it into place first. Otherwise git pull --ff-only so the mirror is current. The source root is the clone.
    • Object storage (~/.claude/memory-backup-obstore.json exists). Read bucket/prefix/endpoint/region/profile from it and materialize the mirror into a fresh temp directory (mktemp -d) with ${CLAUDE_PLUGIN_ROOT}/scripts/obstore-pull.sh --dest <tmp> --bucket .... That temp directory is then the source root, handled exactly like an extracted zip: read-only, and cleaned up at the end (step 4) or on any early stop, since this run created it.
    • Both configured: ask via AskUserQuestion which to restore from (they can differ: the bucket may be ahead of or behind the git mirror). Only one configured: use it without asking.

Read the full file on GitHub · 118 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 118 lines · 64 tokens per session scan A f59cea8b7e6f

Subscribe to this mod's changes

restore is a command published in the GitHub repository cwakim/claude-plugins (2 stars, last pushed 11d ago), licensed MIT. It adds 64 tokens to every session and 1,697 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.