web-browser

Control Chrome via CDP to navigate pages and execute JavaScript.

223|6|Updated May 25, 2018
One-click install
npx skills add https://github.com/megalithic/dotfiles --skill web-browser-megalithic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-browser
Source: https://github.com/megalithic/dotfiles/tree/main/home/programs/ai/pi-coding-agent/skills-with-deps/web-browser
Command: npx skills add https://github.com/megalithic/dotfiles --skill web-browser-megalithic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ws, and includes scripts (resource) components.

What problem does it solve?

This skill enables automated web page interaction by remotely controlling Chrome or Chromium via the Chrome DevTools Protocol, enabling precise automation and collaborative site exploration.

Core Features & Use Cases

Minimal CDP client tools to navigate pages, execute JavaScript, take screenshots, pick DOM elements, and dismiss cookie dialogs across sites, enabling reproducible web-automation tasks in a collaborative workflow.

Quick Start

Start Chrome with remote debugging: ./scripts/start.js Navigate to a page: ./scripts/nav.js https://example.com Evaluate JavaScript: ./scripts/eval.js 'document.title' Take a screenshot: ./scripts/screenshot.js

Frequently Asked Questions about web-browser

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate web page interaction using Chrome DevTools Protocol?

To automate web pages via Chrome CDP, start a local Chrome instance with remote debugging enabled and execute Node scripts to navigate URLs, evaluate JavaScript, take screenshots, and pick DOM elements deterministically.

Can I take screenshots and evaluate JavaScript on a remote page with CDP?

Yes, you can take screenshots and evaluate JavaScript on a remote page by running the screenshot.js and eval.js Node scripts, which communicate directly with Chrome via the DevTools Protocol to capture output and execute commands.

Do I need a specific browser setup to run Chrome CDP automation scripts?

Yes, Chrome CDP automation scripts require a local Chrome or Chromium instance started with remote debugging enabled. The provided start.js script initializes this environment, allowing subsequent Node scripts to connect and execute browser commands.

What is the best way to dismiss cookie dialogs during web automation?

The best way to dismiss cookie dialogs during web automation is using the provided CDP script designed to automatically detect and close consent popups, ensuring reproducible task execution across various websites without manual intervention.

Does this Chrome CDP approach work for collaborative site exploration?

Yes, this Chrome CDP approach works for collaborative site exploration by providing minimal client tools that apply across various websites, enabling teams to execute reproducible web-automation tasks and share deterministic page interaction results.