Browser Driver for Openclaw

An advanced browser driver skill that allows AI agents to attach to your already-logged-in local browser via Chrome DevTools Protocol (CDP) and Playwright.

clarezoe
v1.0.0
Jun 11, 2026
0
499
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install browser-driver

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-driver 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 Driver?

The browser-driver skill is a specialized addition to the library of Openclaw Skills, designed to bridge the gap between AI automation and highly secure user sessions. Instead of spinning up a fresh, unauthenticated browser profile that triggers multi-factor authentication (MFA) and tedious logins, this utility connects directly to the user's active, running browser using the Chrome DevTools Protocol (CDP) and Playwright. This ensures that the agent can execute tasks directly within existing logged-in sessions while the user monitors the workflow in real-time.

By leveraging this capability within the Openclaw Skills ecosystem, developers can securely automate interactions with complex dashboards, internal consoles, and platforms protected by single sign-on (SSO) or hardware security keys. The skill focuses heavily on safety, using ephemeral one-shot scripts rather than persistent automation hooks, keeping control firmly in the hands of the developer.

Browser Driver Use Cases

  • Need to automate actions inside dashboards or consoles protected by 2FA/SSO where the user is already signed in.
  • Running browser-based tasks on the user's local machine while allowing them to audit every step live on screen.
  • Retrieving or updating data in a private web-app that is highly sensitive to new device logins.
  • Transitioning complex web flows to the AI agent but hand back control immediately when encountering a hardware security key or biometric wall.

How Browser Driver Works

  1. Environment Verification: The agent assesses if it runs locally or on a remote VPS, configuring a reverse SSH tunnel in remote scenarios to bridge the CDP port.
  2. Browser Launch & Configuration: The system browser (Chrome, Edge, or Brave) is launched with a remote-debugging port (e.g., 9223) enabled.
  3. Port Probing: The runner probes the designated port to verify a clean CDP endpoint is listening and ready for connection.
  4. One-Shot Interaction: The agent issues a lightweight, per-step Playwright script using connectOverCDP to interact with the target tab, execute the command, and detach immediately.
  5. Visual Auditing: A screenshot is captured after each mutating action, allowing both the AI agent and the user to audit the browser's state visually.
  6. Handoff & Polling: If an identity wall (like biometric auth) is hit, the agent pauses, prompts the user to complete it, and polls the page state until cleared.
  7. Cleanup: Once complete, the browser is restarted normally to close the debug port, ensuring no exposed endpoints remain.

Browser Driver Setup

To utilize this browser-driver utility from Openclaw Skills, configure your Chromium-based browser to expose its remote debugging port.

Local Setup (macOS Example)

Ensure your browser is fully closed, then launch it via terminal with the debugging flag:

/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --remote-debugging-port=9223 --user-data-dir=\"/tmp/chrome_dev_profile\"

Remote Host (SSH Reverse Tunnel)

If your AI agent is running on a remote server, bridge your local debugging port (9223) to the remote machine:

ssh -R 9223:localhost:9223 user@remote-vps-ip

Running a Playwright Script Step

Your agent executes lightweight, one-shot Node.js scripts to connect and act:

const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.connectOverCDP('http://localhost:9223');
  const context = browser.contexts()[0];
  const page = context.pages()[0] || await context.newPage();
  
  await page.goto('https://example.com/dashboard');
  await page.screenshot({ path: 'step-audit.png' });
  
  await browser.close(); // Detaches without closing the browser
})();

Browser Driver Data Schema & Taxonomy

The browser-driver skill uses a structured layout to organize documentation and temporary execution files.

Reference File Architecture

File Path Description
references/launch-and-drive.md Contains sequences for launching the browser, port probing, and structuring one-shot Playwright scripts.
references/selectors-and-handoffs.md Guides on handling Shadow DOM, bypassing display overlays, resolving identity walls, and processing secrets.
references/remote-over-tunnel.md Step-by-step security and routing guide for tunneling a remote agent to a local browser session.

Generated File Assets

  • step-audit.png: Temporary screenshot generated after every mutating action for visual verification.
  • *.secret: Temporary location for storing captured one-time tokens or secrets prior to password manager integration and immediate file shredding.

Browser Driver Advanced Features

  • Shadow DOM Piercing Locators: Replaces brittle query selectors with Playwright locators that naturally cross shadow DOM boundaries.
  • DOM-Level Click Overrides: Bypasses overlapping elements that intercept pointer events by utilizing direct DOM-level clicks instead of typical simulated pointer clicks.
  • Interactive Identity Walls: Sophisticated polling mechanism that pauses execution, hands control back to the user for hardware tokens/biometrics, and resumes once verified.
  • SSH Reverse Tunnel Integration: Securely binds a remote agent to a local browser over a loopback-only tunnel, keeping ports unexposed to the public internet.
  • Zero-Persistence Connection Model: Prevents zombie browser processes by disconnecting the CDP session after every single command.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*