pi-skill-agent-browser

extensionskillmaintained

Pi skill for browser automation via Chrome DevTools Protocol — navigate, evaluate JS, screenshot, pick elements, dismiss cookies, and monitor console/network logs.

by · v1.0.0 · published 3w ago

$ pi install npm:pi-skill-agent-browser
downloads/mo
0
stars
4
last push
3w ago
open issues
0

Signals

license: MITtestspi manifest: missinginstall size: —deps: 0peer deps: 0

Download trend

No downloads in the last 12 weeks.

README

pi-skill-agent-browser

A pi skill package for browser automation via Chrome DevTools Protocol (CDP).

What it does

When pi needs to browse the web — clicking buttons, filling forms, navigating pages, taking screenshots — this skill provides a lightweight set of CDP scripts that remote-control Google Chrome or Chromium. No Puppeteer, no Playwright, just raw CDP over WebSocket.

Capabilities

CommandDescription
agent-browser startLaunch Chrome with remote debugging on :9222 (fresh or with your profile)
agent-browser navNavigate current tab or open a new tab
agent-browser evalExecute JavaScript in the active tab
agent-browser screenshotCapture viewport screenshot, returns temp file path
agent-browser pickInteractive element picker (click to select, Cmd/Ctrl+Click multi-select)
agent-browser dismiss-cookiesAuto-dismiss EU cookie consent dialogs (accept or reject)
agent-browser watchBackground logging of console, errors, and network to JSONL
agent-browser logs-tailTail the latest log file
agent-browser net-summarySummarize network requests/responses from logs

Supported cookie consent platforms

OneTrust, Cookiebot, Didomi, Quantcast, Usercentrics, TrustArc, Klaro, CookieYes, Google, YouTube, BBC, Amazon, and generic pattern matching for unlisted CMPs.

Prerequisites

  • Google Chrome or Chromium installed
  • Node.js 18+

Install

# From git (global)
pi install https://github.com/picassio/pi-skill-agent-browser

# Project-local install
pi install -l https://github.com/picassio/pi-skill-agent-browser

# From a local clone
pi install /path/to/pi-skill-agent-browser

After install, run npm install in the skill's scripts/ directory to get the ws dependency:

cd <package-location>/skills/agent-browser/scripts && npm install

Usage

Once installed, the skill is auto-discovered. Ask pi to browse the web:

> Go to https://example.com and take a screenshot

Or invoke explicitly:

/skill:agent-browser Navigate to https://news.ycombinator.com and get all article titles

Quick start flow

# 1. Start Chrome
agent-browser start

# 2. Navigate
agent-browser nav https://example.com

# 3. Dismiss cookies
agent-browser dismiss-cookies

# 4. Evaluate JS
agent-browser eval 'document.title'

# 5. Screenshot
agent-browser screenshot

# 6. Pick an element interactively
agent-browser pick "Click the submit button"

Structure

pi-skill-agent-browser/
├── package.json
├── README.md
├── LICENSE
└── skills/
    └── agent-browser/
        ├── SKILL.md
        └── scripts/
            ├── package.json          # ws dependency
            ├── cdp.js                # Minimal CDP client
            ├── start.js              # Launch Chrome
            ├── nav.js                # Navigate tabs
            ├── eval.js               # Evaluate JS
            ├── screenshot.js         # Capture viewport
            ├── pick.js               # Interactive element picker
            ├── dismiss-cookies.js    # Cookie consent handler
            ├── watch.js              # Background logger
            ├── logs-tail.js          # Tail logs
            └── net-summary.js        # Network summary

Credits

Skill originally from badlogic/pi-skills web-browser skill, repackaged as a standalone pi package.

License

MIT