Electron desktop development guide — IPC handlers, controllers, preload scripts, window/menu management.
This skill is a development guide for building features in LobeHub's Electron desktop application, which uses a main-renderer architecture. It solves the onboarding and consistency problem of a complex Electron codebase by documenting exactly where and how to add functionality: controllers in the main process, IPC type definitions, renderer services, store actions, and tests, each with concrete file locations and TypeScript code templates.
The guide walks through the five-step pattern for adding a desktop feature (create a controller with an @IpcMethod, define IPC types, create a renderer service via ensureElectronIpc, implement a store action, and add tests) and points to reference files for feature implementation, a local-tools workflow, menu configuration (app/context/tray menus), and window management. The local-tools reference demonstrates the full stack including a controller that renames files on disk via Node's fs/promises, illustrating how tool manifests, store actions, services, and IPC handlers connect. Best practices emphasize input validation, limiting exposed APIs, async methods, and following existing patterns.
Target users are contributors and developers extending the LobeHub desktop app who need to understand its IPC, preload, and window/menu conventions. The skill is documentation and code-example material rather than an executable tool; its file-system examples (such as fs.rename) are illustrative implementation snippets within the app's own controller layer, not commands the skill runs against the user's machine. It is explicitly marked disable-model-invocation, meaning it serves as a reference rather than an auto-triggered action.
It is a development guide for adding features to LobeHub's Electron desktop app, covering controllers, IPC handlers, preload scripts, renderer services, store actions, and window/menu management with concrete file paths and TypeScript templates.
Follow the five-step pattern: create a controller extending ControllerModule with an @IpcMethod and register it, define IPC types, create a renderer service using ensureElectronIpc, implement a store action, and add tests in the controllers __tests__ directory.
No. It is reference documentation with code examples. Snippets such as a file-rename controller using fs/promises show how the app's own IPC handlers are implemented; they are illustrative patterns, not operations the skill executes for you.
The frontmatter sets disable-model-invocation to true, meaning it is intended as a manually consulted guide rather than a skill the model auto-triggers.
Its best practices tell developers to validate inputs, limit the APIs exposed through the preload bridge, and use async methods — standard Electron security hygiene for the main-renderer boundary.
Quick Setup:
.claude/skills/Repository
lobehub/lobehub