/aftermath:aftermath runs instead · from aftermath
Post-failure recovery skill that stops forward-editing, reverts cheap damage, and returns to last-known-good. Use when tests break, errors repeat, or destructive commands are blocked.
This skill never runs in Claude Code
It ships in aftermath at skills/, but /aftermath:aftermath (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
Recovery after failure. Most skills teach how to build. This one teaches how to stop when you broke something.
ACTIVE EVERY RESPONSE while a failure is unresolved. No drift back to forward-editing. Still active if unsure. Off only via /aftermath off. Default: full. Switch: /aftermath lite|full|ultra|off.
Stop at the first rung that holds. Re-read it mid-panic before your next edit:
The OpenCode plugin turns the ladder's stop rules into tool guards at full and ultra:
lite only flags it; off disables the guard.edit/write is blocked while a failure is unresolved. Clear the guard by getting a test command green, running /aftermath-revert, or dropping to lite/off.~/.config/aftermath/config.json → destructiveAllowlist (array of command substrings).aftermath init / /aftermath-init writes project safePaths (disposable artifacts) and protectedPaths (source, VCS, secrets, manifests). Filesystem deletes under safe paths are allowed; protected or unknown targets stay blocked.PreToolUse for the same path policy and forward-edit freeze, and PostToolUse / UserPromptSubmit to deliver failure and correction reminders. They do not checkpoint files.Checkpoints are OpenCode-only and opt-in:
{"autoRevert": true} in ~/.config/aftermath/config.json. Default is off.ultra, every edited file is snapshotted before the edit. A passing test marks last-known-good and clears old snapshots.full, and autoRevert: false never restore./aftermath-checkpoint status|clear|restore inspects, clears, or manually restores the store./aftermath-revert, or /aftermath off resets the ledger.git diff first, smallest revert that restores last-known-good.State first, then act: what broke (one line), what was undone (one line), what is next (one line). If the explanation is longer than the fix, the fix is not isolated yet.
Pattern: broke: [X] → undid: [Y] → next: [Z].
For an auto-revert: broke: [X] → restored: [N files, conflicts] → next: re-run the failing subset.
| Level | What changes |
|---|---|
| lite | Flags the problem, suggests the revert, lets the user decide. No blocks, no auto-revert. |
| full | Stops forward motion automatically, blocks destructive commands and forward edits, runs the diagnostic (diff, isolate), asks before the next edit. Default. |
| ultra | Same guards as full, plus checkpoint auto-revert when autoRevert: true. Restores cheap uncommitted damage, then reports what was undone and why. |
Example: test suite went green to red after an edit.
Anything explicitly committed, pushed, or marked irreversible by the user is not auto-reverted — not even on ultra. Confirm first. A revert you do not understand is a second bug. If a guard blocks work you believe is safe, confirm state and use the allowlist or /aftermath lite; do not disguise the command.
Aftermath governs recovery, not construction. Once the session is back to last-known-good (tests green, diff clean, user confirms), stand down and return to the building skill. Level persists until changed or session end. Checkpoints and forward-edit enforcement are OpenCode capabilities; other hosts get the ladder and destructive-command blocking.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
8 skills in this plugin
/build-failureUse when compilation, typechecking, bundling, or another build step fails. Read the first error, isolate the hunk, and do not run tests until the build is green. Distinct from a test regression: the code never ran.
/dependency-failureUse when an install, lockfile, resolver, or package-manager step fails: ERESOLVE, version conflicts, missing distributions, registry or network errors. Paste the exact resolver error, respect the lockfile, and change one thing at a time.
/destructive-actionUse when the next action is irreversible: force push, reset --hard, clean, drop, delete, rm, overwrite, schema migration, or permission change. Confirm current state explicitly and never proceed on assumption. Also covers scope creep and the forward-edit freeze that follows an unresolved failure.
/flaky-testUse when the same test alternates between pass and fail without code edits, or when a failure cannot be reproduced. Rerun to confirm, find the source of nondeterminism, and never revert working code on an unconfirmed flake.
/merge-conflictUse when a merge, rebase, or cherry-pick stops on conflicts. Read both sides, never blindly take ours or theirs, never reset/abort to escape, and run the affected tests after resolving.
/retry-loopUse when the same error message recurs after a fix attempt, or this is the 2nd+ try at the same fix. Stop varying the fix, state the exact error and the theory, then ask instead of trying a third variation. Includes an attempt-ledger protocol.
npx claudepluginhub moah0911/aftermath --plugin aftermathOther plugins' skills for the same job