Skip to main content
plugin

session-backup — Claude Code plugin for backups

This plugin archives Cowork files and uploads them to Google Drive. Run a backup on demand or schedule daily runs through Cowork.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add anthropics/claude-plugins-community
/plugin install session-backup@claude-community
Open on GitHub

What session-backup does

The plugin packages Cowork skills, plugins, Claude docs, and configuration files, then uploads separate ZIPs to the Cowork-Backups folder in Google Drive. Before uploading, it retrieves the existing backup and merges it with the new files. New files replace matches; older files with no match are kept.

You need the Google Drive Upload connector built with Apps Script and ~/.cowork-gdrive-config.json containing url and apiKey. Without a configured connector, uploads to Drive will fail. The archive skips node_modules/, .git/, PNG and JPG images, and package-lock.json. To run backups daily, set up a scheduled task in Cowork. Use /backup-now to start one, /backup-setup to configure the connection, or /backup-status to check the last run.

What it helps with

  • back up Cowork files to Google Drive
  • merge a new backup with existing files
  • split backup contents into component ZIPs
  • check the status of the last backup

Example prompts for the agent

  • Back up my Cowork files to Google Drive now: /backup-now.
  • Set up the Google Drive connection for backups: /backup-setup.
  • Check when the last backup ran: /backup-status.

How to install session-backup

Plugin marketplace

/plugin marketplace add anthropics/claude-plugins-community
/plugin install session-backup@claude-community

Step by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own

Questions about session-backup

How do I install session-backup in Claude Code?

Run /plugin marketplace add anthropics/claude-plugins-community, then run /plugin install session-backup@claude-community.

What does session-backup do?

It packages Cowork files into separate archives and uploads them to Google Drive. On later runs, matching files are replaced while unmatched older files are retained.

What do I need to upload backups to Google Drive?

Set up the Google Drive Upload connector using Apps Script and create ~/.cowork-gdrive-config.json with url and apiKey.

Source text

session-backup · MIT
# Session Backup — Claude Plugin by MSApps

Automated daily backups of your entire Cowork environment to Google Drive.

## What gets backed up

| Component | Description | Typical size |
|-----------|-------------|--------------|
| **Skills** | All Cowork skill definitions, references, and scripts | ~3 MB |
| **Plugins** | Installed plugins, marketplace cache, plugin configs | ~2 MB |
| **Claude Docs** | Scheduled tasks, session context files, MCP configs | ~8 MB |
| **Configs** | `claude_desktop_config.json` and connection configs | < 1 KB |

## How it works

1. **Download** the existing backup from Google Drive (if one exists)
2. **Build** fresh zips of each component from the local machine
3. **Merge** old + new content (new files win conflicts, old-only files preserved)
4. **Upload** each component as a separate zip to the `Cowork-Backups` folder on Drive

The merge strategy lets multiple accounts share the same Drive storage without overwriting each other.

## Split upload strategy

Google Apps Script has a ~10 MB base64 payload limit. The backup is split into 4 files:

- `cowork-skills-backup.zip`
- `cowork-plugins-backup.zip`
- `cowork-docs-backup.zip`
- `cowork-configs-backup.zip`

Each uploaded with `replaceExisting: true`.

## Size optimization

Excludes heavy regeneratable content to stay within upload limits:

- `node_modules/` — install from package.json
- `.git/` — version history
- `*.png`, `*.jpg` — screenshots
- `package-lock.json` — regeneratable

This typically reduces the docs backup from ~140 MB to ~8 MB.

## Installation

**Claude Code (CLI):**
```bash
/plugin marketplace add MSApps-Mobile/claude-plugins
/plugin install session-backup@msapps-plugins
```

**Cowork:**
1. Settings → Plugins → Marketplaces → Add → `MSApps-Mobile/claude-plugins`
2. Search "session-backup" → Install

## Requirements

- **Google Drive Upload connector** — Apps Script web app (see CONNECTORS.md)
- **Config file** at `~/.cowork-gdrive-config.json`
- One of the following:
  - **Claude Code** (CLI) — runs bash commands directly on your Mac
  - **Claude Cowork** — uses osascript to access host machine files

## Setup

1. Deploy the Apps Script (see [CONNECTORS.md](CONNECTORS.md))
2. Create config: `~/.cowork-gdrive-config.json` with `url` and `apiKey`
3. Set up as a Cowork scheduled task for daily runs

## Commands

| Command | Description |
|---------|-------------|
| `/backup-now` | Run an immediate backup |
| `/backup-setup` | Configure the backup connection |
| `/backup-status` | Check last backup status |

## License

MIT — Free and open source.

## Author

**MSApps** — [msapps.mobi](https://msapps.mobi) | [[email protected]](mailto:[email protected])

© MSApps-Mobile · MIT · MSApps-Mobile/claude-plugins

Similar plugins

All plugins for Agent setup: memory, context, orchestration →

From the same set24

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor