4.7k
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill memtensor/memos --skill safe-file-deletion- SKILL.md1.1 KB
Overview
This skill enforces explicit user permission before any file deletion operation. It intercepts attempts to remove files or directories and requires a single, clear permission request that must be approved before proceeding. The policy applies to command-line and programmatic delete operations to prevent accidental or unauthorized data loss.
How this skill works
Before executing rm, unlink, fs.rm, fs.rmdir, or any delete action, the skill calls request_file_permission with operation: "delete". For single-file deletes include filePath; for multiple files include filePaths as an array in one request. The skill waits for the explicit response and only proceeds when the response is "allowed"; if "denied", it acknowledges and aborts the deletion.
When to use it
- Any rm command (including rm -rf) or shell delete operation
- Programmatic deletes via unlink, fs.rm, fs.rmdir, or similar APIs
- Batch deletion of multiple files or directories
- Automated scripts, agents, or tools that may remove files from disk
- Any workflow where accidental data loss would be harmful
Best practices
- Always batch multiple file paths into one permission request using filePaths array
- Present clear context to the user: why files are being deleted and what they are
- Wait synchronously for the permission response before performing any deletion
- Do not attempt workarounds like emptying files, moving them to hidden locations, or using alternate commands
- Log permission requests and outcomes for auditing and recovery
Example use cases
- Interactive shell: prompt user for delete permission before running rm or rm -rf
- Automated cleanup: send a single request with filePaths for scheduled purge jobs and act only if allowed
- Agent workflows: before tools invoke unlink or fs.rm, request permission to ensure the user consents
- Recovery tools: request permission prior to permanently removing recovered items after inspection
FAQ
Include operation: "delete" and filePath with the exact path to the file.
How should multiple files be requested?
Include operation: "delete" and filePaths as an array listing all target paths in one request; do not send multiple separate requests.