chromium

Launch a persistent headless Chromium with remote debugging (CDP) for browser automation — page navigation, clicks, form filling, screenshots, and cookie import. Use when the user asks to open a website, browse, click, read page content, or work with a browser.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "chromium" with this command: npx skills add redf426/chromium

Chromium (persistent headless profile)

What it does

  • Launches headless Chromium with a persistent profile (logins, cookies, localStorage survive restarts).
  • Exposes Chrome DevTools Protocol (CDP) on 127.0.0.1 for browser tool integration.
  • Supports cookie import for pre-authenticated sessions.

Quick start

1. Launch Chromium

~/.openclaw/workspace/skills/chromium/scripts/start_chromium.sh

Environment variables (all optional):

VariableDefaultDescription
CHROMIUM_PROFILE_DIR$HOME/.openclaw/workspace/chromium-profileUser data directory
CHROMIUM_DEBUG_PORT18801CDP remote debugging port
CHROMIUM_LOG_FILE$HOME/.openclaw/workspace/logs/chromium.logLog file path
CHROMIUM_BINauto-detect (chromium, chromium-browser, google-chrome)Browser binary

2. Verify CDP is ready

curl -s http://127.0.0.1:18801/json/version

If you get JSON with Browser and webSocketDebuggerUrl — it's ready.

3. Use browser tools

browser navigate url=https://example.com
browser wait --load networkidle
browser snapshot

Browser tool cheatsheet

ActionCommand
Open pagebrowser navigate url=<URL>
Wait for loadbrowser wait --load networkidle
Read page contentbrowser snapshot
Click elementbrowser click ref=<ref>
Type textbrowser type ref=<ref> text=<text>
Scroll to elementbrowser scrollintoview <ref>
Take screenshotbrowser screenshot
Run JavaScriptbrowser evaluate --fn "document.title"

Snapshot format — important

Always use the default snapshot format (no extra parameters):

browser snapshot

Do NOT use:

  • refs=aria — returns accessibility tree without actionable refs
  • depth=2 or other depth limits — truncates DOM and hides content

The default AI format returns full page text with refs (e12, e293, etc.) suitable for click/type.

Working with dynamic pages (SPAs)

Single-page apps (React, Next.js, etc.) continuously update the DOM. Refs become stale between snapshots.

After every navigation:

browser wait --load networkidle
browser snapshot

Before clicking:

browser scrollintoview <ref>
browser click <ref>

If click fails ("Element not found or not visible"):

  1. Take a fresh browser snapshot — never reuse old refs
  2. Use browser screenshot to see the visual state
  3. For links, navigate directly by URL instead of clicking
  4. As a last resort, use JavaScript: browser evaluate --fn "document.querySelector('...').click()"

Cookie import (pre-authenticated sessions)

To use a site that requires login, export cookies from a browser where you're already logged in and import them:

Step 1 — Export cookies (in your regular browser):

  • Install Cookie-Editor extension
  • Go to the target site (make sure you're logged in)
  • Export cookies as JSON, save as cookies.json
  • Copy to server: scp cookies.json server:/tmp/

Step 2 — Import:

python3 ~/.openclaw/workspace/skills/chromium/scripts/import_cookies.py \
  /tmp/cookies.json \
  --domain example.com

Step 3 — Verify by navigating to the site and checking if you're logged in.

Data locations

WhatPath
Browser profile$CHROMIUM_PROFILE_DIR (default: ~/.openclaw/workspace/chromium-profile)
Launch log$CHROMIUM_LOG_FILE (default: ~/.openclaw/workspace/logs/chromium.log)

Troubleshooting

If CDP doesn't respond within 3 seconds after launch, check the log:

cat ~/.openclaw/workspace/logs/chromium.log

Common issues:

  • "Address already in use" — another Chromium is running. The script kills previous instances automatically, but you can run pkill -f "chromium.*remote-debugging" manually.
  • SingletonLock — stale lock file. The script removes it if Chromium isn't running.
  • No chromium binary — set CHROMIUM_BIN to the correct path (e.g., /usr/bin/google-chrome).

Requirements

  • Chromium, Chromium Browser, or Google Chrome installed on the host
  • Python 3 (for cookie import script)
  • OpenClaw with browser tool support

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Cloudflare Manager

Manage Cloudflare DNS records, Tunnels (cloudflared), and Zero Trust policies. Use for pointing domains, exposing local services via tunnels, and updating in...

Registry SourceRecently Updated
Coding

Node Red Manager

Manage Node-RED instances via Admin API or CLI. Automate flow deployment, install nodes, and troubleshoot issues. Use when user wants to "build automation", "connect devices", or "fix node-red".

Registry SourceRecently Updated
Coding

Yt Dlp

A robust CLI wrapper for yt-dlp to download videos, playlists, and audio from YouTube and thousands of other sites. Supports format selection, quality control, metadata embedding, and cookie authentication.

Registry SourceRecently Updated
Coding

Daily Dev Agentic

daily.dev Agentic Learning - continuous self-improvement through daily.dev feeds. Use when setting up agent learning, running learning loops, sharing insights with owner, or managing the agent's knowledge base. Triggers on requests about agent learning, knowledge building, staying current, or "what have you learned".

Registry SourceRecently Updated