safe-rm
Safe RM
Overview
Wrapper around rm -rf with safety checks. Use this instead of direct rm -rf commands.
When to Use
- Deleting directories or files recursively
- Any
rm -rforrm -roperation - Cleaning up temporary files/folders
Usage
# Dry-run (default) - shows what would be deleted
safe-rm /path/to/delete
# Actually delete (if path is not protected)
safe-rm --force /path/to/delete
safe-rm -f /path/to/delete
Protected Paths
The script blocks deletion of:
System: /, /bin, /boot, /dev, /etc, /lib, /opt, /proc, /root, /sbin, /sys, /usr, /var, /home, /Users
Home config: ~, ~/.ssh, ~/.gnupg, ~/.config, ~/.local, ~/.claude, ~/.zshrc, ~/.bashrc
Project: .git, git repository root
Exit Codes
0— success (or dry-run completed)1— path is protected2— path does not exist
Instructions for Claude
- NEVER use
rm -rfdirectly — always usesafe-rmscript - Run without
--forcefirst to preview what will be deleted - If path is protected, inform user and do not proceed
- Only use
--forceafter confirming dry-run output is correct
More from beshkenadze/claude-skills-marketplace
gitea-tea
Manage Gitea via CLI. Use when user mentions "tea", "gitea cli", or needs terminal-based Gitea operations.
101zenstack
ZenStack access policies and enhanced Prisma ORM. Use when defining access control rules (@@allow/@@deny), integrating with tRPC, setting up auth(), or working with ZModel schemas.
23swiftui-developer
Develop SwiftUI applications for iOS/macOS. Use when writing SwiftUI views, managing state, or building Apple platform UIs.
17wget-reader
Fetch data from URLs. Use when asked to download content, fetch remote files, or read web data.
17gitea-wiki
Manage Gitea wiki pages. Use when working with wiki content, creating documentation, or updating wiki pages.
14ios-design-review
Review iOS code for Apple HIG compliance. Use when validating SwiftUI/UIKit code, checking accessibility, or auditing iOS design implementation.
12