Workspace Trash
Never permanently delete workspace files. Always use trash instead of rm.
Slash Commands
/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 restore
Script
bash skills/workspace-trash/scripts/trash.sh <action> [args...]
Actions: move, list, restore <id|index>, empty, size
Rules
- NEVER use
rmorrm -rfon OpenClaw files. Always use the trash script'smoveaction instead. - When asked to delete/remove/clean up files, use
trash.sh move <path>— not rm. - Before emptying trash, always confirm with the user and show what will be deleted.
- The trash lives at
.trash/in the primary workspace root. A.manifest.jsontracks original paths for restoration. - Scope: any file under
~/.openclaw/— primary workspace, agent workspaces (workspace-*), and other OpenClaw directories. The script refuses paths outside~/.openclaw/. - Cross-filesystem support: Agent workspaces may be on different mounts. The script uses
cp -a+rmas a fallback whenmvfails across filesystems. Restore also handles cross-filesystem moves. - Restore by index number (from list) or by trash name. Items from agent workspaces show
[agent]tag in list view. - When multiple files are being deleted, pass them all in one command:
trash.sh move file1 file2 dir1