file-operation-safety

Verify paths and require user confirmation before deleting, moving, or overwriting files.

5|1|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/latestaiagents/agent-skills --skill file-operation-safety
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-operation-safety
Source: https://github.com/latestaiagents/agent-skills/tree/main/skills/safety/ai-safety-guardrails/file-operation-safety
Command: npx skills add https://github.com/latestaiagents/agent-skills --skill file-operation-safety

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill prevents accidental data loss by implementing strict verification and confirmation protocols before destructive file operations like deleting, moving, or overwriting files.

Core Features & Use Cases

  • Critical Safety: Protects against irreversible file loss during operations like rm -rf.
  • Impact Assessment: Clearly presents the scope and consequences of file operations to the user.
  • Use Case: Before executing rm -rf /path/to/important_data, the AI will first verify the path, list the number of files and total size, and require explicit user confirmation after detailing what will be lost.

Quick Start

Use the file-operation-safety skill before performing any command that deletes, moves, or overwrites files.

Frequently Asked Questions about file-operation-safety

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

FAQPage Schema
How do I prevent accidental data loss when running destructive file operations?

To prevent accidental data loss, you need strict verification protocols that evaluate path validity and require explicit user confirmation before executing destructive file operations like deletion or overwriting.

What happens before the AI executes an rm command to ensure file operation safety?

Before executing an rm command, file operation safety protocols verify the path, list the total number of files and size, and require explicit user consent after detailing exactly what data will be lost.

Can I get an impact assessment before overwriting or moving files?

Yes, you can get a detailed impact assessment before moving or overwriting files, which clearly presents the scope and consequences of the operation to help you avoid irreversible file loss.

How do I enforce multi-factor confirmation for irreversible file deletions?

You can enforce multi-factor confirmation for irreversible file deletions by applying safety guardrails that require explicit user consent and path validation before any destructive command executes.

When should I use data loss prevention guardrails for file system operations?

You should use data loss prevention guardrails whenever performing any command that deletes, moves, or overwrites files, ensuring critical safety against accidental loss during irreversible system operations.