Token导航 LogoToken导航TokenDH.com
运维敏感数据clawhub未标认证来源可访问clear审计通过

openclaw-doctor-macosOpenClaw doctor macOS 文档

Agent Skill

openclaw-doctor-macos 用于整理文档、README、Markdown 和说明材料,适合在 OpenClaw 中需要把零散信息整理成结构清晰的文档时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

6,432

周安装

268

GitHub Stars

公开资料未说明

下载量

2,144
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:openclaw-doctor-macos(OpenClaw doctor macOS 文档)
来源仓库:https://github.com/dr-xiaoming/openclaw-doctor-macos
安装命令:
openclaw skills install openclaw-doctor-macos
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install openclaw-doctor-macos

简介

macOS 环境下 OpenClaw Gateway 的 24/7 健康监控工具。

  • 具备四层健康检查机制,支持进程存活、端口通信与 WebSocket 状态监测。
  • 可自动触发修复动作,适用于网关崩溃或连接异常的场景。
  • 需授予系统级权限以监控进程和网络状态,部署前评估安全风险。
  • 建议在沙盒或测试环境中先行验证,避免影响生产服务稳定性。

SKILL.md

name
openclaw-doctor
version
1.0.0
description
>
Monitors
L1 process alive, L2 HTTP port, L3 WebSocket communication (1006 detection),
metadata
openclaw
requires
os
[macos]
commands
[curl, pgrep, launchctl, caffeinate]

OpenClaw Doctor — macOS Gateway 看门狗 v2

24/7 health watchdog for OpenClaw Gateway on macOS. Detects and auto-repairs four layers of failure.

Why

OpenClaw Gateway is the message bridge — if it dies, the AI assistant goes silent. Common failure modes on macOS:

LayerFailureSymptom
L1Process crashComplete silence
L2HTTP port stuckComplete silence
L3WebSocket 1006 disconnectProcess alive, HTTP OK, but messages don't arrive (sneakiest!)
L4Mac sleep/hibernateAll connections die after lid close or idle timeout

Architecture

LaunchAgent (every 5 min)
  → L1: pgrep + launchctl (process alive?)
  → L2: curl HTTP probe (port responding?)
  → L3: Log scan for WS 1006 errors (communication healthy?)
  → L4: caffeinate keepalive (prevent sleep)
  → Auto-repair with minimum intervention principle

Repair Strategy (escalating)

FailureActionRationale
Process downopenclaw doctor --repair → restart GatewayProcess crashed
HTTP unreachableRestart GatewayPort stuck
WS frequent disconnectRestart Node first → then full restartWS layer issue, Node restart usually sufficient
Post-sleep recoveryGateway + Node dual restartAll connections need rebuild

Setup

1. Copy the script

cp scripts/doctor.sh ~/.openclaw/doctor.sh
chmod +x ~/.openclaw/doctor.sh

2. Configure (optional)

Environment variables for customization:

# In ~/.bashrc or ~/.zshrc (if non-default)
export OPENCLAW_DOCTOR_GATEWAY_URL="http://127.0.0.1:18789"  # default
export OPENCLAW_DOCTOR_SERVICE_NAME="ai.openclaw.gateway"     # default
export OPENCLAW_DOCTOR_NODE_SERVICE="ai.openclaw.node"        # default

3. Install LaunchAgent

Edit references/ai.openclaw.doctor.plist — replace REPLACE_WITH_HOME with your actual home directory path (e.g. /Users/yourname).

# Copy and customize the plist
cp references/ai.openclaw.doctor.plist ~/Library/LaunchAgents/ai.openclaw.doctor.plist
sed -i '' "s|REPLACE_WITH_HOME|$HOME|g" ~/Library/LaunchAgents/ai.openclaw.doctor.plist

# Load the service
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/ai.openclaw.doctor.plist

4. Verify

# Manual test run
bash ~/.openclaw/doctor.sh

# Check logs
tail -10 ~/.openclaw/logs/doctor.log

# Confirm caffeinate is running
pgrep -la caffeinate

# Confirm LaunchAgent is loaded
launchctl list | grep doctor

Logs

Location: ~/.openclaw/logs/doctor.log

PrefixMeaning
HEARTBEATPeriodic health confirmation (hourly)
ALERTAnomaly detected
DIAGNOSISFault classification
ACTIONRepair in progress
RESOLVEDFault repaired
CRITICALAll repair attempts failed
INFOGeneral info (e.g. caffeinate started)

Auto-rotates at 5MB (keeps last 1000 lines).

Troubleshooting

Process alive + HTTP OK but messages don't arrive? → WS disconnect. Check: grep "1006" /tmp/openclaw/openclaw-$(date +%Y-%m-%d).log | tail -10

Disconnects every night? → Mac sleep. Verify caffeinate: pgrep -la caffeinate

Doctor itself not running? → Check LaunchAgent: launchctl list | grep doctor. Reload if missing.

Temporarily disable:

launchctl bootout gui/$(id -u)/ai.openclaw.doctor

Files

  • scripts/doctor.sh — Main watchdog script
  • references/ai.openclaw.doctor.plist — LaunchAgent template

Version History

VersionDateChanges
v12026-03-07Initial: process check + HTTP probe + Gateway restart
v22026-03-23WS health check + Mac sleep prevention + layered repair + Node restart

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

88.47%
按下载量换算1,897

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills