safe-file-deletion
Prevents accidental data loss by enforcing user confirmation before deleting files.
Install
mkdir -p .claude/skills/safe-file-deletion && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5892" && unzip -o skill.zip -d .claude/skills/safe-file-deletion && rm skill.zipInstalls to .claude/skills/safe-file-deletion
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Enforces explicit user permission before any file deletion. Activates when you're about to use rm, unlink, fs.rm, or any operation that removes files from disk. MUST be followed for all delete operations.Key capabilities
- →Intercept destructive file system commands
- →Request explicit user permission for deletions
- →Batch multiple file paths into a single prompt
- →Enforce safety checks for rm and unlink operations
How it works
It intercepts file removal commands and forces a call to a permission request function, requiring explicit user approval before proceeding.
Inputs & outputs
When to use safe-file-deletion
- →Safely delete project files
- →Confirm file removal during cleanup
- →Protect sensitive data from accidental deletion
About this skill
Safe File Deletion
Rule
Before deleting ANY file, you MUST:
- Call
request_file_permissionwithoperation: "delete" - For multiple files, use
filePathsarray (not multiple calls) - Wait for response
- Only proceed if "allowed"
- If "denied", acknowledge and do NOT delete
Applies To
rmcommands (single or multiple files)rm -rf(directories)unlink,fs.rm,fs.rmdir- Any script or tool that deletes files
Examples
Single file:
{
"operation": "delete",
"filePath": "/path/to/file.txt"
}
Multiple files (batched into one prompt):
{
"operation": "delete",
"filePaths": ["/path/to/file1.txt", "/path/to/file2.txt"]
}
No Workarounds
Never bypass deletion warnings by:
- Emptying files instead of deleting
- Moving to hidden/temp locations
- Using obscure commands
The user will see a prominent warning. Wait for explicit approval.
When not to use it
- →When automated, non-interactive file cleanup is required
Limitations
- →Cannot be bypassed by moving files to hidden locations
- →Requires user interaction for every deletion operation
How it compares
It prevents accidental data loss by mandating an interactive verification step that cannot be bypassed by standard command-line flags.
Compared to similar skills
safe-file-deletion side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| safe-file-deletion (this skill) | 1 | 5mo | No flags | Beginner |
| 1password | 27 | 2mo | Review | Intermediate |
| senior-security | 31 | 7mo | Review | Advanced |
| fix-dependabot-alerts | 18 | 6mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by MemTensor
View all by MemTensor →You might also like
1password
openclaw
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
senior-security
davila7
Comprehensive security engineering skill for application security, penetration testing, security architecture, and compliance auditing. Includes security assessment tools, threat modeling, crypto implementation, and security automation. Use when designing security architecture, conducting penetration tests, implementing cryptography, or performing security audits.
fix-dependabot-alerts
microsoft
Fix Dependabot security alerts by updating vulnerable npm dependencies. Use when the user mentions "dependabot", "security alerts", "vulnerability", "CVE", or wants to update packages with security issues.
red-team-tools-and-methodology
davila7
This skill should be used when the user asks to "follow red team methodology", "perform bug bounty hunting", "automate reconnaissance", "hunt for XSS vulnerabilities", "enumerate subdomains", or needs security researcher techniques and tool configurations from top bug bounty hunters.
wsdiscovery
BrownFineSecurity
WS-Discovery protocol scanner for discovering and enumerating ONVIF cameras and IoT devices on the network. Use when you need to discover ONVIF devices, cameras, or WS-Discovery enabled equipment on a network.
trivy-offline-vulnerability-scanning
benchflow-ai
Use Trivy vulnerability scanner in offline mode to discover security vulnerabilities in dependency files. This skill covers setting up offline scanning, executing Trivy against package lock files, and generating JSON vulnerability reports without requiring internet access.