desktop

Electron desktop development guide — IPC handlers, controllers, preload scripts, window/menu management.

INSTALLATION
npx skills add https://github.com/lobehub/lobe-chat --skill desktop
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

$27

export default class NewFeatureCtr extends ControllerModule {

static override readonly groupName = 'newFeature';

@IpcMethod()

async doSomething(params: SomeParams): Promise {

// 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`

export interface SomeParams {

/ ... /

}

export interface SomeResult {

success: boolean;

error?: string;

}


### 3. Create Renderer Service

Location: `src/services/electron/`

import { ensureElectronIpc } from '@/utils/electron/ipc';

const ipc = ensureElectronIpc();

export const newFeatureService = async (params: SomeParams) => {

return ipc.newFeature.doSomething(params);

};

BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card