electron

Installation
SKILL.md

Electron

Overview

Electron is a framework for building cross-platform desktop applications using web technologies. It combines a Node.js main process for system access and window management with Chromium renderer processes for the UI, communicating via IPC with context isolation and preload scripts for security.

Instructions

  • When setting up the architecture, create a main process for window management and system APIs, renderer processes for UI, and preload scripts to expose a controlled API bridge via contextBridge.exposeInMainWorld().
  • When implementing IPC, use ipcMain.handle() / ipcRenderer.invoke() for async request-response patterns, and webContents.send() for main-to-renderer push communication.
  • When accessing native APIs, use dialogs, file system, clipboard, notifications, and shell operations in the main process, exposing them to the renderer through the preload bridge.
  • When configuring security, keep contextIsolation: true and nodeIntegration: false (defaults), set CSP headers on all windows, sandbox renderer processes, and validate all IPC inputs in the main process.
  • When packaging the app, use electron-builder or electron-forge to produce platform-specific installers (NSIS/MSI for Windows, DMG for macOS, AppImage/deb for Linux) with code signing and notarization.
  • When implementing auto-updates, use electron-updater with GitHub Releases or a custom server, configure delta updates for smaller downloads, and verify update signatures.

Examples

Example 1: Build a file manager with native dialogs

Installs
4
GitHub Stars
128
First Seen
Jun 21, 2026
electron — terminalskills/skills