# Automate Electron Apps with CDP

Electron apps are hard to inspect and test from an AI assistant. This skill connects agent-browser to CDP ports for snapshots, clicks, screenshots, and form actions.

## Install

```bash
npx skillstore add vercel-labs/electron
```

## Metadata

- Status: approved
- Slug: vercel-labs-electron
- Skillstore revision: r1
- Version status: missing
- Tree hash: 28894ec6959733c70c2a2c490b070c758500267dc47f4bc9677bdd493cfe9bc9
- Author: vercel-labs
- GitHub username: vercel-labs
- License: MIT
- Repository: https://github.com/vercel-labs/agent-browser/tree/main/skills/electron/
- Ref: 36e07d5e13068e5be64447e8f20b427cf2cbd21a
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: blocked
- Manual install advisory: allowed\_with\_warning
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network
- Quality score: 38
- Quality tier: warning
- Public page: https://skillstore.pages.dev/skills/vercel-labs-electron
- Manifest: https://skillstore.pages.dev/api/skills/vercel-labs-electron/manifest

## Capabilities

- Launch Electron apps with remote debugging enabled on a selected CDP port.
- Connect agent-browser to a running Electron app or use CDP on each command.
- List app targets, switch tabs, and control Electron webviews.
- Capture snapshots, screenshots, annotated screenshots, and visible text from app UI.
- Click elements, fill fields, press keys, and manage named sessions for multiple apps.

## Use Cases

- Test Desktop UI Flows: Run repeatable snapshot, click, form, and screenshot checks against an Electron app during development.
- Inspect Electron Webviews: Connect to app targets, switch into webviews, and review visible UI state for debugging.
- Automate Local App Tasks: Control approved desktop apps through agent-browser sessions for controlled workflows and screenshots.

## Prompt Templates

### Connect to an App

```
Connect agent-browser to my Electron app on port 9222. Take an interactive snapshot and summarize the visible controls.
```

### Capture Screenshots

```
Use the connected Electron app session to capture a normal screenshot and an annotated screenshot. Summarize what each image shows.
```

### Test a Form Flow

```
Snapshot the app, find the search or input field, fill a test value, press Enter, and re-snapshot the result.
```

### Inspect Multiple Targets

```
List all Electron targets, switch to the relevant webview, capture its UI state, and report the actions needed for a regression test.
```

## Limitations

- The target app must be Electron or another Chromium-based desktop app.
- Remote debugging must be enabled when the app launches.
- Commands depend on local app installation paths and available CDP ports.
- Sensitive apps can expose private data and should only use test accounts.

## Best Practices

- Use dedicated test accounts and non-sensitive workspaces for automation.
- Choose unique CDP ports and close the app after testing finishes.
- Take a fresh snapshot after each navigation, click, or form submission.

## Anti Patterns

- Do not connect to password managers, personal chat apps, or production accounts.
- Do not leave remote debugging ports open after automation work ends.
- Do not type into the current focus without confirming the active app and field.

## Security Audit

- Audited at: 2026-07-07T09:11:22.185\+00:00
- Summary: Most static Ruby backtick detections are markdown formatting or fixed command examples, but several command blocks intentionally expose and control Electron apps through CDP. The primary risk is sensitive desktop automation: the skill documents screenshots, text extraction, and app control while listing private communication tools and 1Password. The hardcoded URL findings are example output and not active network behavior.

## Stats

- Views: 107
- Downloads: 18
- Favorites: 0
- Popularity score: 0
