backup-setup

backup-setup is a skill for Claude Code from thedotmack/claude-mem. It costs 45 tokens per session (1,183 once invoked), scanned A, original, Apache-2.0.

A local backup tool for the SQLite database used by claude-mem, which stores the agent's memories. It can check backup status, enable scheduled snapshots, and restore a snapshot.

In plain words
What is it for?
It is for setting up, checking, or restoring local database backups.
Why use it?
It helps protect locally stored memories from database loss and provides a way to recover an earlier copy.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; names the AskUserQuestion tool.

Part of the claude-mem plugin — 25 skills, 1 MCP server shipped together

Good fit It is for setting up, checking, or restoring local database backups.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thedotmack/claude-mem/backup-setup
About the project

Claude-Mem, now presented as Grok Mem, records an agent's work, compresses it with AI, and brings relevant notes into later sessions so the agent can remember decisions and next steps. It is intended for persistent context across agent conversations and supports multiple coding-agent environments. The catalogue add-ons provide the workflows and integrations used to operate this memory system.

thedotmack/claude-mem · 114,186 stars · on GitHub · claude-mem.ai

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.

Any agent
npx skills add thedotmack/claude-mem --skill backup-setup
Clone the repo
git clone --depth 1 https://github.com/thedotmack/claude-mem

Made for: Claude Code.

Or install claude-mem, the plugin that ships this one along with the rest of its 25 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for backup-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/thedotmack/claude-mem/backup-setup/github.svg)](https://agentmods.dev/skills/thedotmack/claude-mem/backup-setup)
Your own site
<a href="https://agentmods.dev/skills/thedotmack/claude-mem/backup-setup"><img src="https://agentmods.dev/badge/skills/thedotmack/claude-mem/backup-setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for backup-setup

Your own site · 80×15
<a href="https://agentmods.dev/skills/thedotmack/claude-mem/backup-setup"><img src="https://agentmods.dev/badge/skills/thedotmack/claude-mem/backup-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,183 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00045 $0.01183
Opus 5.5 $0.00018 $0.00473
Sonnet 5.5 $0.00009 $0.00237
Haiku 4.5 $0.00005 $0.00118

Measured 10d ago against content hash f91a65d592ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

backup-setup 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 10d ago.

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/skills/backup-setup/SKILL.md · 117 lines

How it starts

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

Backups (local snapshots)

The installed worker snapshots ~/.claude-mem/claude-mem.db on a schedule (VACUUM INTO, consistent while sessions run) and keeps the newest N under ~/.claude-mem/backups/auto/. Each snapshot is one standalone SQLite file. Snapshots stay on this machine.

Preserve every unrelated setting and keep ~/.claude-mem/settings.json mode 0600. Never print the file's contents: it holds credentials.

Routing

Based on $ARGUMENTS:

  • setup or empty: 1. Check status, then 2. Enable snapshots
  • restore: 3. Restore
  • status: 1. Check status only

1. Check status

npx claude-mem backup status
  • Snapshot details printed: backups run. Report the last snapshot time, the snapshot count and any last error; stop unless the user asked for a change or a restore.
  • "Automatic backups are not enabled": continue to step 2 if setting up.
  • A "Last restore" line reports the outcome of the most recent restore.
  • "Worker is not running": start it with npx claude-mem start and retry.
  • "Unknown command: backup" or "Backup status failed: HTTP 404": this claude-mem (CLI or running worker) has no backup support yet, so the worker would ignore the backup settings. Stop. Tell the user that backups are not available in their installed version and that npx claude-mem update brings them once a release includes them. Do not write the settings in step 2, and never say backups are on.
  • Any other failure ("Backup status failed: HTTP" with another status, "Backup request failed: ...", "Backup status failed: invalid JSON response", "Backup status failed: unexpected response") or any output not listed here: stop. Show the user the exact error line, do not write the settings in step 2, and never say backups are on. Do not suggest an update: this is an error in a version that has backups, not a missing feature.

2. Enable snapshots

Ask (or default): interval in hours (default 24, range 1 to 168) and how many snapshots to keep (default 7, range 1 to 100). Then write the settings without echoing anything else in the file:

Read the full file on GitHub · 117 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. 10d ago Changed · +15 lines f91a65d592ae
  2. 12d ago First seen · 102 lines · 45 tokens per session scan A 4f40b906d481

Subscribe to this mod's changes

backup-setup is a skill published in the GitHub repository thedotmack/claude-mem (114,186 stars, last pushed today), licensed Apache-2.0. It adds 45 tokens to every session and 1,183 once invoked, about $0.0002 per session on Opus 5.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-10-27.

Related

backup-setup compared with skills from other repositories

backup-setup next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
backup-setupthedotmack/claude-memSkill114ktodayApache-2.0A45Claude Code
hivemind-memoryactiveloopai/hivemindSkill1.6k3d agoApache-2.0A33Claude Code
hivemind-memoryactiveloopai/hivemindSkill1.6k3d agoApache-2.0A33Claude Code
hivemindactiveloopai/hivemindSkill1.6k3d agoApache-2.0A32Claude Code
dejavu-rulescmg8431/claude-dejavuSkill25mo agoMITA56Claude Code
dejavucmg8431/claude-dejavuSkill25mo agoMITA51Claude Code
dejavu-reportcmg8431/claude-dejavuSkill25mo agoMITA37Claude Code