mcpbeat Sign in

Electron Live Test Agent Skill

Live-test any Electron desktop app with native-devtools-mcp, Chrome DevTools Protocol, screenshots, OCR, and accessibility tools. Use when the user asks for Electron UI verification, MCP-driven app control, renderer CDP interaction, native desktop automation, screenshots, or OCR-driven checks.

2k tokens
context cost
the whole folder, loaded on every use
4
files
instructions only
0
copies elsewhere
how many repositories repackaged it
131
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/instructa/agent-skills --skill electron-live-test

What comes with it

3 556 bytes besides the instruction
README.md
agents/openai.yaml
references/cdp-targeting.md

The instruction itself

10 sections, as written by the author

Electron Live Test

When To Use

Use this skill for live, headed testing of a running Electron desktop app. It is for interactive verification while developing, not for replacing automated smoke tests.

Use Playwright, WebDriver, Spectron replacements, or app-specific smoke tests for deterministic CI coverage. Use native-devtools-mcp when the user wants the agent to inspect or drive the currently running desktop app.

Requirements

  • native-devtools-mcp available to the agent host.
  • macOS: Accessibility and Screen Recording permissions for the controlling app.
  • Electron renderer debugging enabled through a Chrome DevTools Protocol endpoint.
  • The target app running in headed mode.

MCP Setup

Prefer launching native-devtools-mcp from a neutral directory so project-local package-manager policies do not break npx:

sh -c "cd /tmp && exec npx -y native-devtools-mcp"

If native permissions or helpers need setup, run one of:

pnpm dlx native-devtools-mcp setup
cd /tmp && npx native-devtools-mcp setup

Do not run setup from a target repo root when that repo has strict devEngines, package-manager, or lifecycle policies that could block npx.

Quick check:

cd /tmp && npx -y native-devtools-mcp --help

Starting The App

Do not start, stop, or restart the user's app unless they explicitly ask.

For CDP control, the Electron app must expose a remote debugging port. Common launch patterns:

electron . --remote-debugging-port=9222
ELECTRON_ENABLE_LOGGING=1 npm run dev -- --remote-debugging-port=9222

Many apps wrap Electron startup in npm, pnpm, yarn, turbo, forge, vite, or custom scripts. Prefer the repo's documented dev command if it already supports CDP. If not, inspect the app's main-process startup path and add/pass Electron's --remote-debugging-port=<port> only with user approval.

Verify the endpoint before attaching:

curl --fail --silent http://127.0.0.1:9222/json/version
curl --fail --silent http://127.0.0.1:9222/json/list

If the current app was started without CDP, ask the user to restart it with the app-specific CDP-enabled command.

Target Selection

Attach to the existing Electron renderer target, not a new blank page.

Use /json/list to identify the target by title, URL, or app route. If multiple targets exist, choose the one matching the visible app window and report the selected title/URL. For ambiguous or multi-target apps, read references/cdp-targeting.md.

Tool Choice

  • Use CDP for renderer DOM, React/Vue/Svelte shells, routes, sidebars, dialogs, forms, keyboard input, console logs, and network-visible renderer behavior.
  • Use screenshots, OCR, or template matching for canvas, WebGL, Pixi, Three.js, game, map, or custom-rendered surfaces.
  • Use macOS accessibility/AX tools for native window chrome, menus, file pickers, permission dialogs, and OS dialogs.
  • Use process logs or app-specific logs for main-process behavior; CDP only proves renderer state unless the app exposes main-process diagnostics.
  • Prefer element references from fresh snapshots over coordinates. Use coordinates only after a fresh screenshot.

Live Testing Flow

  • Confirm native-devtools-mcp is connected.
  • Confirm the Electron app is running and headed.
  • Confirm the app exposes CDP on the expected 127.0.0.1:<port> endpoint.
  • Inspect /json/list and select the existing renderer target.
  • Take a fresh DOM snapshot before interacting.
  • Perform one deliberate action at a time.
  • After clicks, typing, navigation, waits, or anything that can change the page, take a fresh snapshot before the next structural action.
  • For canvas or native-window interactions, take a screenshot first and explain any coordinate-based action.
  • Stop and report blockers such as login, missing app window, missing CDP port, missing permissions, unexpected dialogs, wrong target, or repeated failed interactions.

Safety

  • Do not expose CDP in packaged or production builds unless the user explicitly accepts that risk.
  • Bind CDP to loopback only. Treat externally reachable remote debugging as a security issue.
  • Do not enter secrets, payment data, production credentials, or private user data into a live app unless the user explicitly provides safe test values.
  • Avoid destructive UI actions unless they are the requested test path and the user has approved the target data.

Verification Report

After live testing, summarize:

  • What was tested.
  • Which interaction path was used: CDP, screenshot/OCR, AX, logs, or mixed.
  • The CDP endpoint and selected renderer target title/URL, if used.
  • What passed or failed.
  • Any automated checks run separately, such as unit tests, typecheck, or smoke tests.

Other skills for the same job

different authors, same section of the catalogue
Webapp Testing
by anthropics
vendor ×12

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

6k tokens scripts
Azure Microsoft Playwright Testing Ts
by lingxling
×1

Run Playwright tests at scale with cloud-hosted browsers and integrated Azure portal reporting.

2k tokens
Chrome Devtools
by christophacham
×1

Browser debugging, performance profiling, and automation via Chrome DevTools MCP. Use when user says "debug this page", "take a screenshot", "check network requests", "profile performance", "inspect console errors", or "analyze page load". Do NOT use for full E2E test suites (use playwright-skill) or non-browser debugging.

1k tokens
QA
by browser-use

QA-test a website or web app and return a 1-5 quality score (5 = flawless, 1 = broken) with evidence. Use when the user wants to test, QA, evaluate, score, or "check how good" a site, page, flow, or app — including a local dev server (e.g. "qa test localhost:5173", "does the checkout work?", "rate this landing page"). Drives a real Browser Use cloud browser, tunneling localhost automatically.

9k tokens
Playwright Component Testing
by microsoft
vendor

Set up component testing with Playwright using a story gallery — scaffold stories and a gallery dev page driven by the built-in mount fixture, no dedicated component-testing runtime. Use when asked to test React or Vue components in isolation with Playwright, or to migrate off @playwright/experimental-ct-react / -vue.

8k tokens scripts
Browser Testing With Devtools
by addyosmani

Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.

4k tokens
Browser Harness
by browser-use

Always use browser-harness for any web interaction: automation, scraping, testing, or site/app work.

493k tokens scripts
Help Center UI Test
by Automattic

Run a browser-based UI review of the WordPress.com Help Center across multiple surfaces, looking for visual and behavioral issues. Use when asked to test the Help Center UI.

2k tokens

How to use it

Copy the folder

Take instructa/electron-live-test from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference npx. Without those the skill loads but fails at the first command.