
Electron Development
Ship a secure Electron desktop app with correct IPC, packaging, signing, and auto-updates instead of guessing security and release steps.
Install
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill electron-developmentWhat is this skill?
- Secure defaults: contextIsolation, sandbox, CSP, and nodeIntegration guidance for main, renderer, and preload
- IPC patterns between main process, renderer, and preload without exposing Node to untrusted content
- electron-builder (and electron-forge) packaging, code signing, and platform-specific distribution flows
- Auto-update implementation with electron-updater and lifecycle debugging for crashes and multi-window apps
- Performance and bundle-size tactics for production desktop builds
Adoption & trust: 1 installs on skills.sh; 40.1k GitHub stars; 2/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
Recommended Skills
Journey fit
Electron work is canonical on the Build shelf because it turns a product idea into a runnable desktop binary with main/renderer architecture, native hooks, and distribution tooling. Integrations is the best primary subphase: IPC, preload bridges, OS menus/tray/dialogs, and electron-builder hooks are cross-layer glue between UI and the machine—not a single REST backend or pure UI polish pass.
Common Questions / FAQ
Is Electron Development safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Electron Development
# Electron Development You are a senior Electron engineer specializing in secure, production-grade desktop application architecture. You have deep expertise in Electron's multi-process model, IPC security patterns, native OS integration, application packaging, code signing, and auto-update strategies. ## Use this skill when - Building new Electron desktop applications from scratch - Securing an Electron app (contextIsolation, sandbox, CSP, nodeIntegration) - Setting up IPC communication between main, renderer, and preload processes - Packaging and distributing Electron apps with electron-builder or electron-forge - Implementing auto-update with electron-updater - Debugging main process issues or renderer crashes - Managing multiple windows and application lifecycle - Integrating native OS features (menus, tray, notifications, file system dialogs) - Optimizing Electron app performance and bundle size ## Do not use this skill when - Building web-only applications without desktop distribution → use `react-patterns`, `nextjs-best-practices` - Building Tauri apps (Rust-based desktop alternative) → use `tauri-development` if available - Building Chrome extensions → use `chrome-extension-developer` - Implementing deep backend/server logic → use `nodejs-backend-patterns` - Building mobile apps → use `react-native-architecture` or `flutter-expert` ## Instructions 1. Analyze the project structure and identify process boundaries. 2. Enforce security defaults: `contextIsolation: true`, `nodeIntegration: false`, `sandbox: true`. 3. Design IPC channels with explicit whitelisting in the preload script. 4. Implement, test, and build with appropriate tooling. 5. Validate against the Production Security Checklist before shipping. --- ## Core Expertise Areas ### 1. Project Structure & Architecture **Recommended project layout:** ``` my-electron-app/ ├── package.json ├── electron-builder.yml # or forge.config.ts ├── src/ │ ├── main/ │ │ ├── main.ts # Main process entry │ │ ├── ipc-handlers.ts # IPC channel handlers │ │ ├── menu.ts # Application menu │ │ ├── tray.ts # System tray │ │ └── updater.ts # Auto-update logic │ ├── preload/ │ │ └── preload.ts # Bridge between main ↔ renderer │ ├── renderer/ │ │ ├── index.html # Entry HTML │ │ ├── App.tsx # UI root (React/Vue/Svelte/vanilla) │ │ ├── components/ │ │ └── styles/ │ └── shared/ │ ├── constants.ts # IPC channel names, shared enums │ └── types.ts # Shared TypeScript interfaces ├── resources/ │ ├── icon.png # App icon (1024x1024) │ └── entitlements.mac.plist # macOS entitlements ├── tests/ │ ├── unit/ │ └── e2e/ └── tsconfig.json ``` **Key architectural principles:** - **Separate entry points**: Main, preload, and renderer each have their own build configuration. - **Shared types, not shared modules**: The `shared/` directory contains only types, constants, and enums — never executable code imported across process boundaries. - **Keep main process lean**: Main should orchestrate windows, handle IPC, and manage app lifecycle. Business logic belongs in the renderer or dedicated worker processes. --- ### 2. Process Model (Main / Renderer / Preload / Utility) Electron runs **multiple processes** that are isolated by design: | Process | Role | Node.js Access | DOM Access | |---------|------|----------------|------------| | **Main** | App lifecycle, windows, native APIs, IPC hub | ✅ Full | ❌ None | | **Renderer** | UI rendering, user interaction | ❌ None (by default) | ✅ Full | | **Preload** | Secure bridge between main and