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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/guoqunabc/browser-zombie-cleanerBrowser 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:
- Detect-only mode is the default — no processes are killed without
--kill - Triple verification before killing: OpenClaw user-data-dir pattern + orphaned PPID + minimum age
- Only current user's processes — never touches other users
- Only OpenClaw browsers — identified by
~/.openclaw/browser/in the command line - Graceful shutdown — SIGTERM first, SIGKILL only after grace period
- Audit log — every action is logged to
/tmp/openclaw/zombie-browser-cleanup.log - 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 Checks
Add to your health check script or heartbeat:
# Detect and report (no kill)
bash /path/to/cleanup-zombie-browsers.sh
# Auto-clean with safety margin (processes must be >2 hours old)
bash /path/to/cleanup-zombie-browsers.sh --kill --min-age 7200
How It Identifies Zombies
A process is classified as a zombie browser if ALL of these are true:
- Browser process — executable name matches chrome/chromium/brave/msedge/firefox
- OpenClaw origin — command line contains
.openclaw/browser/(the user-data-dir used by OpenClaw) - Orphaned — PPID is 1 (init) or systemd, meaning the parent Gateway process is gone
- Old enough — process age exceeds
--min-agethreshold (prevents killing browsers that are actively initializing)
If ANY condition is not met, the process is skipped.
Platform Support
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-guoqunabc-browser-zombie-cleaner": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
gateway-watchdog
Monitor OpenClaw Gateway health by detecting abnormal error rates in logs. Use when: (1) setting up Gateway error monitoring, (2) diagnosing repeated API failures (429, quota, timeouts), (3) user asks about Gateway health or error trends, (4) integrating error detection into heartbeat checks. Detects rate-limiting, server errors, auth failures, network errors, and message delivery failures across all channels.
Feishu Doc Writing
Skill by guoqunabc
chat-with-l
和小提(L)聊天。小提是朋友 Kid(孙榕)的 OpenClaw AI 助手,运行在 49.232.185.232:18789。使用场景:(1) 主人让雷姆去找小提聊天/传话/打招呼,(2) 提到"小提"、"L"、"Kid"、"孙榕"相关的对话请求。
feishu-doc-editing
Performance-optimized strategies for editing Feishu (Lark) documents via OpenClaw's feishu_doc tool. Use when: (1) modifying existing Feishu documents, (2) inserting images at specific positions, (3) writing tables or structured content, (4) any multi-block document editing task, (5) writing long documents that may hit API size limits. Provides concrete patterns to minimize API calls and maximize editing speed while preserving existing formatting. Covers: parallel operations, positioned image insertion, large document chunking, rate-limit handling, rich-text preservation, and conflict avoidance. Complements the built-in feishu-doc skill (API reference) with operational best practices.
飞书文档可读性优化
飞书文档格式优化与安全修改规范。**必须在通过MCP修改任何mi.feishu.cn文档之前加载此skill**。包括最小修改原则、富文本保护、段落间距、加粗规范。触发条件:用户要求修改飞书文档内容或格式,涉及mi.feishu.cn域名,或调用小米飞书MCP的update-doc工具。