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
- Careful — Activate destructive command warnings for the session 2.8k ★
- Claude Code Project Boundary — Claude Code plugin: scope-aware protection — allows destructive ops (rm, mv, chmod) within project, blocks the 86 ★
- Guard — Safety guardrails — blocks destructive commands (rm -rf, DROP TABLE, force-push) and optionally restricts edit 63 ★
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
Prompt Injection Guard
Detect prompt injection, hardcoded secrets, destructive commands and exfiltration patterns in any text or file
Ring Ring Claude
A tool that adds sound notifications to the Claude Code CLI. When the command line requires user confirmation
Ccc Careful
Activate careful/safety mode. Blocks destructive commands and requires explicit confirmation before mutations.
Lifeos Guardrails
Six battle-tested Claude Code guardrail hooks: block destructive commands without confirmation, protect core c
Device Wipe
Wipe or retire a device in Intune — choose Full Wipe (work-owned) vs Retire/selective (BYOD), with a destructi
Danger Guard Plugin
Deterministic pre-exec interception of destructive shell commands for OpenClaw agents. Gateway-level pattern m
Related Agents
Crispener
Refactoring operator that absorbs invariants from business logic into existing schemas — decode/guard-wall del
Git Pusher
Use for git push operations only. Operator confirmation is REQUIRED for every push. A Bash command denied by t
Godot Game Builder
Builds a playable Godot 4.7 game, or a complete feature in one, end to end from a description - scaffolds the