← Back to Skills Marketplace
foras910521-lab

cwd-guardian

by foras910521-lab · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
82
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install cwd-guardian
Description
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.
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cwd-guardian
  3. After installation, invoke the skill by name or use /cwd-guardian
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial publish: Prevents uv_cwd ENOENT crashes in evolver daemon
Metadata
Slug cwd-guardian
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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. It is an AI Agent Skill for Claude Code / OpenClaw, with 82 downloads so far.

How do I install cwd-guardian?

Run "/install cwd-guardian" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is cwd-guardian free?

Yes, cwd-guardian is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does cwd-guardian support?

cwd-guardian is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created cwd-guardian?

It is built and maintained by foras910521-lab (@foras910521-lab); the current version is v1.0.0.

💬 Comments