safe-file-deletion
What it does
It is a safety rule that stops the AI agent from deleting files until you approve. It is for anyone who lets an agent work on their files and wants protection from accidental deletion.
When to use it
- ✓When the agent is about to run rm, unlink, or a similar delete command.
- ✓When a task would remove a folder or several files at once.
- ✓When you want a clear yes or no before any file is removed.
Skill link
https://github.com/MemTensor/MemOS/blob/main/apps/openwork-memos-integration/apps/desktop/skills/safe-file-deletion/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Clean up the old build folders, but ask me before you delete anything.”
5 new skills a week. 1 minute to read.
How it works
Before any delete, the agent asks for permission and lists the files involved. If you say no, it does not delete them, and it does not try a workaround.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.
FAQ
Does it cover folders too?
Yes. It applies to removing directories, such as rm -rf, as well as single files.
Can the agent work around a denied request?
No. The skill forbids workarounds such as emptying a file or moving it to a hidden location.
How does the agent ask for permission?
It uses a file permission request, which shows you a warning and waits for your answer.
Details
Original description by the author
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.
repo: MemTensor/MemOS
Popularity
- GitHub stars
- 12k
- Ranking position
- #11402
- License
- Apache-2.0
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
memos-local
12kHelps your agent install and set up MemOS, a local memory plugin for OpenClaw, so it can remember past conversations on your own device.
browserwing-admin
12kHelps your agent install and manage BrowserWing, a browser automation tool, including creating, running, and fixing automation scripts.
browserwing-executor
12kLets your agent control a browser through an HTTP API to open pages, click, type, extract data, take screenshots, and run batches of steps.
memos-memory-guide
12kTeaches your agent to search your past conversations and shared team memory when you refer to earlier chats, your preferences, or past decisions.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.