recover

recover is a command for Claude Code from waazy-w/claude-phantom. It costs 32 tokens per session (813 once invoked), scanned A, original, MIT.

An interactive command for recovering from a software crash by investigating the error, writing a test that reproduces it, applying a fix on a separate branch, and checking the result.

In plain words
What is it for?
Use it with a crash file or pasted error output to inspect the failure, create a failing test, patch the code, run verification, and produce a post-mortem.
Why use it?
It gives a repeatable path from a crash report to a verified correction and a written explanation of what happened.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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 phantom plugin — 1 skill, 1 command, 3 hooks shipped together

Good fit Use it with a crash file or pasted error output to inspect the failure, create a failing test, patch the code, run verification, and produce a post-mortem.

Compare 6 commands from other repositories ↓
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 waazy-w/claude-phantom
Claude Code
/plugin install phantom

Made for: Claude Code.

Or install phantom, the plugin that ships this one along with the rest of its 1 skill, 1 command, 3 hooks.

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 recover

README.md
[![agentmods](https://agentmods.dev/badge/commands/waazy-w/claude-phantom/recover/github.svg)](https://agentmods.dev/commands/waazy-w/claude-phantom/recover)
Your own site
<a href="https://agentmods.dev/commands/waazy-w/claude-phantom/recover"><img src="https://agentmods.dev/badge/commands/waazy-w/claude-phantom/recover/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for recover

Your own site · 80×15
<a href="https://agentmods.dev/commands/waazy-w/claude-phantom/recover"><img src="https://agentmods.dev/badge/commands/waazy-w/claude-phantom/recover.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 813 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00032 $0.00813
Opus 5 $0.00016 $0.00407
Sonnet 5 $0.00006 $0.00163
Haiku 4.5 $0.00003 $0.00081

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

Security

Grade A, and why

recover 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 9d ago.

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.

plugin/commands/recover.md · 34 lines

How it starts

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

Recover from a crash using the crash-recovery skill. You are running interactively, so you own the git branch setup that phantom's CLI would otherwise handle.

Input

$ARGUMENTS

  • If the argument is a path ending in .json, read it: it is a phantom CrashContext (command, exit summary, errorLine, stackTrace, hintFiles, tail, git, pkg, testCommand).
  • If the argument is empty, find the newest file in .phantom/crashes/ (ls -t .phantom/crashes/*.json | head -1) and read it. If there is none, ask the user to paste the error or run the crashing command.
  • Otherwise treat the argument as pasted error output: extract the error line, stack trace, and file paths yourself.

Setup (interactive only)

  1. Run git status --porcelain. If the tree is dirty, stop and ask the user to commit or stash first (never stash for them).
  2. Record the base: git rev-parse --abbrev-ref HEAD and git rev-parse HEAD.
  3. Derive a slug from the error line (lowercase, a-z0-9-, at most 48 chars) and create the branch: git checkout -b phantom/fix-<slug>. This is the ONE git mutation you may perform in this command; it is forbidden inside the skill's phases.
  4. Determine the test command: .phantomrc testCommand, else package.json scripts.test (npm test), else node --test test/*.test.js.
  5. Never-touch paths: .env, .env.*, **/*.pem, **/*.key, **/secrets/**, **/*.secret*, .git/**, node_modules/**, plus any neverTouch in .phantomrc.

Procedure

Follow the crash-recovery skill phases 0 through 5 exactly, with at most 3 verification attempts. Write the report to .phantom/reports/<YYYYMMDD-HHmmss>-<slug>.md using the template at ${CLAUDE_PLUGIN_ROOT}/templates/post-mortem.md, which ships with this plugin. If it cannot be read, fall back to templates/post-mortem.md in the repo, and only then to the same section order from memory.

Finish

  1. Show git diff --stat and the report path.
  2. Ask the user whether to commit on the phantom branch (git add -A && git commit -m "phantom: fix <error>"). Do not commit without a yes.
  3. Remind them how to review: git diff <base>..phantom/fix-<slug>, git merge, or git branch -D to discard. Do not switch branches back yourself; the user decides.

Read the full file on GitHub · 34 lines

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. 9d ago First seen · 34 lines · 32 tokens per session scan A d60bf34bb706

Subscribe to this mod's changes

recover is a command published in the GitHub repository waazy-w/claude-phantom (4 stars, last pushed 17d ago), licensed MIT. It adds 32 tokens to every session and 813 once invoked, about $0.0002 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-31.