搜索

PythonReactSEOPDF
OpenClaw

browser-zombie-cleaner

Detect and clean up zombie browser processes left by OpenClaw's browser tool. When the OpenClaw Gateway restarts, Playwright-launched browser processes get orphaned and accumulate memory. This skill identifies them safely and optionally terminates them. Use when: memory is high, browser processes are piling up, or as part of periodic health checks.

guoqunabc0 来源安装数☆ 0 仓库 Starsv1.0.0

安装与使用

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

SkillHub CLI

skillhub install guoqunabc/browser-zombie-cleaner

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

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

查看来源 ↗使用指南

技能说明

Browser Zombie Cleaner

Detect and clean up orphaned browser processes left behind when OpenClaw Gateway restarts.

The Problem

OpenClaw's browser tool uses Playwright to launch Chrome/Chromium/Firefox. When the Gateway restarts (update, crash, manual restart), these browser child processes become orphans — their parent PID changes to 1 (init/systemd). They keep running, consuming memory, and accumulate over days.

Safety Design

This tool is safe by default:

  1. Detect-only mode is the default — no processes are killed without --kill
  2. Triple verification before killing: OpenClaw user-data-dir pattern + orphaned PPID + minimum age
  3. Only current user's processes — never touches other users
  4. Only OpenClaw browsers — identified by ~/.openclaw/browser/ in the command line
  5. Graceful shutdown — SIGTERM first, SIGKILL only after grace period
  6. Audit log — every action is logged to /tmp/openclaw/zombie-browser-cleanup.log
  7. No root required — runs as regular user

Usage

Detect only (safe, default)
bash <skill_dir>/scripts/cleanup-zombie-browsers.sh

Output example:

Found 8 OpenClaw browser processes, 5 are zombies (1200MB total)
  ZOMBIE: PID=66301 PPID=1 age=3d 2h mem=388MB
  ZOMBIE: PID=152356 PPID=1 age=2d 4h mem=168MB
  ...
Run with --kill to terminate these zombie processes
Detect and clean
bash <skill_dir>/scripts/cleanup-zombie-browsers.sh --kill
Options
Option Default Description
--kill off Actually terminate zombie processes
--min-age N 3600 (1h) Only target processes older than N seconds
--grace N 10 Seconds between SIGTERM and SIGKILL
--json off Output as JSON (for programmatic use)
--log PATH /tmp/openclaw/zombie-browser-cleanup.log Log file location
--pattern STR .openclaw/browser/ Pattern to identify OpenClaw browsers

Integration with Health...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/guoqunabc/browser-zombie-cleaner
Version
1.0.0
Commit
4eebe269c9ab8d38bf78d588724d290a6ff83f75
分类来源
rules
状态
active
可见性
public

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

来源内容

SKILL.md
# Browser Zombie Cleaner

Detect and clean up orphaned browser processes left behind when OpenClaw Gateway restarts.

## The Problem

OpenClaw's `browser` tool uses Playwright to launch Chrome/Chromium/Firefox. When the Gateway
restarts (update, crash, manual restart), these browser child processes become orphans — their
parent PID changes to 1 (init/systemd). They keep running, consuming memory, and accumulate
over days.

## Safety Design

This tool is **safe by default**:

1. **Detect-only mode** is the default — no processes are killed without `--kill`
2. **Triple verification** before killing: OpenClaw user-data-dir pattern + orphaned PPID + minimum age
3. **Only current user's processes** — never touches other users
4. **Only OpenClaw browsers** — identified by `~/.openclaw/browser/` in the command line
5. **Graceful shutdown** — SIGTERM first, SIGKILL only after grace period
6. **Audit log** — every action is logged to `/tmp/openclaw/zombie-browser-cleanup.log`
7. **No root required** — runs as regular user

## Usage

### Detect only (safe, default)

```bash
bash <skill_dir>/scripts/cleanup-zombie-browsers.sh
```

Output example:
```
Found 8 OpenClaw browser processes, 5 are zombies (1200MB total)
  ZOMBIE: PID=66301 PPID=1 age=3d 2h mem=388MB
  ZOMBIE: PID=152356 PPID=1 age=2d 4h mem=168MB
  ...
Run with --kill to terminate these zombie processes
```

### Detect and clean

```bash
bash <skill_dir>/scripts/cleanup-zombie-browsers.sh --kill
```

### Options

| Option | Default | Description |
|--------|---------|-------------|
| `--kill` | off | Actually terminate zombie processes |
| `--min-age N` | 3600 (1h) | Only target processes older than N seconds |
| `--grace N` | 10 | Seconds between SIGTERM and SIGKILL |
| `--json` | off | Output as JSON (for programmatic use) |
| `--log PATH` | `/tmp/openclaw/zombie-browser-cleanup.log` | Log file location |
| `--pattern STR` | `.openclaw/browser/` | Pattern to identify OpenClaw browsers |

## Integration with Health...

相关技能

OpenClaw

openbotx

openbotx

An open-source platform for orchestrating AI agents — secure, simple, and built for everyone. Multi-agent, real-time task board, web control panel, skills system, browser automation, multi-provider, scheduler,...

OpenClaw

zsxq-digest

sealiu1997

OpenClaw skill for 知识星球 / ZSXQ digests with token-first auth and browser recovery.

OpenClaw

browser-use-skill

abczsl520

🌐 OpenClaw skill for Browser-Use — AI-powered browser automation for complex multi-step workflows (login, form filling, scraping, posting)