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.
npx agentmods add skills/ericrisco/rsc-harness/electronnpx skills add ericrisco/rsc-harness --skill electrongit clone --depth 1 https://github.com/ericrisco/rsc-harnessWrote 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.
[](https://agentmods.dev/skills/ericrisco/rsc-harness/electron)<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>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.
| Model | Per session | Once 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 |
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.
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 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
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.
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.
- yesterday First seen · 210 lines · 77 tokens per session scan A 0177df246f02
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.
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.
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.
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…
electron-docs
Electron 43.x — process model, IPC, security, performance, distribution, auto-updater, Forge, native modules.
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.
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…