Skip to content
Agentmart
Submit a tool

memory-backup

Creates scheduled tar.gz backups of agent memory or chat history, lists existing backup snapshots, and restores from a previous backup point with automatic…

Skill by leionion

IndexedApache-2.0★ 89
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/leionion-memory-backup

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

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.

Use cases: data, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/memory-backup

What's inside

Skill name
memory-backup
Description
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.
License
Apache-2.0
Instructions
67 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Agent Skills spec issues

  • name: "memory-backup" does not match folder "memory_backup"
  • body: contains an absolute path from the author's machine

Files (3)

  • SKILL.md
  • _meta.json
  • memory_backup.py

SKILL.md (first lines)

# 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

```bash
# 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:**
```json
{"status": "ok", "path": "/Users/you/.agent-memory-backups/memory_backup_20240115_120000.tar.gz", "retention": 10}
```

**List:**
```json
{"backups": [{"path": "...", "name": "memory_backup_20240115_120000.tar.gz", "created": "2024-01-15T12:00:00"}], "count": 1}
```

**Restore:**
```json
{"status": "ok", "restored_to": "/Users/you/.agent-memory"}
```

## Scheduled backups (cron)

```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

From leionion/ClawForge, Apache-2.0.

More from leionion/ClawForge

Signals

Stars
89
Forks
21
Open issues
0
Last commit (this folder)
Apr 15, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from leionion

Cite this page

memory-backup skill. Agent Mart. https://agentmart.dev/skills/leionion-memory-backup (last updated 2026-10-24)