desktop

Connect Electron main-process IPC controllers to renderer services and store actions.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/kingheu0818-sketch/lobehub_yu --skill desktop-kingheu0818-sketch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: desktop
Source: https://github.com/kingheu0818-sketch/lobehub_yu/tree/main/.agents/skills/desktop
Command: npx skills add https://github.com/kingheu0818-sketch/lobehub_yu --skill desktop-kingheu0818-sketch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you implement reliable Electron desktop functionality by organizing the correct flow between the Electron main process, secure preload bridge, renderer services, and state/store actions.

Core Features & Use Cases

  • IPC Controller Development: Create main-process controllers using IPC method handlers for deterministic, app-scoped actions (e.g., notifications, window operations, local file tools).
  • Typed IPC Contracts: Define request/response types in the Electron IPC package to keep renderer and main process interactions safe and consistent.
  • Renderer Service & Store Integration: Call IPC methods through renderer services and wire results into store actions for UI updates and error feedback.
  • Guided Desktop Ops: Follow references for feature implementation patterns, local tools workflow, menu configuration, and window management.

Quick Start

Use the desktop skill to guide you through adding a new Electron feature end-to-end: define the IPC controller in the main process, add the typed IPC interfaces, expose it via a preload-safe renderer service, and connect a store action with basic tests.

Frequently Asked Questions about desktop

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

FAQPage Schema
How do I structure secure IPC calls between Electron main and renderer processes?

Secure Electron IPC requires defining typed request/response contracts, exposing them via a preload bridge, and connecting main-process controllers to renderer services and store actions. This architecture ensures deterministic, app-scoped cross-process calls.

What is the best way to manage windows and desktop menus in an Electron app?

Electron window management and desktop menus are handled by main-process IPC controllers. These controllers execute deterministic window operations and menu configurations, routing results back through preload to renderer services for UI updates.

How do I add a new Electron feature end-to-end using a controller-service-store architecture?

Define an IPC controller in the Electron main process, add typed IPC interfaces, expose it via a preload-safe renderer service, and connect a store action with basic tests. This workflow ensures typed, secure feature delivery across processes.

Does this Electron development approach work for local-file and system integration workflows?

Yes, the controller-service-store architecture supports local-file tools, system integrations, and desktop workflows. Typed IPC definitions ensure secure cross-process calls, while renderer services wire results into store actions for error feedback.

Why do I need typed IPC contracts in Electron desktop applications?

Typed IPC contracts keep Electron main and renderer process interactions safe and consistent. By defining request and response types in the IPC package, you enforce validation and prevent mismatched cross-process calls.

Can I use renderer services to update UI state from Electron main process operations?

Yes, renderer services call IPC methods to communicate with Electron main process controllers. The service then wires the results into store actions, enabling UI updates and error feedback based on the cross-process response.