Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
lobehub avatar

Desktop

  • 1.9k installs
  • 81.3k repo stars
  • Updated August 5, 2026
  • lobehub/lobehub

desktop guides LobeHub Electron IPC controllers, preload scripts, and window management.

About

The desktop skill guides Electron development for LobeHub with main-renderer architecture. Main process in apps/desktop/src/main handles lifecycle, system APIs, and windows; renderer reuses web code from src/; preload scripts in apps/desktop/src/preload securely expose IPC to the renderer. New features add controllers under apps/desktop/src/main/controllers using ControllerModule and IpcMethod decorators. Agents follow secure preload boundaries, window and menu management patterns, and reuse web components where possible. Use when adding desktop-only capabilities, IPC handlers, or Electron window flows in LobeHub. Electron main-renderer architecture with secure preload IPC bridge Controllers in apps/desktop/src/main/controllers with IpcMethod decorators Renderer reuses web code; preload exposes vetted main APIs Window, menu, and lifecycle management in main process disable-model-invocation requires explicit desktop feature requests desktop guides LobeHub Electron IPC controllers, preload scripts, and window management Controller, preload exposure, and renderer integration following LobeHub desktop patterns User adds LobeHub desktop IPC, Electron window, or preload handler LobeHub.

  • Electron main-renderer architecture with secure preload IPC bridge.
  • Controllers in apps/desktop/src/main/controllers with IpcMethod decorators.
  • Renderer reuses web code; preload exposes vetted main APIs.
  • Window, menu, and lifecycle management in main process.
  • disable-model-invocation requires explicit desktop feature requests.

Desktop by the numbers

  • 1,896 all-time installs (skills.sh)
  • +85 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #133 of 1,039 Mobile Development skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

desktop capabilities & compatibility

Capabilities
ipc controller patterns · preload security · window management · main process lifecycle · web code reuse
Use cases
frontend
npx skills add https://github.com/lobehub/lobehub --skill desktop

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.9k
repo stars81.3k
Security audit3 / 3 scanners passed
Last updatedAugust 5, 2026
Repositorylobehub/lobehub

How do I add a secure desktop-only feature to LobeHub Electron app?

Build LobeHub Electron desktop features with IPC controllers, preload scripts, and main-renderer window management.

Who is it for?

LobeHub developers adding Electron IPC features and window flows.

Skip if: Pure web-only LobeHub features without Electron main process needs.

When should I use this skill?

User adds LobeHub desktop IPC, Electron window, or preload handler.

What you get

Controller, preload exposure, and renderer integration following LobeHub desktop patterns.

  • IPC controller modules
  • desktop notification handlers

Files

SKILL.mdMarkdownGitHub ↗

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/

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

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);
};

4. Implement Store Action

Location: src/store/

5. Add Tests

Location: apps/desktop/src/main/controllers/__tests__/

Detailed Guides

See references/ for specific topics:

  • Feature implementation: references/feature-implementation.md
  • Local tools workflow: references/local-tools.md
  • Menu configuration: references/menu-config.md
  • Window management: references/window-management.md

Best Practices

1. Security: Validate inputs, limit exposed APIs 2. Performance: Use async methods, batch data transfers 3. UX: Add progress indicators, provide error feedback 4. Code organization: Follow existing patterns, add documentation

Related skills

Forks & variants (1)

Desktop has 1 known copy in the catalog totaling 1.5k installs. They canonicalize to this original listing.

How it compares

Pick desktop over generic frontend skills when the task requires Electron main-renderer IPC and OS-level APIs in a desktop AI agent shell.

FAQ

Where do controllers live?

apps/desktop/src/main/controllers/ with ControllerModule and IpcMethod.

How is security maintained?

Preload scripts in apps/desktop/src/preload expose only vetted IPC to renderer.

Can renderer reuse web code?

Yes. Renderer process reuses web code from src/ per architecture overview.

Is Desktop safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Mobile Developmentfrontendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.