Interact with a live local Chrome-family browser session over CDP, using target-based commands for listing tabs, inspecting pages, clicking, typing, and debugging.
Target-based Chrome DevTools Protocol tooling for live browser sessions.
Harness note: this skill now centers on
scripts/cdp.mjs. Helper scripts for cookie dismissal, picking, and logging remain available, but the primary workflow is tab selection vialistand a target prefix.
chrome://inspect/#remote-debuggingCDP_PORT_FILE if your browser stores DevToolsActivePort in a non-standard locationSupported browser discovery includes Chrome, Chromium, Brave, Edge, and Vivaldi.
List open tabs first:
./scripts/cdp.mjs list
Use the unique target prefix from list for all tab commands.
./scripts/cdp.mjs list
./scripts/cdp.mjs shot <target> [file]
./scripts/cdp.mjs snap <target>
./scripts/cdp.mjs html <target> [".selector"]
./scripts/cdp.mjs eval <target> "expression"
./scripts/cdp.mjs nav <target> https://example.com
./scripts/cdp.mjs net <target>
./scripts/cdp.mjs click <target> "selector"
./scripts/cdp.mjs clickxy <target> <x> <y>
./scripts/cdp.mjs type <target> "text"
./scripts/cdp.mjs loadall <target> "selector"
./scripts/cdp.mjs evalraw <target> <method> [json]
./scripts/cdp.mjs open [url]
./scripts/cdp.mjs stop [target]
Notes:
clickxy uses CSS pixels, not screenshot image pixelstype uses CDP input events and is better than JS eval for text entry./scripts/pick.js "Click the submit button"
Interactive picker for the active page.
./scripts/dismiss-cookies.js
./scripts/dismiss-cookies.js --reject
Runs against the active page and attempts to accept or reject common consent dialogs.
./scripts/watch.js
./scripts/logs-tail.js
./scripts/logs-tail.js --follow
./scripts/net-summary.js
Writes JSONL logs to:
~/.cache/agent-web/logs/YYYY-MM-DD/<targetId>.jsonl
These wrappers now delegate to cdp.mjs:
./scripts/nav.js <target> <url>
./scripts/eval.js <target> "expression"
./scripts/screenshot.js <target> [file]
snap for semantic structure and html when you need exact markupevalraw for unsupported CDP methods instead of adding one-off scripts