Skip to main content
skill CX Codex

electron · fcakyon — Claude Code skill: automate desktop Electron apps

A skill that drives Electron desktop apps like Slack, VS Code, Discord, Figma and Spotify over the Chrome DevTools Protocol.

Apache-2.0 ★ 1,216 updated 2026-10-24

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add fcakyon/claude-codex-settings
/plugin install agent-browser@claude-settings
Open on GitHub

What electron does

The skill talks to an Electron app's remote debugging port and reuses the same snapshot-and-click loop as browser automation: take a snapshot of the UI, act on an element by its ref, snapshot again after the view changes. The target app has to be started with a --remote-debugging-port=NNNN flag at launch time, so an already-running app needs to be closed and relaunched with that flag before anything can connect.

Under the hood it runs agent-browser commands: connect, snapshot -i, click, fill, screenshot, plus tab for switching between windows and embedded webviews, and keyboard type or keyboard inserttext for input fields that resist a plain fill. Named sessions via --session let you drive several apps at once, and a --color-scheme dark flag fixes the light theme that CDP connections sometimes force on.

It covers any Electron-based app, from Slack, Discord and Microsoft Teams to GitHub Desktop, Postman, Figma, Obsidian, Spotify and Linear.

What it helps with

  • attach to a running Electron app over CDP
  • click through a desktop app's UI using element refs from a snapshot
  • switch between windows and webviews inside one app
  • type into input fields that ignore a plain fill command
  • capture screenshots of a desktop app's current state

Example prompts for the agent

  • Launch Slack with --remote-debugging-port=9222 and connect agent-browser to it
  • Snapshot the VS Code window and click the settings icon
  • Switch to the webview tab in Discord and fill the search box

How to install electron

1Plugin marketplace

/plugin marketplace add fcakyon/claude-codex-settings
/plugin install agent-browser@claude-settings

This installs the whole agent-browser plugin with all its skills

2Skills CLI (Vercel)

npx skills add fcakyon/claude-codex-settings --skill electron -a claude-code

3Manually: put the files in place

~/.claude/skills/electron/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/electron/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about electron

How do I install electron in Claude Code?

Run /plugin marketplace add fcakyon/claude-codex-settings, then /plugin install agent-browser@claude-settings.

What does the electron skill do?

It connects agent-browser to an Electron app through the Chrome DevTools Protocol so an agent can snapshot the UI, click elements, fill fields, and switch between windows and webviews.

Which apps can the electron skill control?

Any Electron-based app, including Slack, Discord, Microsoft Teams, VS Code, GitHub Desktop, Postman, Figma, Notion, Obsidian, Spotify and Linear.

Source text

SKILL.md · Apache-2.0
---
name: electron
description: 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:*)
license: Apache-2.0
---

# 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 enabled
2. **Connect** agent-browser to the CDP port
3. **Snapshot** to discover interactive elements
4. **Interact** using element refs
5. **Re-snapshot** after navigation or state changes

```bash
# Launch an Electron app with remote debugging
open -a "Slack" --args --remote-debugging-port=9222

# Connect agent-browser to the app
agent-browser connect 9222

# Standard workflow from here
agent-browser snapshot -i
agent-browser click @e5
agent-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
# Slack
open -a "Slack" --args --remote-debugging-port=9222

# VS Code
open -a "Visual Studio Code" --args --remote-debugging-port=9223

# Discord
open -a "Discord" --args --remote-debugging-port=9224

# Figma
open -a "Figma" --args --remote-debugging-port=9225

# Notion
open -a "Notion" --args --remote-debugging-port=9226

# Spotify
open -a "Spotify" --args --remote-debugging-port=9227
```

### Linux

```bash
slack --remote-debugging-port=9222
code --remote-debugging-port=9223
discord --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 port
agent-browser connect 9222

# Or use --cdp on each command
agent-browser --cdp 9222 snapshot -i

# Auto-discover a running Chromium-based app
agent-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 index
agent-browser tab 2

# Switch by URL pattern
agent-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 app
agent-browser connect 9222

# List targets -- webviews appear alongside pages
agent-browser tab
# Example output:
#   0: [page]    Slack - Main Window     https://app.slack.com/
#   1: [webview] Embedded Content        https://example.com/widget

# Switch to a webview
agent-browser tab 1

# Interact with the webview normally
agent-browser snapshot -i
agent-browser click @e3
agent-browser screenshot webview.png
```

**Note:** Webview support works via raw CDP connection.

## Common Patterns

### Inspect and Navigate an App

```bash
open -a "Slack" --args --remote-debugging-port=9222
sleep 3  # Wait for app to start
agent-browser connect 9222
agent-browser snapshot -i
# Read the snapshot output to identify UI elements
agent-browser click @e10  # Navigate to a section
agent-browser snapshot -i  # Re-snapshot after navigation
```

### Take Screenshots of Desktop Apps

```bash
agent-browser connect 9222
agent-browser screenshot app-state.png
agent-browser screenshot --full full-app.png
agent-browser screenshot --annotate annotated-app.png
```

### Extract Data from a Desktop App

```bash
agent-browser connect 9222
agent-browser snapshot -i
agent-browser get text @e5
agent-browser snapshot --json > app-state.json
```

### Fill Forms in Desktop Apps

```bash
agent-browser connect 9222
agent-browser snapshot -i
agent-browser fill @e3 "search query"
agent-browser press Enter
agent-browser wait 1000
agent-browser snapshot -i
```

### Run Multiple Apps Simultaneously

Use named sessions to control multiple Electron apps at the same time:

```bash
# Connect to Slack
agent-browser --session slack connect 9222

# Connect to VS Code
agent-browser --session vscode connect 9223

# Interact with each independently
agent-browser --session slack snapshot -i
agent-browser --session vscode snapshot -i
```

## Color Scheme

The default color scheme when connecting via CDP may be `light`. To preserve dark mode:

```bash
agent-browser connect 9222
agent-browser --color-scheme dark snapshot -i
```

Or set it globally:

```bash
AGENT_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.

© fcakyon · Apache-2.0 · fcakyon/claude-codex-settings

Similar skills

All skills for Automation and no-code: n8n, Zapier, Make →

electron by other authors comes first.

electron gentleman-programming Guides desktop app development in Electron with secure IPC patterns, typed channels, and clear separation between main and renderer processes. CX Codex +1 175installs qiaomu-opencli-usage joeseesun qiaomu-opencli-usage guides an agent through OpenCLI commands for websites, apps and public APIs. Use it when you need the right adapter command or output format. CX Codex +1 1,000installs agent-browser vercel-labs This Claude Code skill automates browser interaction for tasks like navigating sites, filling forms, and testing web apps. It also supports exploratory QA and Electron app automation. CX Codex +1 1,600,000installs electron-chromium-upgrade electron electron-chromium-upgrade guides Chromium version rolls in the Electron repository on the roller/chromium/main branch. Resolves patch conflicts during e sync --3 and handles commit formatting. CX Codex +1 625installs daytona-dev Devin-AXIS daytona-dev — a skill for Claude Code and Codex that sets up a Daytona cloud sandbox running an XFCE/noVNC desktop. The iPolloWork Electron app becomes accessible through the browser at port 6080. CX Codex +1 ★ 7,523repo stars flow-next-drive Gordon Mickel flow-next-drive drives a web page or a desktop app the way a user would: it identifies the surface, picks a driver, checks the console and grabs screenshots. CX Codex +1 ★ 730repo stars Weavetab Weavetab Weavetab lets AI agents operate Chromium pages and local Electron apps through CDP. It provides structured page maps and tools for interacting with visible interface elements. CX Codex +1 ★ 3repo stars

From the same set113

The whole set →
payment-testing The payment-testing rule explains local checks for login, Stripe events, subscription renewals, refunds, and the backoffice. Use it when a payment flow behaves differently in your local stack. CX Codex +1 ★ 1,216repo stars troubleshooting troubleshooting — a rule covering common failures in a Dockerized Polar dev stack, from stuck ports to stale database connections. CX Codex +1 ★ 1,216repo stars supabase-js Adds practical cheat sheets and patterns for @supabase/supabase-js to your AI coding agent, covering Auth, Storage, Edge Functions, and queries. CX Codex +1 ★ 1,216repo stars create-pr The create-pr skill checks a branch, prepares a review-ready pull request, and publishes it with gh. Use it when you want an agent to handle the PR workflow for your changes. CX Codex +1 ★ 1,216repo stars pull The pull command syncs local configuration, database schema, and Edge Functions with a linked Supabase project. Use it to refresh them in one run. CX Codex +1 ★ 1,216repo stars hetzner-deploy hetzner-deploy — a skill for managing Hetzner Cloud infrastructure via the hcloud CLI: servers, networks, firewalls, load balancers, DNS zones, and volumes. CX Codex +1 ★ 1,216repo stars ui-regression ui-regression verifies web apps and browser extensions on localhost, staging, or production across user flows, recovery states, locales, and viewports. CX Codex +1 ★ 1,216repo stars humanize humanize is a Claude Code skill for revising text to sound natural while keeping its meaning. It activates on requests to edit replies, docs, comments, emails, and other writing. CX Codex +1 ★ 1,216repo stars

Project sponsors

Companies that keep this analytics open