Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By moah0911v0.7.0MITIn 1 marketplace
Recovers a coding agent from failures by reverting only the damage and returning to the last working state. Hooks on every Bash and edit call guard against destructive commands like force pushes and rm -rf, with an allowlist for exceptions.
Trending plugins
7-day copy clicks
You run one by typing its /name in Claude Code.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.

Most agent skills teach how to build. Aftermath teaches how to stop and recover when something already broke: a test suite goes green → red, the same error recurs, a build or dependency resolution fails, a test is flaky, a merge conflicts, a destructive command looms, or the user says "you broke it".
██ ████ █████ ████ ███ █ █ ██ █████ █ █
█ █ █ █ █ █ █ ██ ██ █ █ █ █ █
███ ███ █ ███ ███ █ █ █ ████ █ ████
█ █ █ █ █ █ █ █ █ █ █ █ █ █
█ █ █ █ ████ █ █ █ █ █ █ █ █ █
stop · revert · recover
| Namespace | Identifier | Used for |
|---|---|---|
| npm | @after.math/aftermath | The npm package: npm i @after.math/aftermath, npx @after.math/aftermath init |
| GitHub | moah0911/aftermath | The repo: source for Claude Code / Codex marketplaces, skills, curl installer |
The npm scope is the publisher's npm account (after.math); the GitHub org is moah0911. They are different namespaces — use the npm scope for npm commands and the GitHub org for marketplace/source commands.
Version status: use ≥ 0.7.0. npm versions are immutable, so older releases stay visible on the versions tab (along with npm's
0.0.0-stageplaceholder from the first publish).
0.5.1— project wiring pointed into the ephemeral npx cache; a realinitcrashed after wiring.0.5.2–0.5.3— wiring fixed, but before the npm install hooks existed.0.6.x—npm iwires the agents, but the Claude enable entry was written intonode_modulesinstead of the project.0.7.0— current: project-scoped wiring, host auto-detection, no cross-agent installs.Full history:
CHANGELOG.md.
npm i @after.math/aftermath # project scope: wires the agent(s) in this project
npm i -g @after.math/aftermath # global: installs the CLI; run `aftermath-install` for user scope
The install script wires whichever agents it finds on your machine:
| Agent | What happens on npm i |
|---|---|
| OpenCode | Plugin, commands, hooks, and skills are copied into the project; opencode.json gets "plugin": ["./.opencode/plugins/aftermath.mjs"] (a relative path — no symlinks into node_modules, which npm prunes) |
| Claude Code | claude plugin install aftermath --marketplace moah0911/aftermath --scope project (Claude ≥ 2.1.292; older versions fall back to claude plugin marketplace add moah0911/aftermath + claude plugin install aftermath@aftermath) |
| Codex | codex plugin marketplace add moah0911/aftermath + codex plugin add aftermath@aftermath (Codex has no project scope — this is user scope) |
Not installed? Nothing is touched for that agent — the summary just says "not detected".
Opt out entirely with AFM_SKIP_INSTALL=1 or npm's --ignore-scripts.
aftermath-install # wire every detected agent for the current user
aftermath-install --host codex # one agent
aftermath-install --dry-run # show what would change
aftermath-install --uninstall # remove the wiring
User-scope OpenCode wiring stages a durable copy under ~/.config/aftermath/runtime/ and points ~/.config/opencode/opencode.json at it.
npx @after.math/aftermath init # detect stack + write .aftermath/config.json
npx @after.math/aftermath init --dry-run --json
npx @after.math/aftermath init --run-tests # also record a baseline (opt-in)
init wires only the agent you are running in — it detects OpenCode,
Claude Code (CLAUDECODE), or Codex (CODEX_*) and never touches another
agent's configuration. Use --host opencode|claude|codex|all (or
AFTERMATH_HOST=<host>) to choose explicitly.
Init detects test/build commands, disposable artifacts, and protected paths, then writes
.aftermath/config.json. From then on, rm -rf node_modules or rm -rf dist is allowed
while rm -rf src, .env, .git, and unknown targets stay blocked. It never runs
destructive commands and never enables autoRevert.
Full flags, detection matrix, config schema, and policy reasons: docs/init.md.
7-day copy clicks
Plugins from other owners that cover similar ground
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub moah0911/aftermath --plugin aftermath