← 返回 Skills 市场
247
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install workspace-trash
功能描述
Soft-delete protection for workspace files. Intercept file deletions and move them to a recoverable trash instead of permanent removal. Use when deleting, re...
安全使用建议
This skill appears to do what it claims, but check these before installing or using it:
- Verify OPENCLAW_HOME / OPENCLAW_WORKSPACE values: ensure they point to the intended OpenClaw directory (not / or your home directory) so the script cannot operate on unintended files.
- Confirm behavior around 'empty': the SKILL.md requires user confirmation before permanent deletion, but the script itself does not prompt. Make sure the agent asks you (or modify the script to require an explicit --confirm/--force flag) before running the empty action.
- Ensure Node.js and the listed POSIX utilities exist in the runtime environment.
- Test move/restore on non-critical files first to confirm permissions and cross-filesystem behavior.
- If you need stronger safety, consider adding an interactive confirmation in the script for 'empty' and/or an allowlist check for specific workspace subpaths, and be aware of TOCTOU race conditions with mv/cp+rm fallbacks.
功能分析
Type: OpenClaw Skill
Name: workspace-trash
Version: 1.2.0
The workspace-trash skill is a safety utility designed to prevent accidental file loss by implementing a recoverable trash system. The implementation in trash.sh and SKILL.md demonstrates high security awareness, employing symlink resolution to prevent path traversal and using environment variables to pass data to Node.js scripts, which effectively mitigates shell injection risks. The operations are strictly scoped to the ~/.openclaw directory, and no suspicious network activity, data exfiltration, or obfuscation was found.
能力评估
Purpose & Capability
The script implements soft-delete behavior described in the SKILL.md: it moves allowed files under the workspace into a .trash directory, records a manifest, supports restore and empty, and lists contents. Required binaries (node, mv, cp, rm, find, awk, date, basename, dirname) are consistent with the implementation.
Instruction Scope
SKILL.md instructs the agent to always confirm with the user before running an irreversible 'empty' action, but the provided script does not prompt for confirmation — it prints the count then immediately deletes. The script relies on the agent to gate destructive operations. The script otherwise confines actions to the configured OPENCLAW_HOME/workspace and avoids shell interpolation when invoking Node.js, which matches the stated security controls. Be aware of standard TOCTOU/race risks around filesystem moves when multiple actors operate on the same paths.
Install Mechanism
There is no install specification and no network downloads; the skill is instruction-only with an included script file. This is the lowest-risk install posture.
Credentials
No credentials or unrelated environment variables are requested. The script depends on OPENCLAW_HOME and OPENCLAW_WORKSPACE to define its scope; if those variables are misconfigured (e.g., set to / or another broad path) the script will operate over that area. The default ($HOME/.openclaw) is reasonable, but the scope depends entirely on these environment values.
Persistence & Privilege
The skill is not always-enabled and does not request persistent elevated privileges or modify other skills' configurations. Autonomous invocation is allowed (platform default) but that is expected for user-invocable tools.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install workspace-trash - 安装完成后,直接呼叫该 Skill 的名称或使用
/workspace-trash触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.0
Security hardening: fix code injection via crafted filenames (env vars + spawnSync instead of string interpolation), resolve symlinks before scope check, declare node + POSIX deps, document env vars and destructive ops, add -- separators to all mv/cp/rm calls
v1.1.0
Cross-filesystem support for agent workspaces, expanded scope to all ~/.openclaw/ dirs, OOM-safe size calculation, agent tag in list view
v1.0.0
Initial release: soft-delete protection for workspace files with trash/restore/empty workflow
元数据
常见问题
Workspace Trash 是什么?
Soft-delete protection for workspace files. Intercept file deletions and move them to a recoverable trash instead of permanent removal. Use when deleting, re... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 247 次。
如何安装 Workspace Trash?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install workspace-trash」即可一键安装,无需额外配置。
Workspace Trash 是免费的吗?
是的,Workspace Trash 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Workspace Trash 支持哪些平台?
Workspace Trash 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Workspace Trash?
由 crewhaus(@crewhaus)开发并维护,当前版本 v1.2.0。
推荐 Skills