safe-delete
CommunityPrevent accidental permanent file deletion
Authorzot24
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Prevent catastrophic file deletion by intercepting unsafe rm invocations, blocking high-risk patterns, and turning recoverable removals into trash operations to enable easy recovery.
Core Features & Use Cases
- Blocks dangerous patterns including rm -rf /, rm -rf ~, sudo rm -rf, and other root- or wildcard-level deletions.
- Transforms safe rm to trash so deleted files are moved to the system Trash/Recycle Bin and can be restored.
- PreToolUse hook integration intercepts Bash commands before execution and supports per-project and global configuration.
- Configurable and auditable with customizable blocked patterns, allow-lists, and logging of decisions for compliance and debugging.
- Use case: A developer who accidentally types rm -rf ./node_modules will have the command converted to a trash invocation instead of permanently removing files.
Quick Start
Use the safe-delete skill to convert the command rm -rf ./dist into a recoverable trash invocation.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: safe-delete Download link: https://github.com/zot24/skills/archive/main.zip#safe-delete Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.