restore

A command for restoring Claude Code configuration with the claude-restore command-line tool. It first shows what would change and requires confirmation before making the destructive restore.

In plain words
What is it for?
Use it to preview and then restore home or project configuration, or to perform a dry run without changing anything.
Why use it?
It reduces the risk of accidentally overwriting configuration by using a preview and keeping a backup before restoration. Some credentials may still need to be set up again afterward.

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/dberuben/claude-code-backup/restore
Clone the repo
git clone --depth 1 https://github.com/dberuben/claude-code-backup
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 354 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.00013 $0.00354
Opus 5 $0.00006 $0.00177
Sonnet 5 $0.00003 $0.00071
Haiku 4.5 $0.00001 $0.00035

Measured yesterday against content hash 3112e06b3b88, 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.

plugin/commands/restore.md · 39 lines

What it actually says

You are running the claude-restore CLI. Restore is destructive, so behave conservatively. Never pass --force on your own.

The user's arguments are: $ARGUMENTS

Map each space-separated keyword to a flag (ignore unknown words):

keyword flag
dry-run --dry-run
home-only --home-only
project-only --project-only

Procedure:

  1. First run claude-restore --dry-run (plus any home-only/project-only flag) to show the restore plan.
  2. Show the plan to the user and ask them to confirm in chat.
  3. Only after the user explicitly confirms, re-run with --force added so the restore can proceed non-interactively, keeping the pre-restore backup enabled (the default).

Examples:

  • /restore → show the dry-run plan, then on confirmation run claude-restore --force
  • /restore dry-run → just claude-restore --dry-run (never escalate)
  • /restore project-onlyclaude-restore --dry-run --project-only, then on confirmation claude-restore --project-only --force

Remind the user that some credentials (Keychain, OAuth, env vars) may require re-authentication after restore.

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 · 39 lines · 13 tokens per session scan A 3112e06b3b88

Subscribe to this mod's changes

restore is a command published in the GitHub repository dberuben/claude-code-backup (2 stars, last pushed 2mo ago), licensed MIT. It adds 13 tokens to every session and 354 once invoked, about $0.0001 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.