savelisted
Install: claude install-skill vslipchenko/ai
# Sessions — Save
Snapshot the live Claude Code sessions the user picks, so `restore` can reopen
each one in its folder (`claude --resume <id>`) whenever the user wants them
back. Windows, Linux and macOS.
## Script
All discovery and file work is done by one script per OS. Pick the command for
the OS you're running on (the environment tells you the platform); the options
and JSON output are identical.
- **Windows** — run with the PowerShell tool (or Bash):
```
powershell -NoProfile -ExecutionPolicy Bypass -File "${CLAUDE_PLUGIN_ROOT}/scripts/sessions.ps1" <command> [options]
```
- **Linux and macOS** — run with Bash:
```
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/sessions.py" <command> [options]
```
If `python3` is not installed, tell the user the plugin needs Python 3 and
stop: on Linux e.g. `sudo apt install python3`; on macOS `xcode-select --install`
(Apple's Command Line Tools, which include `/usr/bin/python3`).
If `${CLAUDE_PLUGIN_ROOT}` above was not replaced with a real path, use the
folder two levels above this skill's base directory instead. Pass
`-DataDir "${CLAUDE_PLUGIN_DATA}"` exactly as written; the script handles an
empty or unreplaced value. Every command prints one JSON line; `"ok": false`
carries `error` and `message` — report the message and stop.
## Step 1 — List live sessions
```
... list -DataDir "${CLAUDE_PLUGIN_DATA}" -CurrentSessionId "${CLAUDE_SESSION_ID}"
```
Result: `sessions[]` with `sessionId`, `cwd`, `title`, `lastPrompt`,