Skip to content
Skills Library
Programming · Automation

destructive-action

/destructive-action

Use 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.

Repository
aftermath ↗
Licence
MIT
Last repository change
07.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 07.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use 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.

Original author description

Use 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.

How it works

  1. Before any destructive command
  2. High-risk catalog and safer alternatives
  3. Enforcement and allowlist
  4. Forward-edit freeze
  5. Scope-creep check (same skill, same caution)
Original SKILL.md headings · 45 lines, 494 words
SKILL.md preview
---
name: destructive-action
description: >
  Use 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.
license: MIT
---

# Destructive Action

Irreversible means unrecoverable. Slow down to the speed of verification.

## Before any destructive command

1. Stop. Name the command and what it destroys, in plain terms.
2. Confirm current state explicitly: `git status --short`, `git diff --stat`, remote/branch/database target. No proceeding on assumption.
3. Check cheapness: uncommitted / one file / cheap to undo? If not cheap, require explicit user confirmation with the target named back.
4. At `full`, ask before running. At `ultra`, still ask — ultra auto-reverts cheap damage only, never auto-destroys.
5. After running, report what changed and how to verify it.

## High-risk catalog and safer alternatives

| 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 |

## Enforcement and allowlist

- OpenCode blocks matching commands at `full`/`ultra`; `lite` only flags them.
- Claude Code / Codex block them through `PreToolUse` (exit 2) with the same policy.
- Run `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.
- Intentional exceptions: `{"destructiveAllowlist": ["rm -rf ./dist"]}` in the global or project config. Entries are command substrings; keep them narrow.
- A blocked command is a stop sign, not a puzzle. Confirm state or ask the user; do not rephrase to slip past the matcher.

## Forward-edit freeze

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.

## Scope-creep check (same skill, same caution)

1. `git diff --name-only` against task start. List every file outside the stated scope.
2. Revert or justify each one out loud. "While I was here" is not a justification.
3. Fix only the breaking diff. Move everything else to the audit (`/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.

Versions

RepositoryScoreLicence
This page · moah0911/aftermath100MIT
moah0911/aftermath90MIT

Database snapshot: 13.11.2026 · package version 269820c65213 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90git-safety
    Git safety rules. INVOKE WHEN: git push, force push, git reset, git clean, destructive git, push force, reset hard. NEVER force push or do destructive git operations.
  • 100git-guard
    Ask before a destructive git write and summarize the diff first. Use before git push --force, git push --force-with-lease, push or amend of main, master, or release/*, git push --delete, git push origin :branch, git reset --hard, git clean -fdx, git filter-repo, git remote…
  • 100git-guardrails
    Install a PreToolUse hook that vetoes destructive git: no-verify, branch -D, clean -f, reset --hard, history rewrite, force-push. Meant for any repo or agent that the hub guard misses. Use it to protect a project from destructive git, or to enforce no-force-push outside the hub, at the tool layer.
  • 100git-guardrails
    Install a hook that blocks destructive git commands before an AI agent runs them. Use when an agent force-pushed or ran reset --hard, when adding git safety hooks, or when protecting main from agent pushes.
  • 100git-workflow
    Writes commit messages, manages branches, and opens pull requests with summaries. Use when the user asks to commit, push, branch, or create a PR, and before any destructive git operation such as reset, rebase, or force-push.
  • 100backup-code
    Create a safety backup before potentially destructive actions. Use when running risky git commands (reset, rebase, clean, restore, checkout with overwrite, force push), applying large sweeping edits, mass refactors, broad search-and-replace, generator rewrites, or any operation…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.