npx skills add https://github.com/vercel-labs/agent-browser --skill electronHow Electron fits into a Paperclip company.
Electron drops into any Paperclip agent that handles this kind of work. Assign it to a specialist inside a pre-configured PaperclipOrg company and the skill becomes available on every heartbeat — no prompt engineering, no tool wiring.
Pre-configured AI company — 18 agents, 18 skills, one-time purchase.
SKILL.md236 linesExpandCollapse
---name: electrondescription: Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include "automate Slack app", "control VS Code", "interact with Discord app", "test this Electron app", "connect to desktop app", or any task requiring automation of a native Electron application.allowed-tools: Bash(agent-browser:*), Bash(npx agent-browser:*)--- # Electron App Automation Automate any Electron desktop app using agent-browser. Electron apps are built on Chromium and expose a Chrome DevTools Protocol (CDP) port that agent-browser can connect to, enabling the same snapshot-interact workflow used for web pages. ## Core Workflow 1. **Launch** the Electron app with remote debugging enabled2. **Connect** agent-browser to the CDP port3. **Snapshot** to discover interactive elements4. **Interact** using element refs5. **Re-snapshot** after navigation or state changes ```bash# Launch an Electron app with remote debuggingopen -a "Slack" --args --remote-debugging-port=9222 # Connect agent-browser to the appagent-browser connect 9222 # Standard workflow from hereagent-browser snapshot -iagent-browser click @e5agent-browser screenshot slack-desktop.png``` ## Launching Electron Apps with CDP Every Electron app supports the `--remote-debugging-port` flag since it's built into Chromium. ### macOS ```bash# Slackopen -a "Slack" --args --remote-debugging-port=9222 # VS Codeopen -a "Visual Studio Code" --args --remote-debugging-port=9223 # Discordopen -a "Discord" --args --remote-debugging-port=9224 # Figmaopen -a "Figma" --args --remote-debugging-port=9225 # Notionopen -a "Notion" --args --remote-debugging-port=9226 # Spotifyopen -a "Spotify" --args --remote-debugging-port=9227``` ### Linux ```bashslack --remote-debugging-port=9222code --remote-debugging-port=9223discord --remote-debugging-port=9224``` ### Windows ```bash"C:\Users\%USERNAME%\AppData\Local\slack\slack.exe" --remote-debugging-port=9222"C:\Users\%USERNAME%\AppData\Local\Programs\Microsoft VS Code\Code.exe" --remote-debugging-port=9223``` **Important:** If the app is already running, quit it first, then relaunch with the flag. The `--remote-debugging-port` flag must be present at launch time. ## Connecting ```bash# Connect to a specific portagent-browser connect 9222 # Or use --cdp on each commandagent-browser --cdp 9222 snapshot -i # Auto-discover a running Chromium-based appagent-browser --auto-connect snapshot -i``` After `connect`, all subsequent commands target the connected app without needing `--cdp`. ## Tab Management Electron apps often have multiple windows or webviews. Use tab commands to list and switch between them: ```bash# List all available targets (windows, webviews, etc.)agent-browser tab # Switch to a specific tab by indexagent-browser tab 2 # Switch by URL patternagent-browser tab --url "*settings*"``` ## Webview Support Electron `<webview>` elements are automatically discovered and can be controlled like regular pages. Webviews appear as separate targets in the tab list with `type: "webview"`: ```bash# Connect to running Electron appagent-browser connect 9222 # List targets -- webviews appear alongside pagesagent-browser tab# Example output:# 0: [page] Slack - Main Window https://app.slack.com/# 1: [webview] Embedded Content https://example.com/widget # Switch to a webviewagent-browser tab 1 # Interact with the webview normallyagent-browser snapshot -iagent-browser click @e3agent-browser screenshot webview.png``` **Note:** Webview support works via raw CDP connection. ## Common Patterns ### Inspect and Navigate an App ```bashopen -a "Slack" --args --remote-debugging-port=9222sleep 3 # Wait for app to startagent-browser connect 9222agent-browser snapshot -i# Read the snapshot output to identify UI elementsagent-browser click @e10 # Navigate to a sectionagent-browser snapshot -i # Re-snapshot after navigation``` ### Take Screenshots of Desktop Apps ```bashagent-browser connect 9222agent-browser screenshot app-state.pngagent-browser screenshot --full full-app.pngagent-browser screenshot --annotate annotated-app.png``` ### Extract Data from a Desktop App ```bashagent-browser connect 9222agent-browser snapshot -iagent-browser get text @e5agent-browser snapshot --json > app-state.json``` ### Fill Forms in Desktop Apps ```bashagent-browser connect 9222agent-browser snapshot -iagent-browser fill @e3 "search query"agent-browser press Enteragent-browser wait 1000agent-browser snapshot -i``` ### Run Multiple Apps Simultaneously Use named sessions to control multiple Electron apps at the same time: ```bash# Connect to Slackagent-browser --session slack connect 9222 # Connect to VS Codeagent-browser --session vscode connect 9223 # Interact with each independentlyagent-browser --session slack snapshot -iagent-browser --session vscode snapshot -i``` ## Color Scheme The default color scheme when connecting via CDP may be `light`. To preserve dark mode: ```bashagent-browser connect 9222agent-browser --color-scheme dark snapshot -i``` Or set it globally: ```bashAGENT_BROWSER_COLOR_SCHEME=dark agent-browser connect 9222``` ## Troubleshooting ### "Connection refused" or "Cannot connect" - Make sure the app was launched with `--remote-debugging-port=NNNN`- If the app was already running, quit and relaunch with the flag- Check that the port isn't in use by another process: `lsof -i :9222` ### App launches but connect fails - Wait a few seconds after launch before connecting (`sleep 3`)- Some apps take time to initialize their webview ### Elements not appearing in snapshot - The app may use multiple webviews. Use `agent-browser tab` to list targets and switch to the right one ### Cannot type in input fields - Try `agent-browser keyboard type "text"` to type at the current focus without a selector- Some Electron apps use custom input components; use `agent-browser keyboard inserttext "text"` to bypass key events ## Supported Apps Any app built on Electron works, including: - **Communication:** Slack, Discord, Microsoft Teams, Signal, Telegram Desktop- **Development:** VS Code, GitHub Desktop, Postman, Insomnia- **Design:** Figma, Notion, Obsidian- **Media:** Spotify, Tidal- **Productivity:** Todoist, Linear, 1Password If an app is built with Electron, it supports `--remote-debugging-port` and can be automated with agent-browser.Agent Browser
A comprehensive browser automation CLI that handles the full spectrum of web interaction tasks through Chrome DevTools Protocol. What impressed me most is the t
Agentcore
Install Agentcore skill for Claude Code from vercel-labs/agent-browser.
Core
Install Core skill for Claude Code from vercel-labs/json-render.