phoenix

phoenix is a skill for Claude Code from Kasempiternal/Claude-Agent-System. It costs 118 tokens per session (2,087 once invoked), scanned A, original, MIT.

A macOS and Ghostty-only tool for saving and restoring open Claude sessions across a reboot. It is marked beta and supports snapshot, arm, disarm, and manual restore steps.

In plain words
What is it for?
Use it before a planned macOS reboot when several Claude sessions are open. If automatic behavior fails, use its snapshot and arm steps, reboot manually, and restore the sessions.
Why use it?
Restarting a computer normally interrupts many open sessions and makes them hard to recover. This saves their state so you can reopen them after restarting.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the cas plugin — 19 skills, 7 agents, 3 hooks, 2 MCP servers shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Kasempiternal/Claude-Agent-System
Claude Code
/plugin install cas

Made for: Claude Code.

Or install cas, the plugin that ships this one along with the rest of its 19 skills, 7 agents, 3 hooks, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for phoenix

README.md
[![agentmods](https://agentmods.dev/badge/skills/kasempiternal/claude-agent-system/phoenix.svg)](https://agentmods.dev/skills/kasempiternal/claude-agent-system/phoenix)
Your own site
<a href="https://agentmods.dev/skills/kasempiternal/claude-agent-system/phoenix"><img src="https://agentmods.dev/badge/skills/kasempiternal/claude-agent-system/phoenix.svg" alt="Measured on agentmods" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,087 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00118 $0.02087
Opus 5 $0.00059 $0.01043
Sonnet 5 $0.00024 $0.00417
Haiku 4.5 $0.00012 $0.00209

Measured 6d ago against content hash 67b1dc7ea58d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

phoenix scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/phoenix.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude-agent-system-plugin/skills/phoenix/SKILL.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

██████╗ ██╗  ██╗ ██████╗ ███████╗███╗   ██╗██╗██╗  ██╗
██╔══██╗██║  ██║██╔═══██╗██╔════╝████╗  ██║██║╚██╗██╔╝
██████╔╝███████║██║   ██║█████╗  ██╔██╗ ██║██║ ╚███╔╝
██╔═══╝ ██╔══██║██║   ██║██╔══╝  ██║╚██╗██║██║ ██╔██╗
██║     ██║  ██║╚██████╔╝███████╗██║ ╚████║██║██╔╝ ██╗
╚═╝     ╚═╝  ╚═╝ ╚═════╝ ╚══════╝╚═╝  ╚═══╝╚═╝╚═╝  ╚═╝

        ◎ Reboot without losing a single session ◎
                   CLAUDE AGENT SYSTEM
              ⚠ BETA — macOS + Ghostty only ⚠

MANDATORY: Output the banner above verbatim as your very first message, before any tool calls.

⚠ BETA — macOS + Ghostty only

Newly shipped and validated against a real 15-session setup, but not yet battle-tested across machines. It reopens sessions in Ghostty only (the reopen step uses ghostty -e), and the auto-reboot needs macOS. If anything misbehaves: your sessions are armed independently of the reboot, so the safe path is /phoenix snapshot/phoenix arm → reboot manually. Cancel a pending restore anytime with /phoenix disarm. Feedback: https://github.com/Kasempiternal/Claude-Agent-System/issues

Phoenix makes rebooting cost-free when you have many claude sessions open. It captures the live session set, arms a one-shot login agent, and (optionally) reboots. On the next login, every session reopens as a tab in one Ghostty window, cd'd to its original directory and resumed with claude --resume <id>.

How it works (one moving part: a deterministic CLI)

All behavior lives in a single dependency-free Node script. The skill's only job is to run the right subcommand and print its stdout to the user verbatim.

  • Detection is from the OS, not a registry: ps finds the claude CLI process trees and lsof recovers each one's working directory plus the conversation transcript (~/.claude/projects/<enc>/<uuid>.jsonl) it holds open — the transcript basename is the session id. This correctly separates multiple sessions sharing one directory (each tree holds its own transcript open). The Electron desktop app and daemon "spare" processes are filtered out.
  • Restore reopens every session as a tab in ONE Ghostty window. The first session opens the window (open -na Ghostty --args -e zsh -lc "…cd <dir> && exec <abs claude> --resume <id>"); each remaining session is added as a tab via keystroke automation (osascript → activate Ghostty → Cmd+T → paste the command → Return), because Ghostty has no CLI to open a tab on macOS (+new-window is unsupported there; new_tab exists only as a keybind). The claude path is absolute (resolved + stored at snapshot time) because Ghostty's zsh -lc is a non-interactive login shell that does not source ~/.zshrc, so claude would not be on PATH otherwise.
  • State lives at a stable path ~/.cas/phoenix/ (snapshot.json, ARMED flag, a copy of the script, restore.log). The login agent is ~/Library/LaunchAgents/com.cas.phoenix.restore.plist.

Read the full file on GitHub · 115 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 115 lines · 118 tokens per session scan A 67b1dc7ea58d

Subscribe to this mod's changes

phoenix is a skill published in the GitHub repository Kasempiternal/Claude-Agent-System (15 stars, last pushed 1mo ago), licensed MIT. It adds 118 tokens to every session and 2,087 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories