electron-skills
Applies standard architecture patterns for Electron desktop development.
Install
mkdir -p .claude/skills/electron-skills && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3548" && unzip -o skill.zip -d .claude/skills/electron-skills && rm skill.zipInstalls to .claude/skills/electron-skills
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Electron patterns for LlamaFarm Desktop. Covers main/renderer processes, IPC, security, and packaging.Key capabilities
- →Implement IPC handlers in main process
- →Expose APIs via contextBridge
- →Configure BrowserWindow with context isolation
- →Manage main and renderer process lifecycle
- →Package applications for cross-platform distribution
How it works
The skill utilizes a main process entry point for lifecycle management and IPC handlers, while exposing a secure bridge via contextBridge to the renderer process.
Inputs & outputs
When to use electron-skills
- →Implement IPC handlers for main process
- →Expose APIs via contextBridge safely
- →Configure main and renderer isolation
About this skill
Electron Skills for LlamaFarm Desktop
Electron 28 + Electron Vite patterns for the LlamaFarm Desktop application.
Overview
This skill extends typescript-skills with Electron-specific patterns for main/renderer process architecture, IPC communication, security, and performance.
Tech Stack
| Component | Technology | Purpose |
|---|---|---|
| Framework | Electron 28 | Desktop application framework |
| Build | electron-vite 2 | Vite-based build for main/preload/renderer |
| Updates | electron-updater | Auto-update via GitHub releases |
| Packaging | electron-builder | Cross-platform packaging (macOS/Win/Linux) |
Architecture
electron-app/
src/
main/ # Main process (Node.js context)
index.ts # App entry, lifecycle, IPC handlers
backend/ # CLI installer, model downloader
window-manager.ts
menu-manager.ts
logger.ts
preload/ # Preload scripts (bridge context)
index.ts # contextBridge API exposure
renderer/ # Renderer process (browser context)
index.html # Main window
splash.html # Splash screen
Core Principles
- Process isolation - Main, preload, and renderer are separate contexts
- Context isolation - Always use
contextBridge.exposeInMainWorld - No Node in renderer -
nodeIntegration: falsealways - Type-safe IPC - Define channel types and payload schemas
- Secure by default - Minimize exposed APIs in preload
Related Documents
- electron.md - IPC patterns, main/renderer communication
- security.md - Context isolation, preload security, CSP
- performance.md - Window management, memory, startup
Shared TypeScript Patterns
This skill inherits from typescript-skills:
- patterns.md - Idiomatic TypeScript
- typing.md - Strict typing, generics
- security.md - Input validation, XSS prevention
Quick Reference
IPC Handler Pattern (Main Process)
ipcMain.handle('cli:info', async () => {
const isInstalled = await this.cliInstaller.isInstalled()
return {
isInstalled,
path: isInstalled ? this.cliInstaller.getCLIPath() : null
}
})
Preload Bridge Pattern
const api = {
cli: {
getInfo: () => ipcRenderer.invoke('cli:info')
},
platform: process.platform,
version: process.versions.electron
}
contextBridge.exposeInMainWorld('llamafarm', api)
BrowserWindow Configuration
new BrowserWindow({
webPreferences: {
preload: path.join(__dirname, '../preload/index.js'),
nodeIntegration: false,
contextIsolation: true
}
})
Checklist Summary
| Category | Critical | High | Medium | Low |
|---|---|---|---|---|
| IPC | 2 | 3 | 2 | 1 |
| Security | 4 | 3 | 2 | 1 |
| Performance | 1 | 3 | 3 | 2 |
When not to use it
- →Enabling Node.js integration in renderer process
- →Exposing raw IPC channels to renderer
Prerequisites
Limitations
- →Requires nodeIntegration: false
- →Must use contextBridge for all renderer-to-main communication
How it compares
Unlike standard Electron setups, this enforces strict process isolation and type-safe IPC communication by default.
Compared to similar skills
electron-skills side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| electron-skills (this skill) | 3 | 6mo | No flags | Intermediate |
| telegram-mini-app | 62 | 6mo | Review | Advanced |
| shopify-development | 12 | 6mo | Review | Intermediate |
| nextjs-supabase-auth | 12 | 6mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by llama-farm
View all by llama-farm →You might also like
telegram-mini-app
davila7
Expert in building Telegram Mini Apps (TWA) - web apps that run inside Telegram with native-like experience. Covers the TON ecosystem, Telegram Web App API, payments, user authentication, and building viral mini apps that monetize. Use when: telegram mini app, TWA, telegram web app, TON app, mini app.
shopify-development
davila7
Build Shopify apps, extensions, themes using GraphQL Admin API, Shopify CLI, Polaris UI, and Liquid. TRIGGER: "shopify", "shopify app", "checkout extension", "admin extension", "POS extension", "shopify theme", "liquid template", "polaris", "shopify graphql", "shopify webhook", "shopify billing", "app subscription", "metafields", "shopify functions"
nextjs-supabase-auth
davila7
Expert integration of Supabase Auth with Next.js App Router Use when: supabase auth next, authentication next.js, login supabase, auth middleware, protected route.
nuxt
antfu
Nuxt full-stack Vue framework with SSR, auto-imports, and file-based routing. Use when working with Nuxt apps, server routes, useFetch, middleware, or hybrid rendering.
tanstack-query
exceptionless
Data fetching and caching with TanStack Query in Svelte. Query patterns, mutations, cache invalidation, WebSocket-driven updates, and optimistic updates. Keywords: createQuery, createMutation, TanStack Query, query keys, cache invalidation, optimistic updates, refetch, stale time, @exceptionless/fetchclient, WebSocket
telegram-dev
2025Emma
Telegram 生态开发全栈指南 - 涵盖 Bot API、Mini Apps (Web Apps)、MTProto 客户端开发。包括消息处理、支付、内联模式、Webhook、认证、存储、传感器 API 等完整开发资源。