| name | browser |
| description | Drive a real Chrome window — read pages as an accessibility tree, click, type, upload, wait, and run JavaScript. Use for anything on a site that needs a logged-in session, a rendered page, or interaction — reading a page that needs JavaScript, filling a form, checking how something looks, or working through a site the way a person would. |
browser
A real Chrome window, driven from the shell. It stays open between commands and
keeps its logins, so you can watch what is happening and take over by hand.
cd ~/.pi/agent/skills/browser/scripts
node start.mjs
The first run installs Playwright and says so — a few seconds, once per
machine, nothing to do. It also makes a profile of its own: log into whatever
you need, once, by hand in that window, and it is kept from then on.
The loop
Take a snapshot, read it, act on the numbers it printed.
node nav.mjs github.com/BurntSushi/ripgrep
node snapshot.mjs
The snapshot is the page's accessibility tree — every frame, nothing
summarised. Read it or grep it. Interactive elements are numbered:
[20] link "Issues"
[39] combobox "Search Issues"
Those numbers are what the other commands take. They belong to the snapshot
that printed them; after anything changes the page, take another.
Acting
node click.mjs 20
node fill.mjs 39 "memory leak"
node press.mjs Escape
node select.mjs 12 "Option 1"
node hover.mjs 8
node upload.mjs 5 ./report.pdf