| name | safety |
| description | Prevents destructive operations by requiring confirmation and verification before executing risky commands. |
| origin | fraudctl-project |
Safety Guidelines
This skill prevents data loss by requiring verification before destructive operations.
When to Activate
- Before executing any
rm -rf command
- Before executing any command that deletes files or directories
- Before executing any command that modifies git history (e.g.,
git reset --hard)
- Before executing any command that could lose unsaved work
Critical Rules
NEVER execute without verification:
rm -rf some_directory
ls -la some_directory
Before any destructive command:
- LIST - List what's being affected
- VERIFY - Check the path is correct
- ASK - Ask for user confirmation if uncertain
ls -la path/to/directory
Safe Patterns
rm -ri directory/
find directory/ -type f -ls
mv directory/ ~/.trash/
git ls-files directory/
Commands that REQUIRE confirmation:
| Command | Risk | Action |
|---|
rm -rf | Permanent deletion | List + Ask |
git reset --hard | Lose uncommitted changes | Show status first |
git clean -fd | Delete untracked files | List first |
dd if= of= | Overwrite files | Verify twice |
> file | Truncate file | Ask before |
Before Deleting Directories
Always check:
- Is it in
.gitignore?
- Does it contain uncommitted changes?
- Is it a dependency directory (node_modules, vendor, etc.)?
- Is it the only copy of important data?
git status directory/
git ls-files directory/
du -sh directory/
Quick Reference
Rule: When in doubt, ASK. Never delete something you can't recover.
Before rm -rf:
ls -la to see what's there
- Check if tracked by git
- Ask user for confirmation
After accidental deletion:
- Don't panic
git status may show recoverable files
- File system tools may recover recent deletions