browser
Browser automation via the `agent-browser` CLI: drive websites or Electron apps (forms, clicks, screenshots, scraping, web-app/UI tests, the dashboard Electron shell) or the user's own logged-in Chrome via browser relay/Panerelay (SSO/2FA); native desktop apps route to agent-desktop. Triggers: "open a website", "take a screenshot", "test this web app", "use my own browser", "control my desktop".
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-12
- Stars
- ★ 348
- Forks
- 56
01 前言 Front Matter
- name
- browser
- license
- Apache-2.0
- metadata
- { "author": "pi-dashboard", "version": "1.3", "vendoredFrom": "agent-browser", "vendoredVersion": "0.41.2", "verifiedAgainstCli": "0.41.2" }
- description
- Browser automation via the `agent-browser` CLI: drive websites or Electron apps (forms, clicks, screenshots, scraping, web-app/UI tests, the dashboard Electron shell) or the user's own logged-in Chrome via browser relay/Panerelay (SSO/2FA); native desktop apps route to agent-desktop. Triggers: "open a website", "take a screenshot", "test this web app", "use my own browser", "control my desktop".
- allowed-tools
- Bash(agent-browser:*), Bash(npx agent-browser:*), Bash(npx @panerelay/setup:*), Bash(curl:*), Bash(pi-dashboard:*)
02 资源文件 20
- 许可证LICENSE10.7 KB
- 参考文档references/challenge.md7.5 KB
- 参考文档references/challenge.md.AGENTS.md1.3 KB
- 参考文档references/dashboard-relay.md18.4 KB
- 参考文档references/dashboard-relay.md.AGENTS.md2.3 KB
- 参考文档references/desktop.md5.2 KB
- 参考文档references/electron.agent.md4.3 KB
- 参考文档references/electron.md9.0 KB
- 参考文档references/electron.md.AGENTS.md316 B
- 参考文档references/own-browser.agent.md5.3 KB
- 参考文档references/own-browser.md12.5 KB
- 参考文档references/own-browser.md.AGENTS.md1.2 KB
- 参考文档references/web.agent.md45.0 KB
- 参考文档references/web.md141.4 KB
- 参考文档references/web.md.AGENTS.md371 B
- 脚本scripts/check-panerelay.sh6.4 KB
- 脚本scripts/check-panerelay.sh.AGENTS.md928 B
- 脚本scripts/detect-dashboard.sh1.7 KB
- 参考文档SKILL.md.AGENTS.md1.4 KB
- 参考文档UPSTREAM.md3.1 KB
03 SKILL.md 正文
browser
Composite skill that gives the agent eyes and hands for any browser-driven
task — web pages or Electron desktop apps — via the agent-browser CLI.
Three recipes:
- Web automation — generic web pages plus Pi Dashboard-specific helpers
(dashboard URL detection, responsive testing, console-error hunting).
Reference:
references/web.md. - Electron automation — drive any Chromium-based Electron app, including
a worked example for the Pi Dashboard's own shell via
--debug-cdp. Reference:references/electron.md. - The user's own logged-in browser — reach SSO/2FA-gated sites using the
user's real cookies. Two paths:
- Pi Dashboard browser (preferred when the pi session runs on the
dashboard host) —
browser_connecthands back a loopback CDP URL for the dedicated profile or a Chrome profile (Playwright Chrome Extension). Reference:references/dashboard-relay.md. - Panerelay extension bridge (legacy) — a native-messaging host for when
there is no loopback dashboard. Reference:
references/own-browser.md.
- Pi Dashboard browser (preferred when the pi session runs on the
dashboard host) —
Native desktop apps (Finder, Calculator, any non-web UI — "control my
desktop") are out of scope for agent-browser: use agent-desktop and read
references/desktop.md first — install, and the
macOS Accessibility/Screen Recording trap (permission belongs to
pi-dashboard.app, which must be code-signed).
Step 0a — Preflight: agent-browser CLI must be installed
The skill does not bundle the CLI. Verify it through the dashboard tool
registry — recommend-only, nothing installs without an explicit --install:
pi-dashboard-ensure <extension-package-root>/package.json
<extension-package-root> is the package that ships this skill — three levels
above this SKILL.md's .pi/skills/browser/ directory (in a global install:
$(npm root -g)/@blackbelt-technology/pi-dashboard/node_modules/@blackbelt-technology/pi-dashboard-extension).
The manifest (pi.tools) declares agent-browser (resolve) and chromium
(pw-browser); the registry answers present / recommended / blocked per
tool.
-
agent-browser: present→ continue to Step 0b. -
agent-browser: recommendedorblocked→ halt and tell the user:The
agent-browserCLI is not installed. Install it as a pi extension so thebrowsertool is registered in your pi session too:pi install npm:pi-agent-browserThen re-invoke the skill.
-
chromiummissing → mention the registry's Install hint (npx playwright@1.62.1 install chromium) only when the chosen recipe needs a CDP browser; the dropdown on the Settings → Tools row carries it.
Do not attempt npm install, pi install, or any other install command
on the user's behalf — they should make that choice explicitly.
Step 0b — Auto-detect: route to the right recipe
After the preflight, decide which recipe applies. Run this 2-line probe:
if command -v lsof >/dev/null 2>&1; then
CDP_LIVE=$(lsof -ti :9222 >/dev/null 2>&1 && echo yes || echo no)
else
CDP_LIVE=$(nc -z 127.0.0.1 9222 2>/dev/null && echo yes || echo no)
fi
PD_RUNNING=$(pgrep -f "Pi Dashboard|pi-dashboard" >/dev/null 2>&1 && echo yes || echo no)
# Browser relay: the dashboard's own capability probe (see dashboard-relay.md).
RELAY=$(pi-dashboard api GET /api/browser/status 2>/dev/null || echo unavailable)
echo "CDP_LIVE=$CDP_LIVE PD_RUNNING=$PD_RUNNING RELAY=$RELAY"
Routing rule:
CDP_LIVE |
PD_RUNNING |
Route to | Why |
|---|---|---|---|
| yes | yes | references/electron.md |
Pi Dashboard Electron shell is attachable |
| no | yes | references/electron.md |
Pi Dashboard is up but CDP off — electron.md shows the --debug-cdp launch instruction |
| any | no | references/web.md |
No Electron target running; default to web |
Override: if the user's request is explicitly about a website (URL,
HTTPS host, "the dashboard at localhost:8000", etc.), route to
references/web.md regardless of what's running. Intent wins over capability.
Override: if the user's request is explicitly about an Electron app
that isn't Pi Dashboard (Slack, VS Code, Figma, …), route to
references/electron.md even when PD_RUNNING=no — that recipe covers
launching any Electron app with --remote-debugging-port.
Override (login state): if the target needs the user's existing session — "use my browser", "I'm already logged in", SSO/2FA, an internal tool the agent cannot sign into — route to a login-state recipe regardless of the probe. Pick by capability, in this order:
references/dashboard-relay.mdwhen the pi session runs on the dashboard host and the dashboard browser is available. This is the preferred path; it needs no extra install. Callbrowser_connect {}first (it picks the dedicated profile by default); without that tool, use the recipe's REST fallback — the probe'sRELAYmust be a JSON object with"enabled":trueand eitherdedicated.availableor"canOpenChrome":true. Aheadlessresult frombrowser_connectfor a login task is a stop, not a fallback.references/own-browser.md(legacy Panerelay bridge) only when the dashboard browser is unavailable (RELAY=unavailable,enabled:false) or the session is remote.browser_connectnever routes to Panerelay; this step is yours.
The default bundled browser starts logged out and cannot be made to inherit
those logins; --profile copies the profile and still loses macOS
Keychain-encrypted cookies. Prefer the bundled browser whenever login state is
irrelevant — it is faster and more capable. Never fall back to it for a
login-state task.
Step 1 — Read the matched recipe and execute
Read the reference file selected above, then follow its workflow. All references are self-contained; you do not need to read more than one.
Challenge encountered: if at any point the page is an interactive
anti-bot challenge (Cloudflare Turnstile, hCaptcha, reCAPTCHA, "Checking
your browser…") that withholds the content you asked for, stop and follow
references/challenge.md. Do not retry, do not
switch --session, --profile, or provider, and do not run close --all.
Notes
- Vendoring:
references/web.mdandreferences/electron.mdare snapshots of upstreamagent-browserskill content (coreandelectron) at CLI version 0.41.2. Other upstream skills (dogfood,derive-client,slack,webmcp-gen, …) are not vendored — load on demand withagent-browser skills list/agent-browser skills get <name>. SeeUPSTREAM.mdfor refresh procedure andLICENSEfor upstream attribution.references/own-browser.md,references/dashboard-relay.md,references/challenge.md, andreferences/desktop.mdare authored, not vendored — an upstream refresh must not overwrite them. - Login-state recipes:
references/dashboard-relay.mdis the preferred path (Pi Dashboard browser relay);references/own-browser.mdis the legacy Panerelay/native-messaging path for remote sessions with no loopback dashboard. - Three surfaces, one browser: the
browsertool (pi-agent-browserextension), the native MCP server (agent-browser mcp, see below) andBash: agent-browser …all drive the same daemon and same Chrome per session name, with a shared active page. Probing with one mid-task can silently move the page out from under another. Pick one surface per task; use--session <name>(MCP:"session"arg) for isolated browsers. - Known wrapper bug: the
browsertool'sevalechoes the JS source instead of executing it (and mangles regex escapes) — still present with CLI 0.41.2 /pi-agent-browser0.1.0, a wrapper defect. Use the native MCPagent_browser_evalorBash: agent-browser eval …instead. - Native MCP server (optional):
agent-browser mcp [--tools <profiles>]exposes typedagent_browser_*tools over stdio. Profiles:core(default, small),network,state,debug,tabs,react,mobile,all(~156 tools). Register in~/.pi/agent/mcp.json:{"mcpServers":{"agent-browser":{"type":"stdio","command":"agent-browser","args":["mcp","--tools","core"]}}}(use an absolutecommandpath under nvm). Call viamcp({tool:"agent_browser_open", args:{url, session}}). Each response carries ~1 KBstructuredContentlifecycle JSON — prefer the CLI for long loops. One-shot without a stdio session:agent-browser mcp call <tool> '<json>'. - No CLI bundled: agents installing the bridge extension get the skill text but not the CLI; install on demand per Step 0a.
- User-local override: if the user's project has its own
.pi/skills/browser/skill, pi's local-wins precedence applies and this skill is shadowed — that's by design.
04 同仓库更多 Skills
youtube-srt
Download YouTube subtitles (SRT + timestamped TXT) for a channel, playlist or video via yt-dlp, no media download; optionally mine them into a categorized catalog (e.g. AI models by function, open weights, local runnability, hardware tier). Use on "download the srt of this video", "transcripts of channel X for the last N months", "catalog the models AI Search talked about", "update docs/models".
video-transcription
Transcribe video and audio files to SRT subtitles with speaker diarization using the Soniox (default) or AssemblyAI API. Use when the user wants to transcribe meetings, videos, or audio files. Supports MKV, MP4, MOV, M4A, MP3. Triggers on "/transcribe", "transcribe my meetings", "transcribe videos in ~/Movies", or any request to convert audio/video to text.
speaker-id
Name anonymous diarized SRT speakers from a persistent local voiceprint library and repair speaker drift; local, CPU-only, no API key. Triggers "who is speaker 2", "put names on the transcript", "label the meeting SRT", "the diarization split one person into three", "enroll my voice". Backed by the pi-voiceid CLI.
veo-showreel-production-kit
Turn a video timeline + voiceover into a reproducible, sliceable Veo 3.1 prompt package with a consistency anchor and AI storyboard sketches.
veo-generator
Render a scripted video project into mp4 clips with the Google Veo 3.1 API. Reads a project's shot package (shots/*.md), one clip per camera cut, reusing each shot's prompt and sketch — world anchor only with `--with-reference`, seed unless `--no-seed`. Use on "render the Veo video for <project>", "generate the videos from the shot scripts", "make the clips with Veo".
hyperframes-showreel
Turn real screen and site footage into a rhythmic showreel rendered with HyperFrames: sampling, edit script, redacted clips, a generated composition, Veo only as additive FX, music edit + camera punches, delivery render and export QA. Use on "make a showreel from these recordings", "build the HyperFrames video", "assemble the footage edit", "render and QA the showreel".