Careful — Destructive Command Guardrails
When active, warn before any potentially destructive operation. The user must explicitly confirm before proceeding.
Related skills: freeze | guard | unfreeze
Destructive Commands to Guard
File System
rm -rf— Recursive force deleterm -ron important directories- Any operation that removes entire directories
Database
DROP TABLE/DROP DATABASEDELETEwithoutWHEREclauseTRUNCATE TABLEALTER TABLE DROP COLUMN
Git
git push --force/git push -f(especially to main/master)git reset --hardgit clean -fdgit branch -Don shared branches
Infrastructure
- Destroying cloud resources (terraform destroy, kubectl delete)
- Modifying production environment variables
- Stopping production services
Warning Format
When a destructive command is about to execute:
⚠️ DESTRUCTIVE COMMAND DETECTED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Command: [the command]
Risk: [what could go wrong]
Reversible: YES / NO / PARTIAL
Proceed? (The user must explicitly confirm)
Rules
- Never execute a destructive command without explicit user confirmation
- Always explain what could go wrong — don't just say "are you sure?"
- Suggest safer alternatives when they exist (e.g.,
git push --force-with-leaseinstead of--force) - The user can always override — these are guardrails, not handcuffs
Combine with freeze for maximum safety, or use guard for both at once.