install-to-trash

Installation
SKILL.md

install-to-trash

The trash-retired-files skill makes deletions reversible when invoked. This installer makes them reversible by default, by replacing direct rm with a trash-move at the harness layer.

What gets installed

One PreToolUse hook that fires on every Bash tool call. It scans the command for unguarded rm and either rewrites it to to-trash, blocks it with an explanation, or lets it through with a warning depending on policy.

Hook script

~/.claude/hooks/intercept-rm.sh

#!/usr/bin/env bash
# PreToolUse hook for Bash. Reads JSON payload from stdin.
# Policy: rewrite `rm <path>` to `to-trash <path> --reason "<inferred>"`,
#         block `rm -rf` of paths outside CWD,
#         allow `rm` inside ephemeral dirs (/tmp, node_modules, .git internal).
Installs
5
First Seen
Jun 28, 2026
install-to-trash — a-canary/arc-skills