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 nitromike502v1.0.0MITIn 1 marketplace
Safe file deletion system that moves files to .deleted/ trash folder instead of permanently deleting them. Includes PreToolUse hook to block rm commands and redirect to safe deletion skill.
Claude loads one when your task matches it, or you run it by name.
1 caution to review before installing
A hook runs when Claude uses the Bash tool
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.
A comprehensive Claude Code plugin that provides safe file deletion by moving files to a recoverable .deleted/ trash folder instead of permanently deleting them. The plugin combines a PreToolUse hook that blocks dangerous rm commands with a skill that provides safe deletion functionality.
rm commands: Prevents rm -rf, rm -fr, and all variations.env file access: Protects sensitive environment files from accidental exposure.deleted/ instead of permanent removal.deleted/.gitignore: Creates/maintains .gitignore in .deleted/ to ignore all contents.deleted/.deleted/ and can be manually restoredThis plugin is installed as a local user plugin at:
~/.claude/plugins/file-deleter/
The plugin should be automatically detected by Claude Code. If not, you may need to restart Claude Code.
When Claude Code attempts to execute dangerous rm commands, the hook will automatically block them and show an error message:
BLOCKED: Dangerous rm command detected and prevented
Use the 'file-deleter' skill instead to safely move files to .deleted/ folder.
The skill will preserve directory structure and allow recovery if needed.
Claude will then automatically use the file-deleter skill to perform safe deletion.
The deletion script can also be invoked directly:
node <skill-base-dir>/scripts/delete-file.js <path1> [path2] [path3] ...
Examples:
# Delete single file
node ~/.claude/plugins/file-deleter/skills/file-deleter/scripts/delete-file.js src/old-component.tsx
# Delete multiple files
node ~/.claude/plugins/file-deleter/skills/file-deleter/scripts/delete-file.js file1.txt file2.js dir/file3.md
# Delete entire directory
node ~/.claude/plugins/file-deleter/skills/file-deleter/scripts/delete-file.js old-features/
# Delete multiple directories and files
node ~/.claude/plugins/file-deleter/skills/file-deleter/scripts/delete-file.js temp/ build/ old-file.txt
The deletion script automatically finds the project root by searching upward from the current working directory for both .git and .claude directories. This ensures the .deleted/ folder is created at the project root regardless of where the script is executed from.
.deleted/.gitignore in .deleted/ to ignore all contentsThe PreToolUse hook blocks:
Dangerous rm patterns:
rm -rf, rm -fr, rm -Rf and all flag variationsrm --recursive --force and similar long-form flagsrm -r with dangerous paths (root, home, wildcards, parent references)Protected files:
.env files (but allows .env.sample).env filesTo recover deleted files:
.deleted/ in your project rootExample:
# Original file was at: src/components/Button.tsx
# After deletion it's at: .deleted/src/components/Button.tsx
# To recover:
mv .deleted/src/components/Button.tsx src/components/Button.tsx
file-deleter/
├── .claude-plugin/
│ └── plugin.json # Plugin manifest
├── hooks/
│ └── hooks.json # PreToolUse hook configuration
├── scripts/
│ └── hook_pre_tool_use.js # Hook script that blocks rm commands
├── skills/
│ └── file-deleter/
│ ├── SKILL.md # Skill definition
│ └── scripts/
│ └── delete-file.js # Safe deletion script
└── README.md # This file
The hook uses the following environment variables:
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 nitromike502/meckert-claude-code-marketplace --plugin file-deleterPlugins from other owners that cover similar ground