electron-foundation

Set up Electron main process, preload IPC bridge, and window lifecycle.

7|1|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/theadriann/oxox --skill electron-foundation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: electron-foundation
Source: https://github.com/theadriann/oxox/tree/main/.factory/skills/electron-foundation
Command: npx skills add https://github.com/theadriann/oxox --skill electron-foundation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Electron foundational infrastructure simplifies building Electron-based desktop components by providing a consistent main process, preload bridge, window management, and macOS native features.

Core Features & Use Cases

  • Main process setup and configuration for Electron apps
  • Preload bridge with typed IPC sharing
  • Window management including multi-window, frameless window, and state persistence
  • macOS native features like tray, Dock, and native menus
  • Build tooling configuration and security best practices for Electron apps
  • Use Case: When building Factory Droid integrations, rely on a stable foundation to reduce boilerplate and ensure security and consistency.

Quick Start

Initialize the Electron foundation by wiring the main process scaffold, preload bridge, and window management according to the work procedure.

Frequently Asked Questions about electron-foundation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a secure Electron main process with contextIsolation and nodeIntegration disabled?

Set up a secure Electron foundation by enforcing CSP guidelines with contextIsolation enabled and nodeIntegration disabled, routing all renderer communication through a typed preload IPC bridge instead of direct Node.js access.

What is the best way to manage multi-window state persistence in an Electron app?

The best way to manage multi-window state persistence is to implement a window lifecycle handler in the main process that saves and restores window bounds, applying a single-instance lock to prevent duplicate app instances.

How do I create a typed IPC bridge using Electron preload scripts?

Create a typed IPC bridge by defining shared typed interfaces for your channels, loading a preload script into the browser window, and using contextBridge to expose specific IPC methods to the renderer securely.

Does this Electron foundation support native macOS integrations like tray and Dock menus?

Yes, the Electron foundation supports native macOS integrations by providing configuration for tray icons, Dock behavior, and native application menus within the main process structure.

When do I need a single-instance lock for my Electron desktop application?

You need a single-instance lock when your desktop application must prevent users from launching multiple app instances, ensuring window state persistence and IPC communication remain stable and synchronized.