robertmsale

safe-delete

Use the `trash` CLI for deletions so files are recoverable. Prefer this skill whenever a task involves removing files or directories.

robertmsale 6 Updated 3mo ago
GitHub

Install

npx skillscat add robertmsale/codex/safe-delete

Install via the SkillsCat registry.

SKILL.md

Safe Delete

Use this skill whenever a task involves deleting files or directories.

Rules:

  • Never use rm.
  • Use trash for deletions so items go to the OS Trash and can be recovered.
  • For paths that might start with -, pass -- before paths.

Patterns:

  • Single path: trash -- <path>
  • Multiple paths: trash -- <path1> <path2>
  • Glob delete: trash '*.log'

Quick check:

  • which trash