desktop
Electron desktop development guide — IPC handlers, controllers, preload scripts, window/menu management.
npx skills add lobehub/lobehub --skill desktop --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Desktop Development Guide ## Architecture Overview LobeHub desktop is built on Electron with main-renderer architecture: 1. **Main Process** (`apps/desktop/src/main`): App lifecycle, system APIs, window management 2. **Renderer Process**: Reuses web code from `src/` 3. **Preload Scripts** (`apps/desktop/src/preload`): Securely expose main process to renderer ## Adding New Desktop Features ### 1. Create Controller Location: `apps/desktop/src/main/controllers/` ```typescript import { ControllerModule, IpcMethod } from '@/controllers'; export default class NewFeatureCtr extends ControllerModule { static override readonly groupName = 'newFeature'; @IpcMethod() async doSomething(params: SomeParams): Promise<SomeResult> { // Implementation return { success: true }; } } ``` Register in `apps/desktop/src/main/controllers/registry.ts`. ### 2. Define IPC Types Location: `packages/electron-client-ipc/src/types.ts` ```typescript export interface SomeParams { /* ... */ } export interface SomeResult { success: boolean; error?: string; } ``` ### 3. Create Renderer Service Location: `src/services/electron/` ```typescript import { ensureElectronIpc } from '@/utils/electron/ipc'; const ipc = ensur
- Architecture Overview
- Adding New Desktop Features
- 1. Create Controller
- 2. Define IPC Types
- 3. Create Renderer Service
- 4. Implement Store Action
- 5. Add Tests
- Detailed Guides
- Best Practices
What does the desktop skill do?
Electron desktop development guide — IPC handlers, controllers, preload scripts, window/menu management.
How do I install it?
Run `npx skills add lobehub/lobehub --skill desktop --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From lobehub/lobehub, a repository with 81,252 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.