safe-rm
1
总安装量
1
周安装量
#45804
全站排名
安装命令
npx skills add https://github.com/beshkenadze/claude-skills-marketplace --skill safe-rm
Agent 安装分布
opencode
1
codex
1
github-copilot
1
gemini-cli
1
Skill 文档
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