← 返回 Skills 市场
foras910521-lab

cwd-guardian

作者 foras910521-lab · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
82
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install cwd-guardian
功能描述
Monitors and restores the evolver process working directory. Use when evolver crashes with uv_cwd ENOENT errors or when the evolver process loses its cwd.
使用说明 (SKILL.md)

cwd-guardian

Protects the evolver daemon from uv_cwd ENOENT crashes by:

  1. Stamping the current valid cwd to a pidfile
  2. On restart, verifying the cwd exists before launching evolver
  3. Rebuilding the cwd from the stamped path if it was deleted

Usage

node skills/cwd-guardian/scripts/guardian.js start
node skills/cwd-guardian/scripts/guardian.js check

Logic

  • start: Records current working directory to ~/.openclaw/workspace/memory/evolution/cwd_guardian.pid, then starts the evolver daemon
  • check: Reads the pidfile, verifies the cwd exists, recreates it if missing, then starts the evolver daemon if not running
  • verify: Returns exit code 0 if cwd is valid, 1 if recreated
安全使用建议
Do not install or run this as-is on production systems. The package is inconsistent: SKILL.md points to non-existent scripts and promises behavior (recreating the cwd, starting evolver) that the included index.js does not implement. The code is hardcoded to a specific user path (/Users/foras/.openclaw/workspace), so it will only work on that environment and could fail or write state in unexpected places on other machines. Before using: (1) ask the author for a corrected, documented version or a configurable WORKSPACE via env var; (2) verify the script's behavior locally in a safe environment (check exactly what files it writes and that it won't remove anything); (3) if you expect automatic starting/recreating functionality, request confirmation and a code update implementing that behavior; (4) prefer code that uses configurable paths and avoids hardcoded user directories. If you don't trust the source, avoid running the script at all.
功能分析
Type: OpenClaw Skill Name: cwd-guardian Version: 1.0.0 The cwd-guardian skill is a utility designed to monitor and maintain the working directory for a secondary process ('evolver') to prevent filesystem-related crashes. The code in index.js uses standard Node.js filesystem modules and a hardcoded pgrep command to verify directory existence and process status. While it contains a hardcoded absolute path (/Users/foras/.openclaw/workspace) that reveals the author's local environment and limits portability, there are no indicators of malicious intent, data exfiltration, or exploitable vulnerabilities.
能力评估
Purpose & Capability
The README/SKILL.md and package description claim the guardian will stamp the cwd, recreate a missing cwd, and start the evolver daemon. The shipped code only verifies a hardcoded path, writes a JSON state file, and checks for running processes; it does not recreate arbitrary missing cwd directories nor start the evolver. The code also hardcodes WORKSPACE = '/Users/foras/.openclaw/workspace', which is user-specific and not declared or configurable in the skill metadata.
Instruction Scope
SKILL.md usage examples point at node skills/cwd-guardian/scripts/guardian.js (start/check) but the package contains index.js and package.json scripts that invoke index.js — the referenced scripts file does not exist. The documentation promises actions (recreate cwd, start evolver) that the code does not perform. The code does execute a shell command (pgrep) to detect processes, which is consistent with process-checking but the overall instruction set and implementation diverge.
Install Mechanism
No install spec; this is instruction + small Node script only. No external downloads or package installs are requested, so install mechanism risk is low.
Credentials
The skill declares no required environment variables or secrets, which matches the lack of credential usage. However, the code uses a hardcoded absolute workspace path under a specific user ('/Users/foras/...') instead of respecting declared or configurable paths, making it non-portable and potentially surprising (it will only work on that specific filesystem layout).
Persistence & Privilege
The skill does not request permanent 'always' inclusion, does not modify other skills, and only writes a JSON state file under the workspace path. Autonomous invocation is allowed by default (normal for skills) but there is no evidence of privileged or system-wide modifications beyond its own state file.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cwd-guardian
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cwd-guardian 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial publish: Prevents uv_cwd ENOENT crashes in evolver daemon
元数据
Slug cwd-guardian
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

cwd-guardian 是什么?

Monitors and restores the evolver process working directory. Use when evolver crashes with uv_cwd ENOENT errors or when the evolver process loses its cwd. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 82 次。

如何安装 cwd-guardian?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cwd-guardian」即可一键安装,无需额外配置。

cwd-guardian 是免费的吗?

是的,cwd-guardian 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

cwd-guardian 支持哪些平台?

cwd-guardian 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 cwd-guardian?

由 foras910521-lab(@foras910521-lab)开发并维护,当前版本 v1.0.0。

💬 留言讨论