Electron app builder
Skill pinkpixel-dev/skills-collection-1/SKILLS/electron-app-builder
Part 1 of a large AI and agent skills collection featuring 900+ reusable skill folders, prompt workflows, references, scripts, and assets across engineering, cloud, security, research, writing, design, and automation.
npx -y skills add pinkpixel-dev/skills-collection-1 --skill electron-app-builderAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 7 stars7 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Build or refactor production-grade Electron desktop apps using a hardened reusable desktop shell pattern. Use when creating a new Electron app, porting a web app into Electron, adding a custom frameless title bar, wiring secure IPC/preload handlers, setting up Electron Builder packaging, configuring React/React Native Web with Webpack, implementing app data persistence, registering local media/file protocols, or hardening Electron main-process architecture.
SKILL.md
4.1 KB, 755 tokens by cl100k_base, as published. Nobody here has run it
Electron App Builder
Core Workflow
Use this skill to create Electron apps with a polished desktop shell: frameless desktop window, custom title bar, secure preload bridge, modular IPC, Electron Builder packaging, persistent app data, asset-safe Webpack output, and Linux-friendly taskbar/icon behavior.
Before implementing, inspect the target repo. If the task is creating a new project, scaffold from the patterns in electron-shell-patterns.md. If the task is refactoring an existing Electron app, compare its current shell against that reference and patch only the missing pieces.
Implementation Rules
- Keep Electron main-process files modular:
electron/main.js,electron/preload.js,electron/state.js, and focused files underelectron/modules/. - Use
contextIsolation: true,nodeIntegration: false,sandbox: true, andwebSecurity: true. - Expose renderer capabilities through a small
window.<appApi>bridge with allowlistedinvoke,send, andonchannels. - Use
frame: falsewith a custom title bar. On Linux, leavetitleBarStyleundefined; on macOS use hidden titlebar behavior when desired. - Keep title-bar drag regions explicit:
WebkitAppRegion: 'drag'on the title area andno-dragon buttons/controls. - Use a shared main-process state module for the current
BrowserWindowand active background jobs/downloads. - Use
app.requestSingleInstanceLock()for single-instance desktop apps unless there is a specific reason not to. - Keep app state under Electron
app.getPath('userData'), preferably split into settings and library/content files. Preserve legacy state files during migrations. - Register local media/file schemes as privileged when the renderer needs reliable local playback or fetch behavior.
- Use Electron Builder with
dist/**/*,electron/**/*, public/build assets, package metadata, and any backend assets required by the app. - Configure Webpack for content-hashed production chunks,
runtimeChunk: 'single', vendor/common split chunks, inline image assets, and generous Electron-appropriate performance budgets. - Do not copy app-specific domain logic from reference projects unless the new app needs that exact behavior.
Build Checklist
- Create or verify
package.jsonscripts:start,electron,dev,build, anddist. - Create
electron/main.jswith hardenedBrowserWindowsettings, single-instance handling, protocol registration, Linux icon setup, and module registration. - Create
electron/preload.jswith channel allowlists and listener cleanup through aWeakMap. - Create
electron/state.jsfor shared mutable main-process handles. - Create
electron/modules/system.jsfor window controls, safe external links, folder/file dialogs, default paths, and reveal-in-folder behavior. - Create
electron/modules/storage.jsfor split JSON state underuserData, temp-file writes, legacy migration, remove, and backup. - Add app-specific modules for downloads, media, subprocesses, diagnostics, or file processing only after the shell is stable.
- Add a custom renderer title bar and route all window controls through the preload API.
- Add Webpack and Babel configuration compatible with React or React Native Web.
- Run the real build command and any available tests/checks. Do not claim runtime behavior unless Electron was actually launched and tested.
Reference
Read electron-shell-patterns.md when implementing the shell, packaging, IPC, storage, protocol, or renderer title-bar patterns. It contains the concrete reusable shell decisions.
What ships with it: 2 files
8.8 KB alongside SKILL.md
agents/
- openai.yaml249 B