Token导航 LogoToken导航TokenDH.com
开发执行命令clawhub未标认证来源可访问clear审计提醒

keepalivekeepalive 开发

Agent Skill

keepalive 用于补充开发相关能力,适合在 OpenClaw 中需要让 Agent 承接开发相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

6,336

周安装

264

GitHub Stars

1

下载量

2,112
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install keepalive

简介

保持 OpenClaw 网关在本地设备 24/7 不间断运行,防止连接中断。

  • 适用于需要长期在线、避免网关崩溃或断线的开发和使用场景。
  • 自动检测连接状态并在异常时尝试恢复,支持后台静默守护。
  • 需授予进程管理权限,建议在安全网络环境下启用以防资源滥用。
  • 可能占用系统资源,部署前请评估设备性能与稳定性需求。

SKILL.md

name
openclaw-keepalive
description
|

OpenClaw Gateway Keepalive

Ensure the OpenClaw gateway process stays running across reboots, crashes, sleep, and network interruptions.

Quick Start (Recommended)

Register as a system service with one command (all platforms):

openclaw gateway install

Effects:

  • ✅ Auto-start on boot — no terminal needed
  • ✅ Runs in background — survives terminal close
  • ✅ Survives screen lock — independent of user session
  • ✅ Auto-restart on crash — OS-level process supervision

Verify:

openclaw gateway status

Expected output:

  • Service: Scheduled Task (registered)
  • RPC probe: ok
  • Port: [127.0.0.1:18789]

Commands

CommandDescription
openclaw gateway installRegister as system service (one-time)
openclaw gateway uninstallRemove system service
openclaw gateway startStart gateway manually
openclaw gateway stopStop gateway
openclaw gateway restartRestart gateway
openclaw gateway statusCheck gateway status
openclaw logs --followTail real-time logs

Platform Differences

Windows

  • Registers via Task Scheduler (schtasks)
  • Service name: OpenClaw Gateway
  • Survives screen lock and user session disconnect

macOS

  • Registers via launchd plist
  • Supports KeepAlive=true for auto-restart

Linux

  • Registers via systemd service
  • Supports Restart=on-failure policy

Prevent Sleep (Critical)

The gateway requires the computer to stay awake. Configure power settings:

Windows

# List current power plans
powercfg /list

# Never sleep when plugged in
powercfg /change standby-timeout-ac 0

# Allow display off but keep system awake
powercfg /change monitor-timeout-ac 10

macOS

# Prevent system sleep
sudo pmset -a sleep 0

# Prevent disk sleep
sudo pmset -a disksleep 0

# Allow display off but keep system running
sudo pmset -a displaysleep 10

Linux

# Disable suspend
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

Network Recovery

The gateway's WebSocket connection auto-reconnects after network interruptions using exponential backoff (1s → 2s → 4s → ...).

Manual restart if needed:

openclaw gateway restart

Troubleshooting

Gateway Unresponsive

openclaw gateway status    # Check process status
openclaw logs --follow     # View real-time logs
openclaw gateway restart   # Attempt restart

Service Not Registered

openclaw gateway install   # Re-register
openclaw gateway status    # Verify

Frequent Crashes

  1. Check logs with openclaw logs --follow for crash cause
  2. Ensure sufficient memory (Node.js process needs at least 512MB free)
  3. Check for port conflicts (default: 18789)
  4. Update to latest version

Advanced: External Process Supervisors

If gateway install is not stable enough, use external tools:

Option A: pm2 (Recommended, Cross-Platform)

npm install -g pm2
pm2 start openclaw -- gateway start
pm2 save
pm2 startup  # Generate startup command

Option B: NSSM (Windows Only)

nssm install OpenClaw "C:\Program Files\
odejs\
ode.exe" "openclaw gateway start"
nssm set OpenClaw AppExit Default Restart
nssm start OpenClaw

Option C: Windows Task Scheduler (Manual)

# Create auto-start task with 1-minute restart on failure
schtasks /create /tn "OpenClaw Gateway" /tr "openclaw gateway start" /sc onstart /rl highest /f

# Or use Task Scheduler GUI for finer restart policies

Healthcheck Scripts

Schedule these with cron or Task Scheduler for periodic health checks with auto-restart.

Windows (healthcheck.cmd)

@echo off
REM OpenClaw Gateway Healthcheck Script (Windows)
REM Run periodically via Task Scheduler or cron
REM Exit code 0 = healthy, 1 = failed to recover

echo [%date% %time%] Checking OpenClaw Gateway status...

openclaw gateway status >nul 2>&1
if %errorlevel% neq 0 (
    echo [%date% %time%] Gateway not responding. Attempting restart...
    openclaw gateway restart >nul 2>&1
    timeout /t 5 >nul
    openclaw gateway status >nul 2>&1
    if %errorlevel% neq 0 (
        echo [%date% %time%] CRITICAL: Gateway failed to restart!
        exit /b 1
    ) else (
        echo [%date% %time%] Gateway restarted successfully.
        exit /b 0
    )
) else (
    echo [%date% %time%] Gateway is running normally.
    exit /b 0
)

Linux/macOS (healthcheck.sh)

#!/bin/bash
# OpenClaw Gateway Healthcheck Script (Linux/macOS)
# Usage: bash healthcheck.sh - can be scheduled via cron
# Example cron: */5 * * * * /path/to/healthcheck.sh >> /var/log/openclaw-healthcheck.log 2>&1

TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S')

echo "[$TIMESTAMP] Checking OpenClaw Gateway status..."

if openclaw gateway status > /dev/null 2>&1; then
    echo "[$TIMESTAMP] Gateway is running normally."
    exit 0
else
    echo "[$TIMESTAMP] Gateway not responding. Attempting restart..."
    openclaw gateway restart > /dev/null 2>&1
    sleep 5
    
    if openclaw gateway status > /dev/null 2>&1; then
        echo "[$TIMESTAMP] Gateway restarted successfully."
        exit 0
    else
        echo "[$TIMESTAMP] CRITICAL: Gateway failed to restart!"
        exit 1
    fi
fi

Save to a location of your choice and schedule:

  • Windows: Task Scheduler → Run every 5 minutes
  • Linux/macOS: */5 * * * * /path/to/healthcheck.sh >> /var/log/openclaw-healthcheck.log 2>&1

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenClaw

91.33%
按下载量换算1,929

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install keepalive 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills