web-browser

Automate Chromium-based browser navigation, element interaction, and data extraction via CDP.

16|Updated Aug 29, 2025
One-click install
npx skills add https://github.com/sourcegraph/amp-contrib --skill web-browser-sourcegraph
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: web-browser
Source: https://github.com/sourcegraph/amp-contrib/tree/main/web-browser
Command: npx skills add https://github.com/sourcegraph/amp-contrib --skill web-browser-sourcegraph

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables automated web interactions by remote-controlling a Chrome/Chromium browser via the Chrome DevTools Protocol (CDP). It supports navigation, JavaScript evaluation, screenshots, and element-based actions.

Core Features & Use Cases

  • Chrome CDP Control: Start and connect to a headful or headless Chrome instance for remote automation.
  • Navigation & Interaction: Navigate to pages and interact with pages programmatically.
  • JavaScript Evaluation: Run custom scripts in the active page and retrieve results.
  • Screenshots & Pick: Capture screenshots of the current page and pick page elements for inspection.

Quick Start

  1. Start Chrome with remote debugging: ./tools/start.js
  2. Navigate to a page: ./tools/nav.js https://example.com
  3. Evaluate code: ./tools/eval.js 'document.title'
  4. Take a screenshot: ./tools/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 browser tasks with Chrome DevTools Protocol?

Chrome DevTools Protocol (CDP) enables remote automation of Chromium browsers for navigation, JavaScript execution, and element interaction. This Skill provides utilities to start Chrome with remote debugging, navigate to URLs, evaluate scripts, capture screenshots, and interact with DOM elements programmatically without manual browser control.

What do I need to set up before automating web tasks with CDP?

You need a Chrome or Chromium browser with remote debugging enabled on port 9222, Node.js runtime, Puppeteer-core library, and the supplied utility scripts (start.js, nav.js, eval.js, pick.js, screenshot.js). Start Chrome with remote debugging, then use the utilities to connect and execute automation tasks.

Can I take screenshots and extract data from web pages programmatically?

Yes. This Skill captures full-page screenshots via CDP and extracts DOM elements and data by running JavaScript in the active page context. The screenshot.js utility captures visual state; eval.js executes custom scripts to retrieve page content, attributes, or computed values.

How do I navigate to pages and interact with elements using CDP?

Use nav.js to navigate to URLs and eval.js to run JavaScript for element clicks, form fills, or other interactions. The pick.js utility allows interactive DOM element selection and inspection. Chain these utilities to perform multi-step workflows like form submission or data collection across pages.

Does this Skill work with headless Chrome automation?

Yes. The Skill supports both headful and headless Chrome instances via CDP. Start Chrome with or without a display using the start.js utility; remote automation over CDP functions identically regardless of visual rendering, enabling server-side or CI/CD web automation.

What limitations exist when automating web tasks with CDP?

Automation requires a running Chrome/Chromium instance with remote debugging active on port 9222. It executes JavaScript in the page context only—cannot bypass same-origin policies or interact with cross-origin resources. Performance depends on page complexity and network latency.