Install
openclaw skills install workspace-trashSoft-delete protection for workspace files. Intercept file deletions and move them to a recoverable trash instead of permanent removal. Use when deleting, removing, or cleaning up files in the workspace. Triggers on /trash, /trash:view, /trash:empty, /trash:restore, or any file deletion request. Also use when the agent needs to rm/delete/remove any file — always trash instead of permanently deleting.
openclaw skills install workspace-trashNever permanently delete workspace files. Always use trash instead of rm.
node) — required for manifest (JSON) managementmv, cp, rm, find, awk, date, basename, dirname| Variable | Default | Description |
|---|---|---|
OPENCLAW_HOME | $HOME/.openclaw | OpenClaw root directory. Only files under this path can be trashed. |
OPENCLAW_WORKSPACE | $OPENCLAW_HOME/workspace | Primary workspace directory. Trash lives at $OPENCLAW_WORKSPACE/.trash/. |
These variables are standard OpenClaw environment variables and are typically already set. The script uses safe defaults if unset.
/trash — Show trash menu (view, empty, restore options)/trash:view — List all items in trash/trash:empty — Permanently delete all trash contents (confirm first!)/trash:restore — List items and ask which to restorebash skills/workspace-trash/scripts/trash.sh <action> [args...]
Actions: move, list, restore <id|index>, empty, size
$OPENCLAW_HOME (default ~/.openclaw/) can be trashed. Paths outside this boundary are refused.process.env), never via string interpolation into node -e scripts. This prevents code injection via crafted filenames.-- separators: All mv, cp, and rm calls use -- to prevent filenames starting with - from being interpreted as flags.empty action: Uses rm -rf to permanently delete all trash contents. This is irreversible. The agent must always confirm with the user and show what will be deleted before running this action.mv fails across filesystem boundaries, the script falls back to cp -a + rm -rf. The source is only deleted after a successful copy.rm or rm -rf on OpenClaw files. Always use the trash script's move action instead.trash.sh move <path> — not rm..trash/ in the primary workspace root. A .manifest.json tracks original paths for restoration.~/.openclaw/ — primary workspace, agent workspaces (workspace-*), and other OpenClaw directories. The script refuses paths outside ~/.openclaw/.cp -a + rm as a fallback when mv fails across filesystems. Restore also handles cross-filesystem moves.[agent] tag in list view.trash.sh move file1 file2 dir1