safe-file-deletion

Require explicit user permission before file or directory deletion operations.

5|1|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/xztxy/openwork --skill safe-file-deletion-xztxy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safe-file-deletion
Source: https://github.com/xztxy/openwork/tree/main/packages/agent-core/mcp-tools/safe-file-deletion
Command: npx skills add https://github.com/xztxy/openwork --skill safe-file-deletion-xztxy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents accidental or unauthorized deletion of files and directories by requiring explicit user confirmation before any removal operation.

Core Features & Use Cases

  • Explicit Permission: Ensures that no file is deleted without direct user consent.
  • Scope Enforcement: Applies to all common deletion commands and functions, including rm, rm -rf, unlink, and fs.rm.
  • Use Case: When an agent attempts to delete a project directory using rm -rf, this skill will trigger a confirmation prompt, preventing irreversible data loss.

Quick Start

Use the safe-file-deletion skill to request permission before deleting the file '/home/user/old_data.txt'.

Frequently Asked Questions about safe-file-deletion

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I require confirmation before running rm or unlink file deletion commands?

To require file deletion confirmation, you need a mechanism that intercepts commands like `rm`, `rm -rf`, `unlink`, and `fs.rm` to enforce explicit user permission before proceeding.

How can I prevent accidental data loss from rm -rf directory removal?

Preventing accidental data loss from `rm -rf` requires enforcing an explicit user confirmation step that requests direct permission before any directory or file removal operation is executed.

Does safe file deletion work with programmatic functions like fs.rm and unlink?

Safe file deletion applies to programmatic file system operations such as `unlink` and `fs.rm`, ensuring explicit user permission is requested via `request_file_permission` before any programmatic deletion occurs.

What is the best way to add a permission prompt for command line file deletion?

The best way to add a permission prompt for command line file deletion is to enforce a confirmation step using `request_file_permission` for all `rm` and `unlink` actions to prevent irreversible data loss.

When do I need explicit user permission for file system operations?

You need explicit user permission for file system operations whenever an agent attempts to delete files or directories, ensuring direct user consent is captured before any removal action is executed.