cdp
Installation
SKILL.md
Browser / Page / Locator
browser-harness-js executes JavaScript in a persistent Node daemon. Use a quoted
heredoc for coherent work. Top-level await works; multi-statement snippets need
return. Store cross-call state on globalThis; local const bindings do not
survive. Returned strings print directly; objects print JSON. Console output goes
to the daemon log, not the CLI response.
Connect and scope
browser-harness-js <<'EOF'
await browser.connect(); // or { port: 9222 } / { wsUrl: 'ws://…' }
return await browser.tabs(); // inspect; never silently pick tabs[0]
EOF
Attach an authorized target with an explicit allowlist, or open a background tab: