electron
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.
Best use case
electron is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. 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.
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.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "electron" skill to help with this workflow task. Context: 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.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/electron/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How electron Compares
| Feature / Agent | electron | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# 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.
Related Skills
azure-quotas
Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: "check quotas", "service limits", "current usage", "request quota increase", "quota exceeded", "validate capacity", "regional availability", "provisioning limits", "vCPU limit", "how many vCPUs available in my subscription".
raindrop-io
Manage Raindrop.io bookmarks with AI assistance. Save and organize bookmarks, search your collection, manage reading lists, and organize research materials. Use when working with bookmarks, web research, reading lists, or when user mentions Raindrop.io.
zlibrary-to-notebooklm
自动从 Z-Library 下载书籍并上传到 Google NotebookLM。支持 PDF/EPUB 格式,自动转换,一键创建知识库。
discover-skills
当你发现当前可用的技能都不够合适(或用户明确要求你寻找技能)时使用。本技能会基于任务目标和约束,给出一份精简的候选技能清单,帮助你选出最适配当前任务的技能。
web-performance-seo
Fix PageSpeed Insights/Lighthouse accessibility "!" errors caused by contrast audit failures (CSS filters, OKLCH/OKLAB, low opacity, gradient text, image backgrounds). Use for accessibility-driven SEO/performance debugging and remediation.
project-to-obsidian
将代码项目转换为 Obsidian 知识库。当用户提到 obsidian、项目文档、知识库、分析项目、转换项目 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入规则(默认到 00_Inbox/AI/、追加式、统一 Schema) 3. 执行 STEP 0: 使用 AskUserQuestion 询问用户确认 4. 用户确认后才开始 STEP 1 项目扫描 5. 严格按 STEP 0 → 1 → 2 → 3 → 4 顺序执行 【禁止行为】: - 禁止不读 SKILL.md 就开始分析项目 - 禁止跳过 STEP 0 用户确认 - 禁止直接在 30_Resources 创建(先到 00_Inbox/AI/) - 禁止自作主张决定输出位置
obsidian-helper
Obsidian 智能笔记助手。当用户提到 obsidian、日记、笔记、知识库、capture、review 时激活。 【激活后必须执行】: 1. 先完整阅读本 SKILL.md 文件 2. 理解 AI 写入三条硬规矩(00_Inbox/AI/、追加式、白名单字段) 3. 按 STEP 0 → STEP 1 → ... 顺序执行 4. 不要跳过任何步骤,不要自作主张 【禁止行为】: - 禁止不读 SKILL.md 就开始工作 - 禁止跳过用户确认步骤 - 禁止在非 00_Inbox/AI/ 位置创建新笔记(除非用户明确指定)
internationalizing-websites
Adds multi-language support to Next.js websites with proper SEO configuration including hreflang tags, localized sitemaps, and language-specific content. Use when adding new languages, setting up i18n, optimizing for international SEO, or when user mentions localization, translation, multi-language, or specific languages like Japanese, Korean, Chinese.
google-official-seo-guide
Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation
github-release-assistant
Generate bilingual GitHub release documentation (README.md + README.zh.md) from repo metadata and user input, and guide release prep with git add/commit/push. Use when the user asks to write or polish README files, create bilingual docs, prepare a GitHub release, or mentions release assistant/README generation.
doc-sync-tool
自动同步项目中的 Agents.md、claude.md 和 gemini.md 文件,保持内容一致性。支持自动监听和手动触发。
deploying-to-production
Automate creating a GitHub repository and deploying a web project to Vercel. Use when the user asks to deploy a website/app to production, publish a project, or set up GitHub + Vercel deployment.