Agent skill · pedronauck
electron-dev
Expert guide for Electron development with Electron Vite and Electron Builder. Use when developing Electron applications, working with main/renderer processes, IPC communication, preload scripts, security configuration, native module handling, or build/distribution setup.
What it needs
About 3k tokens when loaded.
What this skill does
Electron Development Guide This skill provides guidelines, patterns, and best practices for building production-grade Electron applications using Electron Vite and Electron Builder. Quick Start 1. Core Rules: For detailed Electron development patterns and guidelines, refer to references/patterns.md within this skill. 2. Security: Always enable contextIsolation, sandbox, and disable nodeIntegration. 3. Architecture: Main process handles Node.js operations; renderer focuses on UI; preload bridges them securely. Process Architecture Main Process (Node.js Context) The main process handles: Window creation and lifecycle File system and database operations IPC message handling Application-level events Key guidelines: Use app.isReady() before creating windows Clean up resources on window.destroyed event Handle graceful shutdown with app.on('before-quit') Renderer Process (Frontend Context) The renderer process: Renders UI using web technologies (React, Vue, etc.) Communicates with main process via IPC only Never has direct access to Node.js APIs Preload Script (Security Layer) The preload script is the only bridge between renderer and main: Security Checklist Always configure webPreferences with these settings: IPC Communication Main Process Handler Security Rules Whitelist all IPC channels in preload script Validate all arguments in main process handlers Never trust user input from renderer Keep secrets in main process only Configuration electron-vite.config.ts Native Modules For native modules like better-sqlite3: 1. Exclude from rollup in electron-vite config 2. Include in extraResources in Electron Builder config 3. Use dynamic imports in main process 4. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills pedronauck/electron-dev--252ad8