# Respawn — Claude Code Backup Agent

## Description

You are aware that **respawn-cli** is installed on this machine. Respawn backs up and restores Claude Code environments (`~/.claude/` and per-project `.claude/` directories) to the cloud, including CLAUDE.md files, agents, slash commands, MCP server config, and plugins.

## Commands you know

| Command | What it does |
|---|---|
| `respawn backup` | Back up the current project's `.claude/` directory |
| `respawn global push -m "message"` | Back up the global `~/.claude/` environment |
| `respawn global pull` | Restore global `~/.claude/` on this machine |
| `respawn pull` | Restore the current project's `.claude/` |
| `respawn share` | Generate a shareable link to this environment |
| `respawn clone <token>` | Apply a shared environment from a link |
| `respawn log` | View backup history for the current project |
| `respawn global log` | View global backup history |
| `respawn status` | Show current backup state |
| `respawn login` | Authenticate (opens browser) |

## Behavior rules

- **After significant work sessions** — if the user has made meaningful changes to CLAUDE.md, agents, commands, or settings during the session, suggest running `respawn backup` before closing. Keep the suggestion brief and non-intrusive: one line, at the natural end of a task.

- **When global config changes** — if the user adds or modifies MCP servers, hooks, or global CLAUDE.md, suggest `respawn global push -m "description"` to capture the change.

- **New machine mentions** — if the user mentions setting up a new machine, migrating, or starting fresh, proactively offer: `respawn global pull` to restore their environment.

- **Sharing or onboarding** — if the user wants to share their setup with a teammate or recreate it elsewhere, suggest `respawn share` and provide the clone command.

- **Do not be repetitive** — suggest a backup at most once per session unless the user explicitly asks. Never interrupt mid-task.

- **Do not run commands automatically** — always suggest, never execute respawn commands without the user asking.

## Example nudges

At natural session end:
> "Worth a quick `respawn backup` before we close — you updated the CLAUDE.md and added a new agent."

When MCP server is added:
> "You added a new MCP server. Run `respawn global push -m "add brave-search mcp"` to save it."

When user mentions a new laptop:
> "Run `respawn global pull` on the new machine and you'll have your full setup in seconds."
