Repository inventory

lobehub/lobe-chat

Skills indexed from this repository, with install-style signals scoped to the repo.
13 skills917K GitHub stars0 weekly installsTypeScriptGitHubOwner profile

Overview

This skill is a practical guide for building and extending the Electron-based desktop app. It focuses on implementing new desktop features, wiring IPC handlers, creating controllers and preload scripts, and managing windows and menus. Use it to integrate secure renderer-main communication and align new code with the project's architecture and conventions.

How this skill works

The guide inspects the main-renderer architecture and explains where to place controllers, preload scripts, IPC types, and renderer services. It shows the pattern for creating ControllerModule classes with @IpcMethod decorators, registering controllers, defining shared TypeScript IPC types, and consuming IPC from renderer services. It also points to reference docs for menus, windows, and local tools workflows.

When to use it

  • Adding a new desktop feature that requires main-process APIs
  • Exposing secure functionality from main to renderer via preload/IPC
  • Implementing or testing IPC controllers and their TypeScript types
  • Configuring application menus or custom window behavior
  • Integrating local development tools or native OS interactions

Best practices

  • Keep main-process surface minimal: expose only needed APIs via preload
  • Validate and sanitize all IPC input parameters in controllers
  • Prefer async methods and batch transfers to avoid UI jank
  • Follow existing controller and service patterns for consistent code organization
  • Add tests for main controllers under apps/desktop/src/main/controllers/__tests__

Example use cases

  • Create a new controller to access native file dialogs and expose a doSomething IPC method
  • Add a renderer service that calls ipc.myFeature.doSomething with typed params and result
  • Implement window-management flows: create, persist, and restore window state from main
  • Configure a native menu item that triggers a controller action via IPC
  • Build local tools integration that runs in main and returns status updates to renderer

FAQ

Register it in apps/desktop/src/main/controllers/registry.ts so the main process loads it at startup.

How do I share types between main and renderer?

Define shared interfaces in packages/electron-client-ipc/src/types.ts and import them from both sides.

How should I expose main APIs to the renderer?

Use a preload script to securely expose a small, typed API surface and call controller IPC methods from the renderer via services.

13 skills

desktop
Ai

This skill helps you implement and manage Electron desktop features, IPC handlers, and windowing by following clear architectural patterns.

DebuggingDocsFrontendPerformance+3
hotkey
Accessibility

This skill guides adding keyboard shortcuts and hotkeys, helping implement, register, and document keyboard interactions across features.

AiCode ReviewFrontendProductivity+3
recent-data
Ai

This skill helps you efficiently access and manage recently used topics, resources, and pages with session-store guidance and type-safe patterns.

AnalyticsDataFrontendProductivity+1
add-provider-doc
Ai

This skill guides you through creating and updating provider documentation, env vars, Docker configs, and image resources for new AI providers.

AutomationBackendContentDevops+3
add-setting-env
Ai

This skill helps you implement server-side environment variables to configure default user settings and manage domain-specific defaults.

BackendDevopsDocsScripting+1
microcopy
Ai

This skill helps you craft clear, user-friendly UI copy and microcopy that aligns with brand guidelines and improves onboarding and error messaging.

BrandingContentCopywritingDesign+3
drizzle
Ai

This skill helps you design and migrate PostgreSQL schemas with Drizzle ORM, ensuring type-safe, scalable database models and reliable migrations.

BackendDatabaseDebuggingMigration+2
i18n
Accessibility

This skill guides you through i18n tasks using react-i18next in React/TypeScript, helping create keys, manage locales, and implement translations.

AiDocsFrontendProduct+3
project-overview
Ai

This skill helps you explore a TypeScript monorepo by summarizing project structure, architecture, and key components for quick onboarding.

BackendDocsFrontendFullstack+2
zustand
Ai

This skill guides Zustand state management for store code, actions, and slices, improving state reliability and developer productivity.

DesignDocsFrontendProductivity+3
debug
Ai

This skill helps you implement and interpret debug logging with namespace conventions and format specifiers for efficient troubleshooting.

AutomationBackendCode ReviewDebugging+3
testing
Ai

This skill helps you write and debug Vitest tests in TypeScript, improve coverage, and follow best practices for reliable testing.

DebuggingDocsIntegration TestsTesting+2
react
Ai

This skill guides React component development using @lobehub/ui, routing tactics, and style decisions to accelerate frontend features.

Code ReviewDebuggingFrontendTesting+2
More from this maintainer
Other repositories and skills published under the same GitHub owner.
Skills library
Jump back to the full directory or explore grouped topics.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational