electron-api

Bridge frontend and Electron main process with typed IPC patterns.

40|9|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/mits-pl/wove --skill electron-api-mits-pl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: electron-api
Source: https://github.com/mits-pl/wove/tree/main/.kilocode/skills/electron-api
Command: npx skills add https://github.com/mits-pl/wove --skill electron-api-mits-pl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a structured guide to expose Electron main-process functionality to the frontend via a secure, typed IPC bridge, enabling clean frontend-to-main communication in Wave Terminal.

Core Features & Use Cases

  • Typed IPC surface: Define and expose a stable Electron API surface in the preload and main process.
  • Multi-pattern IPC: Supports sync, async, and fire-and-forget communication styles with explicit handlers.
  • Guided integration: Step-by-step instructions for adding new Electron APIs and ensuring safe access from the frontend.

Quick Start

Add a new Electron API by implementing the interface in frontend/types/custom.d.ts, wiring it in preload.ts, creating the IPC handler, and updating the preview stub.

Frequently Asked Questions about electron-api

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

FAQPage Schema
How do I expose an Electron main process API to the frontend via IPC?

You expose an Electron API by defining TypeScript interfaces, wiring the preload bridge, creating IPC handlers in the main process, and adding a no-op preview stub for safe frontend access.

What IPC communication patterns does Electron support for frontend-to-main bridging?

Electron IPC supports synchronous, asynchronous, and fire-and-forget communication patterns, each requiring explicit handlers and strict channel naming to ensure secure frontend-to-main data flow.

How do I add a typed IPC channel in an Electron preload script?

Adding a typed IPC channel requires defining the API surface in a TypeScript declaration file, exposing it through the preload script's context bridge, and implementing strict channel naming with error handling.

Do I need TypeScript interfaces for Electron preload and main process IPC?

Yes, TypeScript interfaces are required to define a stable Electron API surface, ensuring type safety across the frontend, preload exposure, and main process IPC handlers.

What's the best way to structure a secure Electron IPC bridge for a Wave Terminal project?

The best way to structure a secure Electron IPC bridge involves guided integration: defining typed interfaces, wiring preload exposure, creating explicit handlers, and enforcing strict channel naming with error handling.

Why is my Electron preload API not accessible from the frontend renderer?

An Electron preload API is inaccessible if the TypeScript interface is undefined, the context bridge is not wired, or the preview stub is missing, requiring strict channel naming and proper error handling to resolve.