Browser Zombie Cleaner for Openclaw

A specialized utility for identifying and safely terminating orphaned browser processes left behind by OpenClaw's browser tool.

guoqunabc
v1.0.0
Mar 7, 2026
0
886
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install browser-zombie-cleaner

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install browser-zombie-cleaner using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Browser Zombie Cleaner?

The Browser Zombie Cleaner is a critical maintenance utility designed for developers and system administrators using Openclaw Skills. When the OpenClaw Gateway restarts—whether due to an update, a manual restart, or an unexpected crash—the browser processes launched via Playwright (such as Chrome, Chromium, or Firefox) often become orphans. These orphaned processes have their parent PID changed to 1, meaning they continue to run in the background, silently consuming memory and accumulating over time.

This skill provides a safety-first solution to this common resource leak. It is specifically designed to distinguish between active sessions and true zombies by verifying the OpenClaw-specific user-data-dir pattern, ensuring that only relevant processes are targeted. By integrating this skill into your workflow, you maintain a high-performance environment for all your Openclaw Skills without the overhead of manual process management.

Browser Zombie Cleaner Use Cases

  • Reclaiming system memory when background browser processes accumulate after multiple Gateway restarts.
  • Automating periodic system health checks to ensure resource availability for Openclaw Skills.
  • Safely cleaning up stalled Playwright instances without affecting other system users or processes.
  • Troubleshooting performance degradation on development servers caused by hundreds of orphaned browser threads.

How Browser Zombie Cleaner Works

  1. The skill scans the process table for known browser executables including Chrome, Chromium, Brave, Microsoft Edge, and Firefox.
  2. It filters these processes to find those containing the specific OpenClaw data directory pattern in their command-line arguments.
  3. It verifies the orphan status by checking if the Parent Process ID (PPID) has been reassigned to 1 (init or systemd).
  4. It calculates the process age to ensure that only processes older than a specific threshold (defaulting to 1 hour) are flagged.
  5. If the kill flag is enabled, it sends a SIGTERM for graceful shutdown, followed by a SIGKILL after a grace period if the process remains.

Browser Zombie Cleaner Setup

To begin using this tool within your Openclaw Skills environment, navigate to the skill directory and execute the script. The tool is safe by default and will not terminate processes unless explicitly instructed.

# Run a safe detection scan to see current zombie processes
bash scripts/cleanup-zombie-browsers.sh

# Execute a cleanup of processes older than 2 hours
bash scripts/cleanup-zombie-browsers.sh --kill --min-age 7200

Browser Zombie Cleaner Data Schema & Taxonomy

The Browser Zombie Cleaner focuses on operational transparency and provides detailed feedback through logs and standard output. It organizes data using the following taxonomy:

Attribute Description
Process Metadata Tracks PID, PPID, process age, and memory consumption (RSS).
Identity Verification Confirms the presence of ~/.openclaw/browser/ in the command line.
Audit Logging Records all detection and termination actions in /tmp/openclaw/zombie-browser-cleanup.log.
JSON Schema When using the --json flag, it outputs a structured list of zombie objects for programmatic consumption.

Browser Zombie Cleaner Advanced Features

  • Triple verification logic to prevent accidental termination of non-OpenClaw browser instances.
  • Support for multiple browser engines including Chromium, Firefox, and WebKit-based browsers.
  • Configurable grace periods and age thresholds to customize the cleanup intensity.
  • Native platform support for both Linux (via /proc) and macOS (via ps etime).
  • Seamless integration into automated health check scripts and cron jobs for maintaining Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*