memory-backup
FreeRuns bundled scriptsNot checkedCreates scheduled tar.gz backups of agent memory or chat history, lists existing backup snapshots, and restores from a previous backup point with automatic…
by leionion★ 88 GitHub starsAbout this skill
memory-backup — Agent Memory Backup & Restore
Creates compressed backups of agent memory/chat history and restores from previous snapshots. Supports configurable retention policies and scheduled execution via cron.
Usage
# Back up agent memory (default source: ~/.agent-memory)
python3 memory_backup.py backup
# Back up a custom source with retention of 5 snapshots
python3 memory_backup.py backup --source ~/my-memory --retention 5
# List all available backup points
python3 memory_backup.py list
# Restore from a specific backup
python3 memory_backup.py restore --restore-from ~/.agent-memory-backups/memory_backup_20240115_120000.tar.gz
Parameters
| Flag | Default | Description |
|---|---|---|
--source |
~/.agent-memory |
Memory source directory or file |
--backup-dir |
~/.agent-memory-backups |
Where backups are stored |
--retention |
10 |
Keep N most recent backups (0 = keep all) |
--restore-from |
— | Backup file path (required for restore) |
--restore-to |
~/.agent-memory |
Restore destination |
--output |
json |
Output format (json or print) |
Output examples
Backup:
{"status": "ok", "path": "/Users/you/.agent-memory-backups/memory_backup_20240115_120000.tar.gz", "retention": 10}
List:
{"backups": [{"path": "...", "name": "memory_backup_20240115_120000.tar.gz", "created": "2024-01-15T12:00:00"}], "count": 1}
Restore:
{"status": "ok", "restored_to": "/Users/you/.agent-memory"}
Scheduled backups (cron)
0 */6 * * * cd /path/to/skill && python3 memory_backup.py backup
Error handling
- Source not found: returns
{"error": "Source not found: <path>"} - Missing --restore-from: returns
{"error": "--restore-from required for restore"} - Restore overwrites destination: existing files at restore target are replaced — back up first if uncertain
Related skills
- session-memory: the data source this skill backs up
- calendar: trigger scheduled backups
- file-organizer: manage backup files
Install memory-backup in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the memory-backup skill do?
Creates scheduled tar.gz backups of agent memory or chat history, lists existing backup snapshots, and restores from a previous backup point with automatic retention policy. Use when the user asks to back up, export, save, snapshot, or restore chat history, conversation logs, agent memory, or session data.
How do I install the memory-backup skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the memory-backup skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
by Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
by Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
by Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
by Anthropic