electron-dev
/electron-dev
Electron main process and IPC development guidelines for Gemini-Subtitle-Pro. Use when working with IPC handlers, preload scripts, native integrations (ffmpeg, whisper, yt-dlp), file system operations, and desktop-specific features. Covers security requirements, IPC patterns, and cross-process communication.
- Author
- corvo007 ↗
- Repository
- MioSub ↗
- Licence
- AGPL-3.0
- Last repository change
- 20.10.2026
Assessment and security
- Files in this package
- 4
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 20.10.2026, without references to retired models or APIs.
AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.
What it does and when to use it
Electron main process and IPC development guidelines for Gemini-Subtitle-Pro. Use when working with IPC handlers, preload scripts, native integrations (ffmpeg, whisper, yt-dlp), file system operations, and desktop-specific features. Covers security requirements, IPC patterns, and cross-process communication.
Original author description
Electron main process and IPC development guidelines for Gemini-Subtitle-Pro. Use when working with IPC handlers, preload scripts, native integrations (ffmpeg, whisper, yt-dlp), file system operations, and desktop-specific features. Covers security requirements, IPC patterns, and cross-process communication.
How it works
- Purpose
- When to Use This Skill
- Quick Start
- Security Requirements (CRITICAL)
- IPC Contract Pattern
- Directory Structure
- Naming Conventions
- Resource Files
SKILL.md preview
---
name: electron-dev
description: Electron main process and IPC development guidelines for Gemini-Subtitle-Pro. Use when working with IPC handlers, preload scripts, native integrations (ffmpeg, whisper, yt-dlp), file system operations, and desktop-specific features. Covers security requirements, IPC patterns, and cross-process communication.
---
# Electron Development Guidelines
## Purpose
Establish secure and consistent patterns for Electron main process development in Gemini-Subtitle-Pro.
## When to Use This Skill
Automatically activates when working on:
- Creating or modifying IPC handlers
- Working with preload scripts
- Native integrations (ffmpeg, whisper, yt-dlp)
- File system operations
- Desktop-specific features
- Protocol handlers
---
## Quick Start
### New IPC Channel Checklist
- [ ] **Handler**: Add in `electron/main.ts` using `ipcMain.handle()`
- [ ] **Bridge**: Expose in `electron/preload.ts` via `contextBridge`
- [ ] **Types**: Update `src/types/electron.d.ts`
- [ ] **Naming**: Use `feature:action` convention
---
## Security Requirements (CRITICAL)
**These settings MUST be maintained in `electron/main.ts`:**
```typescript
const mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: false, // NEVER change to true
contextIsolation: true, // NEVER change to false
sandbox: true, // NEVER change to false
preload: path.join(__dirname, 'preload.js'),
},
});
```
**Why?**
- `nodeIntegration: false` - Prevents renderer from accessing Node.js APIs directly
- `contextIsolation: true` - Separates preload from renderer context
- `sandbox: true` - Limits preload script capabilities
---
## IPC Contract Pattern
### Step 1: Handler in main.ts
```typescript
// electron/main.ts
ipcMain.handle('video:compress', async (event, options: CompressOptions) => {
try {
const result = await compressVideo(options);
return { success: true, data: result };
} catch (error) {
return { success: false, error: error.message };
}
});
```
### Step 2: Bridge in preload.ts
```typescript
// electron/preload.ts
contextBridge.exposeInMainWorld('electronAPI', {
compressVideo: (options: CompressOptions) => ipcRenderer.invoke('video:compress', options),
});
```
### Step 3: Types in electron.d.ts
```typescript
// src/types/electron.d.ts
interface ElectronAPI {
compressVideo: (options: CompressOptions) => Promise<CompressResult>;
}
declare global {
interface Window {
electronAPI: ElectronAPI;
}
}
```
### Step 4: Use in Renderer
```typescript
// src/services/video/compressor.ts
const result = await window.electronAPI.compressVideo(options);
```
---
## Directory Structure
```
electron/
├── main.ts # Main process entry, IPC handlers
├── preload.ts # Context bridge
├── logger.ts # Logging utilities
├── i18n.ts # i18n for main process
├── locales/ # Main process locales
└── services/ # Native service integrations
├── ffmpegService.ts
├── localWhisper.ts
└── videoPreviewTranscoder.ts
```
---
## Naming Conventions
### IPC Channels
Use `feature:action` format:
```typescript
// ✅ Good
'video:compress';
'audio:extract';
'subtitle:export';
'file:select';
'app:getVersion';
// ❌ Bad
'compressVideo';
'COMPRESS_VIDEO';
'video_compress';
```
---
## Resource Files
For detailed guidelines, see the resources directory:
- [ipc-patterns.md](resources/ipc-patterns.md) - IPC communication patterns
- [native-services.md](resources/native-services.md) - Native service integration
- [security-guide.md](resources/security-guide.md) - Security best practices
Files in this package (4)
- SKILL.md 4 KB
- resources/ipc-patterns.md 3 KB
- resources/native-services.md 4 KB
- resources/security-guide.md 3 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · corvo007/MioSub | 100 | AGPL-3.0 |
| jamditis/claude-skills-journalism | 100 | MIT |
| pinkpixel-dev/skills-collection-1 | 100 | Apache-2.0 |
Identical content appears in 4 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version 241c9f4f1172 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90desktop-electron
Use when the user asks about Electron app development, Chromium-based desktop apps, main/renderer process architecture, IPC communication, or packaging Electron apps. Do NOT use for: Tauri (desktop-tauri), or web app frontend (non-desktop skills). - 100electron
Expert Electron assistance covering Main and Renderer processes, IPC communication, preload scripts, and packaging. Use when building cross-platform desktop applications with web technologies. - 100electron
Provides comprehensive guidance for Electron framework including main process, renderer process, IPC communication, window management, and desktop app development. Use when the user asks about Electron, needs to create desktop applications, implement Electron features, or build… - 100electron-expert
Expert in Electron framework, desktop app development, IPC, and cross-platform packaging. Use when the user mentions desktop, Node.js, cross platform, Windows, macOS, or Linux, or when the task involves Electron Architecture, Process Types, IPC Communication, or App Lifecycle. - 100electron
Electron framework for building cross-platform desktop applications with JavaScript, HTML, and CSS. Covers architecture, IPC, security, packaging, auto-updates, and backend integration patterns. USE WHEN: user mentions "Electron", "desktop app", "cross-platform application",… - 100electron-api
Guide for adding new Electron APIs to Wave Terminal. Use when implementing new frontend-to-electron communications via preload/IPC.