Full-stack-skills electron-egg
Build desktop applications with the Electron EGG framework, covering project setup, main/renderer process communication, window management, plugin system, and build/packaging. Use when the user asks about Electron EGG, electron-egg, needs to create Electron applications with EGG, or work with Electron EGG patterns.
git clone https://github.com/partme-ai/full-stack-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/partme-ai/full-stack-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/electron-skills/electron-egg" ~/.claude/skills/partme-ai-full-stack-skills-electron-egg && rm -rf "$T"
skills/electron-skills/electron-egg/SKILL.mdWhen to use this skill
Use this skill whenever the user wants to:
- Install and set up Electron EGG in a project
- Create Electron desktop applications
- Use Electron EGG core features
- Configure Electron EGG
- Handle main process and renderer process communication
- Use Electron EGG API methods
- Build and package Electron applications
- Troubleshoot Electron EGG issues
How to use this skill
This skill is organized to match the Electron EGG official documentation structure (https://www.kaka996.com/, https://www.kaka996.com/pages/987b1c/, https://www.kaka996.com/pages/a99b72/). When working with Electron EGG:
-
Identify the topic from the user's request:
- Installation/安装 →
examples/guide/installation.md - Quick Start/快速开始 →
examples/guide/quick-start.md - Features/功能特性 →
examples/features/ - API/API 文档 →
api/
- Installation/安装 →
-
Load the appropriate example file from the
directory:examples/Guide (使用文档):
- Introduction to Electron EGGexamples/guide/intro.md
- Installation guideexamples/guide/installation.md
- Quick start guideexamples/guide/quick-start.md
- Project structureexamples/guide/project-structure.md
- Configurationexamples/guide/configuration.md
- Build and packageexamples/guide/build.md
Features (功能特性):
- Main processexamples/features/main-process.md
- Renderer processexamples/features/renderer-process.md
- IPC communicationexamples/features/ipc-communication.md
- Window managementexamples/features/window-management.md
- Menuexamples/features/menu.md
- System trayexamples/features/tray.md
- Auto updaterexamples/features/auto-updater.md
- Plugin systemexamples/features/plugin-system.md
-
Follow the specific instructions in that example file for syntax, structure, and best practices
Important Notes:
- Electron EGG is based on Electron and Egg.js
- Main process and renderer process separation
- IPC communication between processes
- Each example file includes key concepts, code examples, and key points
-
Reference API documentation in the
directory when needed:api/
- Main process APIapi/main-api.md
- Renderer process APIapi/renderer-api.md
- IPC APIapi/ipc-api.md
- Window APIapi/window-api.md
- Configuration APIapi/config-api.md
API Files:
- Application class, BrowserWindow, ipcMain, app methodsapi/main-api.md
- ipcRenderer, contextBridge, DOM APIsapi/renderer-api.md
- IPC communication methods and eventsapi/ipc-api.md
- Window creation and managementapi/window-api.md
- Configuration options and environment variablesapi/config-api.md
-
Use templates from the
directory:templates/
- Installation templatestemplates/installation.md
- Project setup templatestemplates/project-setup.md
- Configuration templatestemplates/configuration.md
1. Understanding Electron EGG
Electron EGG is a desktop application development framework based on Electron and Egg.js, providing a complete development toolchain and best practices.
Key Concepts:
- Electron: Cross-platform desktop application framework
- Egg.js: Node.js enterprise application framework
- Main Process: Main application process
- Renderer Process: UI rendering process
- IPC: Inter-process communication
- Plugin System: Extensible plugin architecture
2. Installation
Using npm:
npm install electron-egg
Using yarn:
yarn add electron-egg
Using pnpm:
pnpm add electron-egg
3. Basic Setup
// main.js const { Application } = require('electron-egg') const app = new Application({ // Configuration }) app.start()
Doc mapping (one-to-one with official documentation)
→ https://www.kaka996.com/pages/987b1c/examples/
→ https://www.kaka996.com/pages/a99b72/api/
API Reference (api/
)
api/
- Application class, BrowserWindow, ipcMain, lifecycle hooksapi/main-api.md
- ipcRenderer, contextBridge, DOM APIsapi/renderer-api.md
- IPC communication methods and channelsapi/ipc-api.md
- Window creation, management, eventsapi/window-api.md
- Configuration options and environment variablesapi/config-api.md
Best Practices
- Separate processes: Keep main process and renderer process code separate
- Use IPC: Use IPC for inter-process communication
- Handle errors: Properly handle errors in both processes
- Security: Follow Electron security best practices
- Performance: Optimize application performance
- Build configuration: Configure build and package properly
- Plugin system: Use plugin system for extensibility
Resources
- Official Documentation: https://www.kaka996.com/
- Usage Guide: https://www.kaka996.com/pages/987b1c/
- API Documentation: https://www.kaka996.com/pages/a99b72/
- Gitee Repository: https://gitee.com/dromara/electron-egg
Keywords
Electron EGG, electron-egg, Electron, Egg.js, desktop application, 桌面应用, 主进程, 渲染进程, IPC, 进程间通信, 窗口管理, 菜单, 系统托盘, 自动更新, 插件系统, main process, renderer process, inter-process communication, window management, menu, system tray, auto updater, plugin system