Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By TeXmeijinv0.2.0MITIn 1 marketplace
Safe remove command wrapper for AI coding agents. Prevents accidental deletion of important files by enforcing safety checks on dotfiles, git-managed files, directories outside cwd, and special directories.
Run automatically on Claude Code events. Claude doesn't decide.
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Catch 99% of accidental deletions with one simple install.
Stop AI agents from accidentally deleting .env files, git-tracked code, or critical system files. This plugin adds automatic safety checks to every rm command in Claude Code sessions.
Zero configuration. Zero learning curve. Just install and forget.
AI agents are powerful, but they can make costly mistakes:
# Claude executes: rm .env
# 💥 Your API keys are gone
# Claude executes: rm -rf ../important-project
# 💥 Wrong directory deleted
# Claude executes: rm src/config.ts
# 💥 Git-tracked file removed without confirmation
One accidental deletion can cost hours of recovery work.
A lightweight safety layer you can "just install and forget":
You might be using these common approaches to protect your files:
rm in settings.json{
"permissions": {
"deny": ["Bash(rm *)"]
}
}
Problem: Pattern matching is fragile and can be bypassed:
rm file.txt → ❌ Blockedrm file.txt (extra space) → ✅ Bypassed/bin/rm file.txt → ✅ BypassedIMPORTANT: Never use the rm command to delete files.
Problem: LLM instructions are unreliable:
This plugin works at the shell execution layer — below the LLM:
User Request → Claude (LLM) → Shell Command → [🛡️ THIS PLUGIN] → System
Why it works reliably:
rmrm variants — direct interception, not pattern matchingNote: This doesn't protect against other deletion methods (like find -delete), but it handles 99% of accidental AI deletions with zero productivity cost.
# Add the marketplace
/plugin marketplace add TeXmeijin/safe-rm-claude-plugin
# Install the plugin
/plugin install safe-rm@safe-rm-marketplace
That's it! Your Claude Code sessions now catch most accidental deletions automatically.
After installation, all rm commands in Claude Code are transparently protected:
# You use rm normally
rm .env
# But the plugin automatically blocks dangerous operations
# ❌ FORBIDDEN: You are trying to remove dotfile: .env
# You must ask your leader to run manually: rm /path/to/.env
You don't need to learn new commands or change your workflow. The protection works invisibly in the background.
Unlike silent blocking, this plugin provides actionable feedback that helps Claude understand what went wrong and what to do next:
rm -r large-directory/ # contains 50+ files
# ❌ Error output:
# FORBIDDEN: Directory contains 50 files (limit: 10)
# Directory: /Users/you/project/large-directory
# NEXT ACTION👉: You MUST ask your manager to run manually: rm -rf /path/to/directory
This prevents AI runaway behavior:
The plugin enforces 6 critical safety checks:
| Protection | What It Does |
|---|---|
| 🔒 Dotfiles | Blocks deletion of configuration files (.env, .gitignore, etc.) |
| 🔒 Git-managed files | Requires confirmation before removing tracked files |
| 🔒 Outside project scope | Prevents deleting files outside your current directory |
| 🔒 System directories | Blocks removal of /, ~, and other critical paths |
| 🔒 Gitignored files | Protects important files like node_modules, build outputs |
| 🔒 Large directories | Limits recursive deletion to 10 files (configurable) |
# ❌ Blocked: Dotfile
rm .env
# FORBIDDEN: You are trying to remove dotfile: .env
# You must ask your leader to run manually: rm /path/to/.env
# → Claude learns: "I should ask the user for permission"
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub texmeijin/safe-rm-claude-plugin --plugin safe-rmPlugins from other owners that cover similar ground