Skip to content
Data
Skill

/safe-file-deletion

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.

From plugin
memos
11k3 skills5 agents
Install
$ npx -y skills add MemTensor/MemOS --skill safe-file-deletion --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/safe-file-deletion

Context preview

The summary Claude sees to decide when to auto-load this skill.

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.

SKILL.md

safe-file-deletion.SKILL.md
name: safe-file-deletion
description: 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.

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.

Ships withmemos

Self-evolving memory OS for LLM & AI Agents: ultra-persistent memory, hybrid-retrieval, and cross-task skill reuse, with 35.24% token savings

Get the whole plugin
Stats
10,659
Stars
987
Forks
Active
Maintenance
TypeScript
Language
Apache-2.0
License
2d ago
Last commit
1y ago
Created

Repo: MemTensor/MemOS