搜索

PythonReactSEOPDF
OpenClaw

openclaw-xguardian

Build, configure, and install a 24x7 OpenClaw watchdog on macOS, including scaffolding the Go project, wiring launchd, and tuning health/recovery behavior. Use for requests to create or share the OpenClaw guardian service, deploy it on a Mac, or troubleshoot its recovery/logging behavior.

harryboda0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install harryboda/openclaw-xguardian

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

OpenClaw XGuardian

Overview

Create a macOS launchd-backed guardian that keeps OpenClaw running, auto-recovers on failure, and logs minimal operational events.

Workflow

  1. Scaffold the project from assets.
  2. Configure paths and OpenClaw CLI location.
  3. Build the Go binary.
  4. Install the LaunchAgent and reload.
  5. Validate via logs and a stop/recovery test.

Steps

1) Scaffold from assets

Copy the template project into the target workspace:

cp -R /Users/xiong/.codex/skills/openclaw-xguardian/assets/guardian/* <TARGET_WORKSPACE>/

This copies:

  • go.mod
  • cmd/openclaw-guardian/main.go
  • config.sample.json
  • launchd/com.openclaw.guardian.plist
2) Configure paths

Edit the user config file at ~/.openclaw-guardian/config.json (create from config.sample.json). Key fields:

  • openclaw_bin: absolute path from which openclaw
  • config_path: usually ~/.openclaw/openclaw.json
  • gateway_plist_path: usually ~/Library/LaunchAgents/ai.openclaw.gateway.plist
  • log_path: e.g. ~/.openclaw-guardian/guardian.log
  • verbose_logs: false by default for concise logs
  • log_health_ok: false by default to avoid spam
3) Build
go build -o bin/openclaw-guardian ./cmd/openclaw-guardian
4) Install LaunchAgent (guardian)

Edit launchd/com.openclaw.guardian.plist and set:

  • ProgramArguments: binary path + config path
  • EnvironmentVariables/PATH: include your Node/OpenClaw path
  • StandardOutPath/StandardErrorPath: desired log files

Then install and reload:

mkdir -p ~/Library/LaunchAgents
cp launchd/com.openclaw.guardian.plist ~/Library/LaunchAgents/
launchctl unload ~/Library/LaunchAgents/com.openclaw.guardian.plist 2>/dev/null || true
launchctl load ~/Library/LaunchAgents/com.openclaw.guardian.plist
5) Validate
  • Check logs: tail -n 80 ~/.openclaw-guardian/guardian.log
  • Optional: openclaw gateway stop and confirm recovery lines appear.

Troubleshooting

  • `env: node: No such...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/harryboda/openclaw-xguardian
Version
—
Commit
d4b15f883e671d09dc2e0d58afc138fd8cebd68f
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# OpenClaw XGuardian

## Overview
Create a macOS launchd-backed guardian that keeps OpenClaw running, auto-recovers on failure, and logs minimal operational events.

## Workflow
1. Scaffold the project from assets.
2. Configure paths and OpenClaw CLI location.
3. Build the Go binary.
4. Install the LaunchAgent and reload.
5. Validate via logs and a stop/recovery test.

## Steps

### 1) Scaffold from assets
Copy the template project into the target workspace:

```bash
cp -R /Users/xiong/.codex/skills/openclaw-xguardian/assets/guardian/* <TARGET_WORKSPACE>/
```

This copies:
- `go.mod`
- `cmd/openclaw-guardian/main.go`
- `config.sample.json`
- `launchd/com.openclaw.guardian.plist`

### 2) Configure paths
Edit the user config file at `~/.openclaw-guardian/config.json` (create from `config.sample.json`).
Key fields:
- `openclaw_bin`: absolute path from `which openclaw`
- `config_path`: usually `~/.openclaw/openclaw.json`
- `gateway_plist_path`: usually `~/Library/LaunchAgents/ai.openclaw.gateway.plist`
- `log_path`: e.g. `~/.openclaw-guardian/guardian.log`
- `verbose_logs`: `false` by default for concise logs
- `log_health_ok`: `false` by default to avoid spam

### 3) Build

```bash
go build -o bin/openclaw-guardian ./cmd/openclaw-guardian
```

### 4) Install LaunchAgent (guardian)
Edit `launchd/com.openclaw.guardian.plist` and set:
- `ProgramArguments`: binary path + config path
- `EnvironmentVariables/PATH`: include your Node/OpenClaw path
- `StandardOutPath`/`StandardErrorPath`: desired log files

Then install and reload:

```bash
mkdir -p ~/Library/LaunchAgents
cp launchd/com.openclaw.guardian.plist ~/Library/LaunchAgents/
launchctl unload ~/Library/LaunchAgents/com.openclaw.guardian.plist 2>/dev/null || true
launchctl load ~/Library/LaunchAgents/com.openclaw.guardian.plist
```

### 5) Validate
- Check logs: `tail -n 80 ~/.openclaw-guardian/guardian.log`
- Optional: `openclaw gateway stop` and confirm recovery lines appear.

## Troubleshooting
- `env: node: No such...

相关技能

OpenClaw

x402hub

capncoconut

Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay,...

OpenClaw

claw

capevace

Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.

OpenClaw

captchas-openclaw

captchasco

OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.