Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jamditis/electron-dev
Electron desktop application development with React, TypeScript, and Vite.
Passed 19 of 22 test cases with the skill, and 17 of 22 without it.
and 2 more in the full report
4 fixed15 passed either way1 still failing2 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
In the standard Electron project structure for a React app, what file format and extension is recommended for the main and preload scripts?
| Checked | Without skill | With skill |
|---|---|---|
| Uses CommonJS format or .cjs extension for main process scripts | Missed | Passed |
The instructions your model reads when the skill loads.
Patterns and practices for building production-quality Electron applications with React and TypeScript.
Electron's defaults have hardened over the past several releases. As of Electron 28+, contextIsolation: true and sandbox: true are the defaults for new BrowserWindow instances, most security advice from older guides assumed you had to opt in. You don't anymore; you have to opt OUT, and you should not.
Set explicitly anyway, so a config drift never weakens the security model:
const win = new BrowserWindow({
webPreferences: {
contextIsolation: true, // default since 12, mandatory for any prod app
sandbox: true, // default since 28; renderer runs sandboxed
nodeIntegration: false, // never enable in renderer
webSecurity: true, // never disable
preload: path.join(__dirname, 'preload.cjs')
}
});
Validate every IPC message in main. Don't trust the renderer.
Electron Fuses are package-time toggles baked into the binary. The two relevant for security distribution:
EnableEmbeddedAsarIntegrityValidation, verifies the app.asar hash at runtime against a hash embedded in the binary. Defends against attackers swapping the asar contents post-install.OnlyLoadAppFromAsar, refuses to load app code from anywhere except the validated asar.These are opt-in, not default. Enable both for production. Requires @electron/asar 3.1.0+ to generate the asar with embeddable integrity. electron-builder configures this via electronFuses in the build config; @electron/fuses does it programmatically.
CVE-2023-44402 (ASAR integrity bypass via filetype confusion) was the canonical motivation here, without integrity + only-load-from-asar, an attacker who can modify app files can swap behavior silently.
contextBridge.exposeInMainWorld. Never re-export ipcRenderer itself; expose specific methods that map to specific channels.file:// IPC and navigation, restrict navigation with webContents.on('will-navigate', e => e.preventDefault()) for windows that shouldn't change URL. Deny setWindowOpenHandler requests by default; allow-list specific origins.shell.openExternal with user input, validate the URL scheme before opening. An attacker-controlled file:// or javascript: URL hands them code execution.test cases passed, vs 17 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.