From praxis
Save cmux session list as a JSON snapshot. Current session excluded by default. Supports save and list commands. Triggers on "save sessions", "session save", "session snapshot", "cmux save", "list snapshots", "snapshot list".
How this skill is triggered — by the user, by Claude, or both
Slash command
/praxis:cmux-save-sessionsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Saves the current state of cmux workspaces as a JSON snapshot.
Saves the current state of cmux workspaces as a JSON snapshot. Snapshots are used for session recovery, history recording, sharing, and as input data for other skills.
Role separation:
cmux-save-sessions: Capture current state as JSON (save)cmux-resume-sessions: Restore workspaces from JSON snapshot (restore)cmux-recover-sessions: Post-crash/power-loss recovery from tmux sessions (emergency)cmux-session-manager: Real-time status + cleanup (daily)
SAVE CAPTURES TRUTH. CURRENT SESSION IS EXCLUDED BY DEFAULT.
Save records the exact state at the current moment. The session running this script (the manager session) is excluded by default — only work sessions are saved.
cmux-resume-sessions restoreNot for crash recovery — after a power loss, use
cmux-recover-sessions(reads.jsonlfiles directly).
save — Save session snapshotHow to run:
bash "$(dirname "$0")/cmux-save-sessions"
AskUserQuestion:"N sessions saved. Would you like to close the saved sessions?"
- Close all: Close all saved workspaces
- Select to close: User picks which sessions to close (multiSelect)
- Keep: Don't close anything
cmux close-workspace --workspace <ref>
Never terminate tmux sessions directly —
cmux close-workspacehandles backing terminal cleanup internally. Manualtmux kill-sessioncan break other workspaces' terminals. For orphan tmux session cleanup, usecmux-session-manager's cleanup command.
Never close the current session (manager session) — closing it would terminate Claude Code. Even if saved with
--include-self, the current session is excluded from close targets.
Flags:
--include-self: Include the current session in the snapshotSave location: ~/.cmux/sessions/sessions-YYYYMMDD-HHMMSS.json
Captured data:
list — List saved snapshotsHow to run:
~/.cmux/sessions/:for f in $(ls -t ~/.cmux/sessions/sessions-*.json 2>/dev/null | head -20); do
saved_at=$(jq -r '.saved_at' "$f")
total=$(jq -r '.total' "$f")
echo " $(basename "$f") | $saved_at | $total sessions"
done
{
"saved_at": "2026-04-07T14:30:00+0900",
"hostname": "macbook-pro.local",
"total": 7,
"summary": {
"active": 2,
"waiting": 1,
"idle": 1,
"crashed": 0,
"unknown": 1
},
"sessions": [
{
"ref": "workspace:147",
"name": "Session name",
"state": "ACTIVE",
"branch": "main",
"pr": "none",
"category": "[DEV]",
"cwd": "/path/to/project",
"session_id": "5f3c1e9a-..."
}
]
}
| Problem | Cause | Fix |
|---|---|---|
| "cmux is not running" | cmux app not running | Start cmux app |
| "jq is required" | jq not installed | brew install jq |
| 0 sessions saved | Only current session exists | Use --include-self flag |
| Excuse | Reality |
|---|---|
| "Include the current session too" | The manager session would be in the snapshot, and --include-self can accidentally close the session you are in. |
| "Skip saving, I'll remember the layout" | You won't. Multi-workspace layouts vanish on reboot. Save is cheap. |
| "Overwrite the previous snapshot" | Timestamped files are the history. Overwriting discards recovery points. |
| "Close all sessions after save" | Read the list first. An ACTIVE session may still be doing meaningful work. |
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub devseunggwan/praxis --plugin praxis