/aftermath:destructive-actionfrom aftermath
Guards irreversible actions like force push, reset --hard, DROP TABLE, rm -rf, and terraform destroy. Requires explicit state confirmation and offers safer alternatives.
Ships in aftermath. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Irreversible means unrecoverable. Slow down to the speed of verification.
git status --short, git diff --stat, remote/branch/database target. No proceeding on assumption.full, ask before running. At ultra, still ask — ultra auto-reverts cheap damage only, never auto-destroys.| Risk | Examples | Safer first move |
|---|---|---|
| History rewrite | git push --force, git reset --hard | New commit; git revert; back up the branch |
| Worktree wipe | git clean -fd, git checkout -- ., git restore . | git clean -n, git stash -u, revert specific files |
| Data loss | DROP TABLE, DELETE FROM, TRUNCATE, dropdb | Dump first; run in a transaction; target a copy |
| Filesystem | rm -rf, shred, dd of=, mkfs, find -delete, xargs rm | Name the absolute path; ls it first; move to trash |
| Infrastructure | terraform apply/destroy, kubectl delete, helm uninstall, docker system prune | terraform plan, --dry-run=client, inspect the target |
| Migrations | prisma migrate reset | migrate status, back up, apply forward |
| Permissions | chmod -R 777 | Narrow the mode and the path |
full/ultra; lite only flags them.PreToolUse (exit 2) with the same policy.aftermath init / /aftermath-init to record the project's safePaths (disposable artifacts) and protectedPaths (source, VCS, secrets, manifests). Deletes under safe paths are allowed; protected, unknown, dynamic, and outside-project targets stay blocked.{"destructiveAllowlist": ["rm -rf ./dist"]} in the global or project config. Entries are command substrings; keep them narrow.After a test regression or an escalated repeat error, OpenCode and Claude Code / Codex block edit/write at full/ultra until a test passes, /aftermath-revert runs, or the level drops. Reverting through Bash is allowed. Do not bypass the freeze by editing through another tool or path.
git diff --name-only against task start. List every file outside the stated scope./aftermath-audit), not into this fix.Never force-push, drop, or rm -rf on a guessed path. A destructive command with an unverified target is rung 5 (guessing) plus rung 4 (irreversible) — stop on both.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub moah0911/aftermath --plugin aftermath8 skills in this plugin
/aftermathPost-failure recovery when something already broke: a test suite went green to red, the same error repeats after a fix, a destructive command was blocked, a forward edit is frozen, the user says "you broke it", or the fix touched files outside scope. Stop, revert cheap damage, diagnose honestly, return to last-known-good. Supports intensity levels lite, full (default), ultra, plus opt-in checkpoint auto-revert. Use ONLY for recovery after failure, not for planning new work.
/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.
/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.
Other plugins' skills for the same job