Guide · Agent skill
How to use the Local Database Backups agent skill (backup-setup)
Updated · written with AI from the project's own documentation and checked against our catalogue data
The backup-setup skill is an agent skill for claude-mem, a memory database used alongside Claude. It lets the agent turn on automatic local snapshots of your memory database, check whether they are running, and restore an older copy if something goes wrong. This guide explains what the skill does, how to install it, how to ask for it in plain language, and what to check before you rely on it.
Quick start
- 1Install claude-mem and Node.js. Make sure claude-mem with its npx command-line tool and Node.js are installed, and that the claude-mem worker can run.
- 2Unzip the skill folder. Download the backup-setup ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder.
- 3Or upload the ZIP in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the ZIP instead.
- 4Ask to set up backups. Say "set up backups" or "back up my memories". The agent checks status first.
- 5Choose interval and retention. When asked, give an interval in hours (1 to 168, default 24) and how many snapshots to keep (1 to 100, default 7).
- 6Confirm the schedule. The agent restarts the worker and runs backup status. Backups are on only when status says so.
- 7Restore when needed. Ask to restore your database. The agent lists snapshots, restores the one you pick and reports the outcome.
What an agent skill is and what this one does
An agent skill is a folder containing instructions (a SKILL.md file, plus any supporting files) that an AI agent reads when a request matches the skill's description. Once installed, you do not run it yourself; you ask for the task in ordinary words and the agent follows the instructions.
This skill covers three jobs: setting up scheduled local snapshots of the claude-mem database at ~/.claude-mem/claude-mem.db, checking their status, and restoring a snapshot. Each snapshot is a standalone SQLite file stored under ~/.claude-mem/backups/auto/, and the newest copies are kept up to a count you choose. Snapshots stay on your own machine.
Before you start: what the skill needs
The skill depends on claude-mem being installed with its npx command-line tool and a running worker. It also needs Node.js, because the setup step runs a Node script, and SQLite support through the claude-mem worker.
The skill runs scripts, and it does not use the network, according to its source.
- claude-mem installed, with its npx command-line tool available
- A running claude-mem worker (the skill can start it with npx claude-mem start)
- Node.js installed
- SQLite support through the claude-mem worker
Install the backup-setup skill
Download the skill ZIP from this page and unzip it. Then put the resulting folder in one of two places: ~/.claude/skills/ to make it available across your projects, or a project's .claude/skills/ folder to limit it to that project.
If you use the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.
- Personal install: unzip into ~/.claude/skills/
- Project install: unzip into the project's .claude/skills/ folder
- Claude apps: upload the ZIP under Settings → Capabilities → Skills
Ask for it with natural requests
The skill triggers when you use phrases like the ones in its description. You do not need to name the skill or use a command. The skill also accepts an argument of setup, restore or status, and its routing maps an empty request to setup.
- "Set up backups" or "back up my memories": checks status, then enables snapshots
- "Backup status": reports the last snapshot time, snapshot count and any last error
- "Restore my database": lists snapshots and restores the one you choose
What the agent does when you enable backups
For setup, the agent first runs the status check. If backups are not yet enabled, it asks you for an interval in hours (default 24, range 1 to 168) and how many snapshots to keep (default 7, range 1 to 100). It then writes three backup settings into ~/.claude-mem/settings.json, keeps the file's mode at 0600, and preserves your other settings.
After writing the settings, the agent restarts the worker and checks status again. It reports backups as on only when the status output says so. The first automatic snapshot lands about five minutes after the worker starts. You can take one immediately with npx claude-mem backup run.
npx claude-mem restart
npx claude-mem backup status
npx claude-mem backup runHow to restore a snapshot safely
For a restore, the agent lists available snapshots, then restores the file you pick. The restore stages the snapshot and restarts the worker. The new worker saves the database it replaced as claude-mem-<timestamp>-pre-restore.db in the same folder. You can restore that file to undo the change, and it counts toward your retain count.
After a restore, backup status shows a "Last restore" line that names the saved copy on success, or the reason for failure. If it fails, the worker keeps the database it had.
npx claude-mem backup list
npx claude-mem restore <file>
npx claude-mem backup statusExamples of requests and what happens
Each example below shows a request you might type and the steps the skill follows, based on its instructions.
- "Set up backups, every 12 hours, keep 10": the agent checks status, writes the interval and retain count, restarts the worker and confirms the schedule.
- "Backup status": the agent runs the status check and reports the snapshot count, last snapshot time and any error, then stops.
- "Restore my database from yesterday": the agent lists snapshots and restores the one you choose, then reports the restore outcome.
Safety notes: scripts, settings and cloud sync
The skill runs scripts, including a Node script that edits your settings file. The skill is written to avoid printing that file's contents, because it can hold credentials. Keep the file's permissions at 0600.
Restores need care when cloud sync is on. The restored database resumes syncing from the snapshot's position and can pull back changes that reached the cloud after the snapshot was taken. Snapshots are local only, so they do not protect you from losing data stored off the machine.
- The skill runs scripts and does not use the network.
- Snapshots are local only; there are no off-machine or cloud backups.
- Restoring with cloud sync on can bring back changes made after the snapshot.
Tips for getting reliable results
Check status before and after changing anything. If the status output reports an unknown backup command or an HTTP 404, the installed claude-mem version may not include backup support yet; the skill says to run npx claude-mem update in that case. Other errors should be read and not ignored, since the skill will not turn backups on after them.
- Run backup status first to confirm the worker is up.
- Keep retain count high enough to cover the window in which you would notice a problem.
- Use the pre-restore file if a restore turns out to be wrong.
- If the worker is not running, the skill will try npx claude-mem start and retry.
What people use it for
- Turning on a daily local snapshot of your claude-mem memory database
- Checking when the last snapshot ran and how many are kept
- Rolling back the memory database after a bad change or a corrupted file
- Undoing a restore by restoring the pre-restore copy the worker saved
Frequently asked questions
How do I install the backup-setup skill?
Download the skill ZIP from this page and unzip it into ~/.claude/skills/ for all projects, or into a project's .claude/skills/ folder for one project. In the Claude apps, you can upload the ZIP under Settings → Capabilities → Skills instead.
What do I need before using this skill?
You need claude-mem installed with its npx command-line tool and a running worker, plus Node.js, since the setup step runs a Node script. The skill also needs SQLite support through the claude-mem worker.
Is the backup-setup skill free?
The skill's source is licensed under Apache-2.0, as listed on this page. This page does not state any price, so check the repository for licence terms in full.
Do the backups go to the cloud?
No. Snapshots stay on your own machine in ~/.claude-mem/backups/auto/. If you need off-machine or cloud backups, this skill does not provide them.
Why does backup status say backups are not available?
If the output says unknown command backup or HTTP 404, your installed claude-mem version may not have backup support yet. The skill suggests running npx claude-mem update once a release includes it. Other errors should be read and checked rather than assumed to be a missing feature.
Can a restore lose recent changes?
A restore replaces the database with the snapshot, so changes made after that snapshot are not in it. The worker saves the replaced database as a pre-restore file you can restore to undo. With cloud sync on, changes that reached the cloud after the snapshot may be pulled back in.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
This skill suits claude-mem users who want simple, local, scheduled snapshots of their memory database and an easy way to roll back. It is not the right choice if you need off-machine or cloud backups, or if you expect restores to be risk-free while cloud sync is active.
Download the skill