browser-tools

Interactive browser automation via Chrome DevTools Protocol. Use when you need to interact with web pages, test frontends, or when user interaction with a visible browser is required.

⭐3stars🔀0forks📁View on GitHub🕐Updated Jan 9, 2026⬇️3downloads

When & Why to Use This Skill

This Claude skill provides a comprehensive suite of browser automation tools powered by the Chrome DevTools Protocol. It enables agents to interact with web pages in real-time, execute JavaScript, capture visual state via screenshots, and extract clean markdown content from dynamic websites. It is designed to bridge the gap between AI reasoning and interactive web environments, making it ideal for tasks requiring a 'human-in-the-loop' browser experience or complex frontend interactions.

Use Cases

  • Automated Frontend Testing: Execute and verify UI components within a live Chromium browser to ensure web applications behave correctly under different conditions.
  • Dynamic Data Scraping: Extract readable content and data from JavaScript-heavy websites and Single Page Applications (SPAs) that traditional static scrapers cannot handle.
  • Interactive Element Selection: Use the 'browser-pick' tool to allow users to visually select DOM elements, generating precise CSS selectors for further automation tasks.
  • Visual Auditing and Debugging: Capture screenshots of web pages to verify layouts, inspect CSS/JS execution results, and troubleshoot rendering issues.
  • Session and Cookie Management: Inspect, debug, and export browser cookies to handle authenticated sessions and maintain state across automated workflows.
namebrowser-tools
descriptionInteractive browser automation via Chrome DevTools Protocol. Use when you need to interact with web pages, test frontends, or when user interaction with a visible browser is required.

Browser Tools

Chrome DevTools Protocol tools for agent-assisted web automation. These tools connect to a Chromium-based browser (Chromium/Chrome) running on :9222 with remote debugging enabled.

Setup

Run once before first use:

cd "$HOME/.agents/skills/browser-tools"
npm install

Start Chromium / Chrome

"$HOME/.agents/skills/browser-tools/browser-start.js"              # Fresh profile
"$HOME/.agents/skills/browser-tools/browser-start.js" --profile    # Copy your profile (cookies, logins)
"$HOME/.agents/skills/browser-tools/browser-start.js" --browser chromium
"$HOME/.agents/skills/browser-tools/browser-start.js" --browser chrome

Launch a browser with remote debugging on :9222. Use --profile to preserve your authentication state.

If the auto-detection picks the wrong browser, set:

  • BROWSER_TOOLS_BROWSER=chromium (or chrome)
  • BROWSER_TOOLS_EXECUTABLE=/absolute/path/to/browser
  • BROWSER_TOOLS_PROFILE_SRC=/absolute/path/to/profile/dir (optional)
"$HOME/.agents/skills/browser-tools/browser-nav.js" https://example.com
"$HOME/.agents/skills/browser-tools/browser-nav.js" https://example.com --new

Navigate to URLs. Use --new flag to open in a new tab instead of reusing current tab.

Evaluate JavaScript

"$HOME/.agents/skills/browser-tools/browser-eval.js" 'document.title'
"$HOME/.agents/skills/browser-tools/browser-eval.js" 'document.querySelectorAll("a").length'

Execute JavaScript in the active tab. Code runs in async context. Use this to extract data, inspect page state, or perform DOM operations programmatically.

For multi-line code or statements, wrap in an IIFE:

"$HOME/.agents/skills/browser-tools/browser-eval.js" '(() => { const x = 1; return x + 1; })()'

Screenshot

"$HOME/.agents/skills/browser-tools/browser-screenshot.js"

Capture current viewport and return temporary file path. Use this to visually inspect page state or verify UI changes.

Pick Elements

"$HOME/.agents/skills/browser-tools/browser-pick.js" "Click the submit button"

IMPORTANT: Use this tool when the user wants to select specific DOM elements on the page. This launches an interactive picker that lets the user click elements to select them. The user can select multiple elements (Cmd/Ctrl+Click) and press Enter when done. The tool returns CSS selectors for the selected elements.

Common use cases:

  • User says "I want to click that button" → Use this tool to let them select it
  • User says "extract data from these items" → Use this tool to let them select the elements
  • When you need specific selectors but the page structure is complex or ambiguous

Cookies

"$HOME/.agents/skills/browser-tools/browser-cookies.js"
"$HOME/.agents/skills/browser-tools/browser-cookies.js" --format=netscape > cookies.txt

Display all cookies for the current tab including domain, path, httpOnly, and secure flags. Use this to debug authentication issues or inspect session state.

The --format=netscape option outputs cookies in Netscape format for use with curl/wget (curl -b cookies.txt).

Extract Page Content

"$HOME/.agents/skills/browser-tools/browser-content.js" https://example.com

Navigate to a URL and extract readable content as markdown. Uses Mozilla Readability for article extraction and Turndown for HTML-to-markdown conversion. Works on pages with JavaScript content (waits for page to load).

When to Use

  • Testing frontend code in a real browser
  • Interacting with pages that require JavaScript
  • When user needs to visually see or interact with a page
  • Debugging authentication or session issues
  • Scraping dynamic content that requires JS execution