Destructive Guard — Development skill for Claude Code
Claude Code plugin: detect destructive/deletion bash commands → y/n confirmation (works in bypassPermissions) + sound/banner.
How to install Destructive Guard
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open vakovalskii/destructive-guard and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Destructive Guard does
Claude Code plugin: detect destructive/deletion bash commands → y/n confirmation (works in bypassPermissions) + sound/banner.
Alternatives in Development
README
destructive-guard
`PreToolUse` Bash-хук для Claude Code: детектит команды на удаление и вместо глухого блока поднимает интерактивное подтверждение **y/n** — работает даже в `bypassPermissions`. При детекте — звук + macOS-баннер.
Разбор по токенам (первый токен каждой простой команды после split по `; && || | & ( ) \``), поэтому `perform`/`transform`/`terraform` **не** ловятся.
📖 **Лендинг + интерактивный справочник всех правил:** https://vakovalskii.github.io/destructive-guard/
Что ловит
| Класс | Команды |
|---|---|
| Файлы | rm, rmdir, shred, unlink, srm, truncate, dropdb |
| find | find … -delete, find … -exec rm|unlink|shred|srm|rmdir |
| git | git rm, git clean -f, git reset --hard, git push --force/-f, git branch -D, git filter-branch, git stash clear, git update-ref -d |
| docker/podman | rm/rmi, (volume|image|system|network|container|builder) prune, (volume|image|network|container) rm, compose down -v |
| SQL | DROP TABLE|DATABASE|SCHEMA, TRUNCATE, DELETE FROM (при наличии db-клиента: psql/mysql/mongosh/sqlite3/…) |
| NoSQL/кэш | mongo dropDatabase()/.drop()/deleteMany(); redis-cli FLUSHALL|FLUSHDB |
| Диск/ФС | dd of=/dev/…, mkfs/mkfs.*, wipefs, blkdiscard |
| Kubernetes | kubectl delete … |
| IaC | terraform|tofu|terragrunt destroy (и apply -destroy), pulumi destroy |
| Cloud | aws s3 rb/rm --recursive, aws … delete-*/terminate-*/remove-*; gcloud … delete; az … delete |
| Прочее | crontab -r |
Закрытые обходы: `\rm`, `git -C path reset`, `docker --context prod rm`, `kubectl -n prod delete`, `terraform -chdir=infra destroy`, `bash -c "rm …"`, `bash <<< "rm …"` (here-string), `… \| xargs rm`.
**Вне охвата** (осознанно, чтобы не убить signal-to-noise): деструктив внутри файла/скрипта (`python x.py`, `psql -f f.sql`, `bash x.sh`), редиректы `>`, `docker compose down` без `-v`, `git push --force-with-lease`.
Severity-тиринг
Каждый детект по
Related Skills
Ccc Careful
Activate careful/safety mode. Blocks destructive commands and requires explicit confirmation before mutations.
Ring Ring Claude
A tool that adds sound notifications to the Claude Code CLI. When the command line requires user confirmation
Lifeos Guardrails
Six battle-tested Claude Code guardrail hooks: block destructive commands without confirmation, protect core c
Guard
Safety guardrails — blocks destructive commands (rm -rf, DROP TABLE, force-push) and optionally restricts edit
Danger Guard Plugin
Deterministic pre-exec interception of destructive shell commands for OpenClaw agents. Gateway-level pattern m
Claude Code Haiku Guard
Safe-by-default Bash permission guard for Claude Code powered by Claude Haiku — auto-approves routine commands
Related Agents
Crispener
Refactoring operator that absorbs invariants from business logic into existing schemas — decode/guard-wall del
Bug Verifier Agent
Expert in verifying bug fixes. Use when a bug has been fixed and needs confirmation that the solution works an
Metago Marketing Designer
Marketing Material Designer - specializes in poster, banner, social graphic, and infographic design