electron

electron is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 77 tokens per session (2,605 once invoked), scanned A, original, MIT.

A guide to building desktop applications with Electron, a framework that uses web technologies inside an installable app for Windows, macOS, or Linux.

In plain words
What is it for?
Use it when setting up communication between the app's processes, restricting web-page privileges, adding security policies, packaging the app, signing it, or providing automatic updates.
Why use it?
It helps keep the app's operating-system access separate from the displayed web page, reducing security risks and process mistakes.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/ericrisco/rsc-harness/electron
Any agent
npx skills add ericrisco/rsc-harness --skill electron
Clone the repo
git clone --depth 1 https://github.com/ericrisco/rsc-harness

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/ericrisco/rsc-harness/electron.svg)](https://agentmods.dev/skills/ericrisco/rsc-harness/electron)
Your own site
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/electron"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/electron.svg" alt="Measured on agentmods" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,605 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00077 $0.02605
Opus 5 $0.00039 $0.01303
Sonnet 5 $0.00015 $0.00521
Haiku 4.5 $0.00008 $0.00261

Measured yesterday against content hash 0177df246f02, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

electron 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

`child_process`, the renderer **invokes an IPC channel** and the **main process performs the
skills/electron/SKILL.md · 210 lines

How it starts

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

Electron — desktop shell, typed IPC, hardening, signing

This skill owns the desktop shell: process model, IPC, security, packaging, signing, auto-update. It does not own the web UI inside the window (../react/SKILL.md), the Node backend logic, or the CI runner matrix.

The mental model — three processes, one rule

An Electron app is three kinds of process. Code lives in exactly one; putting it in the wrong one is the root cause of most security holes.

Process Runtime Trust One per Does
main Node.js, full OS API trusted app windows, menus, tray, dialogs, fs, child procs
renderer Chromium, no Node untrusted window your web UI; can run attacker JS if you load remote content
preload isolated world, runs before page JS semi-trusted window the only bridge: contextBridge exposes a tiny API

The governing rule: the renderer is untrusted, the main process holds all privilege, and the preload is the only sanctioned bridge between them. Renderer-to-OS escalation is the dominant failure mode in real Electron apps, so everything below is a corollary.

Start right

Scaffold with Electron Forge (@electron/forge) — first-party, all-in-one (scaffold → package → make → publish), and it gets new Electron features first.

npm init electron-app@latest my-app -- --template=vite-typescript
cd my-app && npm start

Pin to a supported major. Electron ships a new major every 8 weeks (tracking Chromium) and supports only the latest 3 majors. As of June 2026 the stable line is Electron 42 (Chromium M148, Node 24); 43 lands 2026-06-30. Shipping on an EOL major means unpatched Chromium CVEs — check package.json and bump if behind.

Project layout keeps the boundary visible:

src/
  main.ts       # main process — owns everything privileged
  preload.ts    # the bridge — contextBridge only
  renderer/     # your web UI (untrusted)
  ipc/types.ts  # IPC contract shared by main + preload

Read the full file on GitHub · 210 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 210 lines · 77 tokens per session scan A 0177df246f02

Subscribe to this mod's changes

electron is a skill published in the GitHub repository ericrisco/rsc-harness (64 stars, last pushed 2d ago), licensed MIT. It adds 77 tokens to every session and 2,605 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

Desktop Application Testing

Testing desktop applications built with Electron, Tauri, or native frameworks including window management, IPC, tray icons, and auto-update testing.

PramodDutta/qaskills · 31 tokens

verifying-build-provenance-with-slsa-sigstore

Verify signed artifacts and SLSA build provenance with Sigstore cosign and slsa-verifier, enforce keyless OIDC identity, and apply SLSA Build levels to harden the software supply chain.

adriannoes/awesome-agentic-ai · 55 tokens

implementing-code-signing-for-artifacts

This skill covers implementing code signing for build artifacts to ensure integrity and authenticity throughout the software supply chain. It addresses signing binaries, packages, and containers using GPG, Sigstore, and platform-specific signing tools, establishing trust chains, and verifying signatures in deployment…

adriannoes/awesome-agentic-ai · 62 tokens

electron-docs

Electron 43.x — process model, IPC, security, performance, distribution, auto-updater, Forge, native modules.

pledgeandgrow/pledge-skills · 29 tokens

moai-workflow-worktree

Git worktree management for parallel SPEC development with isolated workspaces, automatic branch registration, and seamless MoAI-ADK integration. Use when setting up parallel development environments.

modu-ai/moai-adk · 41 tokens

hns-workflow-ci-loop

Unified CI watch + auto-fix loop skill. Polls gh pr checks after /moai sync PR creation, classifies required vs auxiliary failures, attempts safe automated patches (max 3 iterations), and escalates semantic failures to the user. Use for CI loop workflow — NOT for general loop iteration patterns (see…

modu-ai/moai-adk · 76 tokens