SA

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.zip

Installs 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.
204 chars✓ has a “when” trigger
Beginner

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

You give it
File path or list of file paths to delete
You get back
Permission approval or denial status

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:

  1. Call request_file_permission with operation: "delete"
  2. For multiple files, use filePaths array (not multiple calls)
  3. Wait for response
  4. Only proceed if "allowed"
  5. If "denied", acknowledge and do NOT delete

Applies To

  • rm commands (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.

SkillInstallsUpdatedSafetyDifficulty
safe-file-deletion (this skill)15moNo flagsBeginner
1password272moReviewIntermediate
senior-security317moReviewAdvanced
fix-dependabot-alerts186moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

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.

2799

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.

3191

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.

1872

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.

759

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.

16

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.

14

Search skills

Search the agent skills registry