Electron

Installation
SKILL.md

Security Non-Negotiables

  • nodeIntegration: false is mandatory — renderer with Node.js access means XSS = full system compromise
  • contextIsolation: true is mandatory — separates preload context from renderer
  • Whitelist IPC channels explicitly — never forward arbitrary channel names from renderer
  • Validate all IPC message content — renderer is untrusted, treat like external API input
  • Never use eval() or new Function() in renderer — defeats all security boundaries

Preload Script Rules

  • contextBridge.exposeInMainWorld() is the only safe bridge — raw ipcRenderer exposure is vulnerable
  • Clone data before passing across bridge — prevents prototype pollution attacks
  • Minimal API surface — expose specific functions, not generic send/receive

Architecture Traps

  • webPreferences locked after window creation — can't enable nodeIntegration later
  • Blocking main process freezes ALL windows — async everything, no sync file operations
  • Each BrowserWindow is separate renderer process — can't share JS variables directly
  • show: false then ready-to-show — prevents white flash, looks more native
Installs
2
Repository
clawic/skills
GitHub Stars
16
First Seen
Apr 20, 2026
Electron — clawic/skills