aftermath
Skill14 starsChanged 6 days agoMITView on GitHub
Post-failure recovery when something already broke: test suite went green to red, same error repeats after a fix, build or dependency resolution fails, a test is flaky, a merge conflicts, a destructive command is blocked, a forward edit is frozen, user says "you broke it", or the fix touched files outside scope. Stop, revert cheap damage, diagnose honestly, return to last-known-good. Supports lite/full/ultra, opt-in checkpoint autoRevert. Use ONLY for recovery after failure, not for planning new work.
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- aftermathSkill
- build-failureSkill
- dependency-failureSkill
- destructive-actionSkill
- flaky-testSkill
- merge-conflictSkill
- retry-loopSkill
- test-regressionSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Stop at the first rung that holds, before your next edit:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Aftermath — using the recovery agent
You are operating the Aftermath recovery skill. Most skills teach how to build; this one fires after something already broke. Invoke it when any of these hold: a test suite went green to red, the same error recurred after a fix, a destructive command was blocked, a forward edit was frozen, the user corrected you, or the fix touched files outside scope.
The ladder
Stop at the first rung that holds, before your next edit:
- Uncommitted / one file / cheap to undo? → Revert now. Do not patch forward.
- Last-known-good exists? → Diff it, isolate one change, revert just that.
- 2nd+ failed attempt at the same fix? → State exact error, state theory, ask.
- Next action irreversible? → Confirm state explicitly. Never assume.
- Filling a gap with a guess? → Say so out loud. Never continue silently.
- User just corrected you? → Do not defend. Find the diff. Fix only that.
Honesty: never hide a break. Never silently revert. Never invent an unverified root cause.
Intensity and commands
- Levels:
lite(suggest) ·full(default: stop, diagnose, ask) ·ultra(guards + opt-in checkpoint autoRevert) ·off. Switch:/aftermath [lite|full|ultra|off]. /aftermath-status— what changed since last-known-good ·/aftermath-revert— undo the last change, nothing more ·/aftermath-audit— scope-creep scan ·/aftermath-log— one-line postmortem ·/aftermath-checkpoint status|clear|restore— inspect, clear, or manually restore checkpoints ·/aftermath-init— initialize the project with destructive-safe paths.- Enforcement: OpenCode blocks destructive commands and forward edits at full/ultra; checkpoints restore at ultra when
autoRevertis enabled. Other hosts inject the ladder and block destructive Bash.aftermath initwrites the project's safe/protected paths so artifact deletes are allowed and source is not.
Full behavior (read these, this file is only the entry point)
skills/aftermath/SKILL.md— the canonical skill: persistence, enforcement, checkpoints, attempt ledger, output pattern, intensity table.- Category playbooks:
skills/test-regression/SKILL.md·skills/retry-loop/SKILL.md·skills/destructive-action/SKILL.md·skills/build-failure/SKILL.md·skills/flaky-test/SKILL.md·skills/dependency-failure/SKILL.md·skills/merge-conflict/SKILL.md— loaded when their signal fires. hooks/— lifecycle wiring (instruction builder, mode config, checkpoint store, signal detectors, destructive policy).AFTERMATH.md— the always-on ladder source.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

