electron-cdp-automation

electron-cdp-automation is a skill for Claude Code, Codex from blessleon/electron-cdp-automation. It costs 91 tokens per session (2,474 once invoked), scanned A, original, MIT.

A way to control a packaged Electron desktop app from an outside Node.js script using Chrome DevTools Protocol, a browser control interface built into Chromium. It works without access to the app's source code.

In plain words
What is it for?
Launching an Electron app with remote debugging, checking that the debugging connection works, injecting JavaScript, and changing the app's page elements from an external script.
Why use it?
It helps diagnose and avoid common automation failures, such as stalled page loads, lost page contexts, ignored form input, and invalid selectors. It also checks early whether the app exposes the required debugging port.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Launching an Electron app with remote debugging, checking that the debugging connection works, injecting JavaScript, and changing the app's page elements from an external script.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/blessleon/electron-cdp-automation/electron-cdp-automation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add blessleon/electron-cdp-automation --skill electron-cdp-automation
Clone the repo
git clone --depth 1 https://github.com/blessleon/electron-cdp-automation

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for electron-cdp-automation

README.md
[![agentmods](https://agentmods.dev/badge/skills/blessleon/electron-cdp-automation/electron-cdp-automation/github.svg)](https://agentmods.dev/skills/blessleon/electron-cdp-automation/electron-cdp-automation)
Your own site
<a href="https://agentmods.dev/skills/blessleon/electron-cdp-automation/electron-cdp-automation"><img src="https://agentmods.dev/badge/skills/blessleon/electron-cdp-automation/electron-cdp-automation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for electron-cdp-automation

Your own site · 80×15
<a href="https://agentmods.dev/skills/blessleon/electron-cdp-automation/electron-cdp-automation"><img src="https://agentmods.dev/badge/skills/blessleon/electron-cdp-automation/electron-cdp-automation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,474 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00091 $0.02474
Opus 5 $0.00046 $0.01237
Sonnet 5 $0.00018 $0.00495
Haiku 4.5 $0.00009 $0.00247

Measured 10d ago against content hash 9e6c8bccebea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

electron-cdp-automation scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://localhost:9222/json/version
SKILL.md · 251 lines

How it starts

The opening of the file, as written. The whole thing — 251 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Electron CDP Automation

Electron embeds Chromium, so packaged apps can be launched with --remote-debugging-port, then controlled from an external Node script via CDP to inject JS and manipulate the DOM. No source code access required.

Four traps are almost guaranteed to bite you, and all look "correct" — read this through before writing code, or you'll spend hours debugging an await that can never succeed.

Step 0: Verify the Debug Port Works First (Don't Skip This)

Validate this step before writing any automation code. The app may have debugging disabled, at which point the entire CDP route is impossible — better to find out early.

# Launch (any port 9000-65535)
./YourApp.exe --remote-debugging-port=9222 --remote-allow-origins=*

# Verify in another terminal
curl http://localhost:9222/json/version

Works — returns JSON containing webSocketDebuggerUrl:

{"Browser":"Chrome/120.0.6099.109","Protocol-Version":"1.3",
 "webSocketDebuggerUrl":"ws://localhost:9222/devtools/browser/..."}

Doesn't work — connection refused / timeout / app reports "unsupported parameter" / app launches normally but port doesn't listen.

When it doesn't work, inform the user CDP automation is not possible and provide alternatives. Don't try to work around it (changing ports, adding --inspect, injecting DLLs won't solve build-time disabled debugging):

❌ This app has remote debugging disabled. CDP automation is not possible.

Possible reasons: Disabled during build / Enterprise security policy / ASAR hardening.

Alternatives:
  1. OS-level automation — Windows UI Automation, pyautogui, AutoHotkey
     (based on coordinates and control trees, doesn't depend on debug port)
  2. If you have source access, add to main.js:
     app.commandLine.appendSwitch('remote-debugging-port', '9222')
     For testing builds only, never ship this
  3. If the app has a CLI / HTTP API, use that instead

Also remind: Never open debug ports in production — any local process can completely control the app through it.

Read the full file on GitHub · 251 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 251 lines · 91 tokens per session scan A 9e6c8bccebea

Subscribe to this mod's changes

electron-cdp-automation is a skill published in the GitHub repository blessleon/electron-cdp-automation (4 stars, last pushed 1mo ago), licensed MIT. It adds 91 tokens to every session and 2,474 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

baoyu-url-to-markdown

Fetch any URL and convert to markdown using baoyu-fetch CLI (Chrome CDP with site-specific adapters). Built-in adapters for X/Twitter, YouTube transcripts, Hacker News threads, and generic pages via Defuddle. Handles login/CAPTCHA via interaction wait modes. Use when user wants to save a webpage as markdown.

JimLiu/baoyu-skills · 72 tokens

playwright-cli

Automates browser interactions for testing and validating your own web applications using playwright-cli. Use when you need terminal-first browser control for navigation, form filling, screenshots, tracing, bound browser sessions, debugging, or generating Playwright test code. Only use against applications you own or…

testdino-hq/playwright-skill · 64 tokens

prime-the-agent

Use when starting a session on an existing WordPress site, or when the user says 'prime yourself', 'what builder does this site use', or 'give me a site briefing'. Loads the active site, detects the builder, loads inline schemas, reads the stored per-site brief, and sets the do-not-write-raw-HTML rule.

respira-press/agent-skills-wordpress · 73 tokens

webapp-testing

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.

datit309/supergraph · 35 tokens

setup-playwright

Use when adding, extending, or repairing a repo-owned Playwright test harness across Node Playwright Test, Playwright Pytest, or .NET/Java test frameworks. Also use when explicitly persisting @playwright/cli developer tooling, or adding or regenerating Playwright Test Agent definitions for a compatible Node Playwright…

n-n-code/n-n-code-skills · 93 tokens

chrome-cdp-setup

Set up Google Chrome on macOS to always launch with the Chrome DevTools Protocol enabled (127.0.0.1:9222) via a Dock launcher app, so local AI agents (Playwright, Puppeteer, browser-use, OpenClaw) can drive the real logged-in browser with no per-connection approval prompt. Use when the user wants to enable a…

soulmachine/skills · 146 tokens