Skip to content

Safe File Deletion

Makes the agent ask your permission before deleting any file.

Repository
MemTensor/MemOS
Stars
12,226
Licence
Apache-2.0
Files
1 file

What it does

When installed, this skill makes an AI agent pause before removing any file from your computer, such as with rm, unlink, or fs.rm. The agent must first call a permission request tool, wait for your answer, and only delete if you approve. If you say no, it should acknowledge that and leave the file alone. It also tells the agent not to get around the check by emptying files, moving them to hidden locations, or using obscure commands.

Great for

  • People who want a safety net against accidental file loss while an agent works on their machine
  • Developers running agents in projects where deleted files would be hard to recover
  • Teams that want a visible approval step before any destructive action

Skip it if

  • Situations needing fully unattended automation, since every deletion waits for a human response and the agent may stall
  • Relying on it as a hard security boundary: it is an instruction the agent is asked to follow, not an enforced technical control, so it only works if the agent and host app honour it

Try asking

  • “Clean up the build folder, but ask me before deleting anything”
  • “Remove these old log files and request my permission first”
  • “Delete the temp directory, showing me what will be removed before you do it”
Step-by-step guide: how to use Safe File DeletionInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the Apache-2.0 licence and an attribution note.

    safe-file-deletion.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip safe-file-deletion.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip safe-file-deletion.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Check that your agent environment actually provides the request_file_permission tool, otherwise the rule cannot be followed
  • Batch related deletions into one request so you get a single prompt instead of many
  • Still keep backups of important data, because this skill only adds a confirmation step and does not guarantee recovery

What's inside

  • SKILL.md

Redistributed unmodified from MemTensor/MemOS under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.