safe-file-deletion

safe-file-deletion is a skill for Claude Code, Codex from MemTensor/MemOS. It costs 46 tokens per session (293 once invoked), scanned C, original, Apache-2.0.

A safety rule that requires explicit user permission before deleting files from disk.

In plain words
What is it for?
Use it whenever a task would delete one or more files, such as with rm, unlink, or file-removal APIs.
Why use it?
It prevents accidental or hidden file removal, including deletion performed by commands or scripts.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it whenever a task would delete one or more files, such as with rm, unlink, or file-removal APIs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/memtensor/memos/safe-file-deletion
About the project

MemOS is a memory operating system that stores, retrieves, and manages long-term memory for large language models and AI agents. It supports context-aware interactions by organizing text, images, tool traces, personas, and knowledge bases for reuse across tasks.

MemTensor/MemOS · 12,540 stars · on GitHub · memos.openmem.net

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add MemTensor/MemOS --skill safe-file-deletion
Clone the repo
git clone --depth 1 https://github.com/MemTensor/MemOS

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for safe-file-deletion

README.md
[![agentmods](https://agentmods.dev/badge/skills/memtensor/memos/safe-file-deletion/github.svg)](https://agentmods.dev/skills/memtensor/memos/safe-file-deletion)
Your own site
<a href="https://agentmods.dev/skills/memtensor/memos/safe-file-deletion"><img src="https://agentmods.dev/badge/skills/memtensor/memos/safe-file-deletion/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for safe-file-deletion

Your own site · 80×15
<a href="https://agentmods.dev/skills/memtensor/memos/safe-file-deletion"><img src="https://agentmods.dev/badge/skills/memtensor/memos/safe-file-deletion.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 293 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.00293
Opus 5.5 $0.00018 $0.00117
Sonnet 5.5 $0.00009 $0.00059
Haiku 4.5 $0.00005 $0.00029

Measured 3mo ago against content hash 38cdb761ecfb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

safe-file-deletion scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- `rm -rf` (directories)
apps/openwork-memos-integration/apps/desktop/skills/safe-file-deletion/SKILL.md · 51 lines

What it actually says

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.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 51 lines · 46 tokens per session scan C 38cdb761ecfb

Subscribe to this mod's changes

safe-file-deletion is a skill published in the GitHub repository MemTensor/MemOS (12,540 stars, last pushed 3d ago), licensed Apache-2.0. It adds 46 tokens to every session and 293 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

safe-file-deletion compared with skills from other repositories

safe-file-deletion next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
safe-file-deletionMemTensor/MemOSSkill13k3d agoApache-2.0C46Claude Code, Codex
memory-triagemem0ai/mem0Skill70k2d agoApache-2.0A58Claude Code
mem0mem0ai/mem0Skill70k2d agoApache-2.0A181Claude Code
mem0-climem0ai/mem0Skill70k2d agoApache-2.0A177Claude Code, Codex
mem0-vercel-ai-sdkmem0ai/mem0Skill70k2d agoApache-2.0A146Claude Code, Codex
mem0-statusmem0ai/mem0Skill70k2d agoApache-2.0A44Claude Code, Codex
mem0-tourmem0ai/mem0Skill70k2d agoApache-2.0A47Claude Code, Codex