金色时刻 · 15:48
让好资源,触手可及
AGENT SKILL

safe-file-deletion

safe-file-deletion 是面向测试与安全的 Agent Skill,来自 MemTensor/MemOS。查看技能说明、操作步骤与使用约定,并通过原项目了解详细用法。

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

下载 MD ↓
namesafe-file-deletion
descriptionEnforces 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.

来源:MemTensor/MemOS · Apache-2.0 许可 · 许可原文 · MD 为来源页保存的历史版本