Back to Skills

chrome-automation

Automate Chrome browser tasks using agent-browser CLI. Navigate pages, fill forms, click buttons, take screenshots, extract data, and replay recorded workflows — all inside the user's real Chrome session.

Updated 7/1/2026

Security Assessment

Safe(100/100)
Security Score100/100

About chrome-automation

A browser-automation skill that drives tasks in the user's real Chrome session through the agent-browser CLI. It can navigate pages, fill forms, click buttons, take screenshots, extract data, and replay recorded workflows, all inside the user's existing browser rather than a fresh Playwright instance. Its core principle is to reuse the single Chrome process the user already has open, which preserves cookies, login sessions, and page state, an important advantage for marketing platforms like social dashboards, ad managers, and CMS tools that require login. As a prerequisite, agent-browser must be installed and Chrome must have remote debugging enabled.

The recommended pattern always starts by listing existing tabs with agent-browser and the tab list command; if the target page is already open it switches to that tab, otherwise it opens the URL. The auto-connect flag discovers Chrome with remote debugging; for Chrome 144 and later WebSocket-only endpoints where discovery URLs return 404, the guidance shows connecting via npx agent-browser at latest to a devtools browser WebSocket endpoint on 127.0.0.1 port 9222. Interaction relies on the snapshot command to enumerate interactive elements as refs like at-e1 and at-e2, which are then used with click, fill, keyboard inserttext, press, scroll, wait, eval, and screenshot. A step-type mapping table distinguishes standard inputs, which use fill, from contenteditable rich-text editors, which need focus first and then keyboard inserttext, and it stresses that refs are invalidated when the page changes, so re-snapshotting after navigation, form submission, or dynamic loads is required.

It can replay recordings exported from the Chrome DevTools Recorder in JSON (recommended, readable progressively with jq), @puppeteer/replay JS, or Puppeteer JS formats, matching the recording's aria selectors against snapshots and falling back to text selectors, CSS hints, then screenshots, while avoiding brittle ember IDs, numeric IDs, and exact XPaths. A dedicated section handles iframe-heavy sites such as LinkedIn and Gmail, where the snapshot command cannot penetrate iframes: workarounds include using eval on same-origin iframe content, keyboard input for focused elements, and reading full page text. Setup details live in references/agent-browser-setup.md.

FAQ

What must be set up before using this skill?

agent-browser must be installed and Chrome must have remote debugging enabled; if unsure, the references/agent-browser-setup.md guide covers setup, and the auto-connect flag is used to discover the running Chrome instance.

Why does it always list tabs before opening a page?

The user's Chrome already holds their cookies and login sessions, so if the target page is open it switches to that tab to avoid re-authentication and wasted time; only if it is not open does it open the URL.

How do I fill a rich text editor versus a normal input?

For standard inputs or textareas use fill; for contenteditable divs or rich text editors like LinkedIn, Gmail, or Slack, click to focus first and then use keyboard inserttext.

What recording formats can be replayed?

Chrome DevTools Recorder exports in JSON (recommended, readable with jq), @puppeteer/replay JS, and Puppeteer JS are supported; matching should use aria selectors and avoid brittle ember IDs, numeric IDs, or exact XPaths.

Can it interact with content inside iframes?

The snapshot command cannot penetrate iframes, but you can use eval to access same-origin iframe content, keyboard inserttext for a focused iframe element, and read full page text to see iframe content.

All Files

7 files
references/linkedin.md14.8 KB
View
references/agent-browser-setup.md3.2 KB
View
references/x.md11.7 KB
View
references/devto.md11.6 KB
View
SKILL.md14.5 KB
View
references/hackernews.md10.0 KB
View
references/reddit.md7.2 KB
View

Install chrome-automation

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill