desktop

Implement Electron desktop features with IPC handlers, controllers, and preload scripts.

1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/andershi666/lobehub-hr-demo --skill desktop-andershi666
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: desktop
Source: https://github.com/andershi666/lobehub-hr-demo/tree/main/lobehub/.agents/skills/desktop
Command: npx skills add https://github.com/andershi666/lobehub-hr-demo --skill desktop-andershi666

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

The Desktop Development Guide provides a structured approach to implementing Electron desktop features, including IPC handlers, controllers, preload scripts, window management, and menu configuration, ensuring consistent architecture and best practices across projects.

Core Features & Use Cases

  • Architecture overview: Main process and Renderer process split, with clear guidance on where to implement lifecycle, IPC, and services.
  • Feature implementation patterns: How to add new desktop features, register controllers, expose IPC services, and ensure test coverage.
  • Use Case: Build a desktop tool that communicates between processes to update UI and perform file operations securely.

Quick Start

Create a new desktop feature by adding a IPC-enabled controller in apps/desktop/src/main/controllers, define IPC types, implement a renderer service, and register the feature in the controller registry.

Frequently Asked Questions about desktop

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

FAQPage Schema
How do I structure IPC handlers and controllers in an Electron desktop application?

To add a desktop feature, create an IPC-enabled controller in the main process src directory, define IPC types, implement a renderer service, and register the feature in the controller registry.

How do I add a new desktop feature that communicates between the main and renderer processes?

To add a desktop feature, create an IPC-enabled controller in the main process src directory, define IPC types, implement a renderer service, and register the feature in the controller registry.

What is the correct architecture split for main and renderer processes in Electron?

The Electron architecture splits into a main process and renderer process, placing lifecycle, IPC, and services in the main process and UI updates in the renderer.

How do I securely perform file operations from the renderer process in Electron?

Secure file operations in Electron are achieved by exposing IPC services through preload scripts and controllers, allowing the renderer to invoke main process services safely without direct Node.js access.

Can I use this guide for platform-specific window lifecycle and menu configuration on Windows?

Yes, this guide supports platform-specific window lifecycle tasks and menu configuration for Windows and other desktop platforms within the main-renderer architecture.

What are the best practices for organizing preload scripts and IPC services in Electron?

Best practices for organizing preload scripts and IPC services include adhering to security, performance, UX, and code-organization guidelines, ensuring clear separation between main and renderer processes.