본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)15k · #11137

electron-pro

하는 일

이 스킬은 HTML, CSS, JavaScript 같은 웹 도구와 Electron 프레임워크로 Windows, Mac, Linux용 데스크톱 앱을 만드는 과정을 안내합니다. 웹 앱을 데스크톱 앱으로 바꾸려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓웹 앱을 Windows, Mac, Linux용 데스크톱 앱으로 바꾸고 싶을 때.
  • ✓앱 창과 백그라운드 시스템 사이에 안전한 통신이 필요할 때.
  • ✓자동 업데이트를 설정하거나 앱 스토어용으로 앱에 서명하고 싶을 때.

스킬 링크

https://github.com/fathah/hermes-desktop/blob/main/.agents/skills/electron-pro/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/fathah/hermes-desktop/blob/main/.agents/skills/electron-pro/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“웹 앱을 Electron으로 Windows와 Mac에서 쓸 수 있는 안전한 데스크톱 앱으로 바꾸는 것을 도와줄 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 창을 시스템 수준 접근과 분리한 안전한 프로젝트 구성을 추천한 뒤, 각 부분이 서로 어떻게 통신하는지 보여 줍니다. 데이터 저장, 메모리 사용, 앱 서명도 다룹니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Electron Desktop Developer

Purpose

Provides cross-platform desktop application development expertise specializing in Electron, IPC architecture, and OS-level integration. Builds secure, performant desktop applications using web technologies with native capabilities for Windows, macOS, and Linux.

When to Use

  • Building cross-platform desktop apps (VS Code, Discord style)
  • Migrating web apps to desktop with native capabilities (File system, Notifications)
  • Implementing secure IPC (Main ↔ Renderer communication)
  • Optimizing Electron memory usage and startup time
  • Configuring auto-updaters (electron-updater)
  • Signing and notarizing apps for app stores


2. Decision Framework

Architecture Selection

How to structure the app?
│
├─ **Security First (Recommended)**
│  ├─ Context Isolation? → **Yes** (Standard since v12)
│  ├─ Node Integration? → **No** (Never in Renderer)
│  └─ Preload Scripts? → **Yes** (Bridge API)
│
├─ **Data Persistence**
│  ├─ Simple Settings? → **electron-store** (JSON)
│  ├─ Large Datasets? → **SQLite** (`better-sqlite3` in Main process)
│  └─ User Files? → **Native File System API**
│
└─ **UI Framework**
   ├─ React/Vue/Svelte? → **Yes** (Standard SPA approach)
   ├─ Multiple Windows? → **Window Manager Pattern**
   └─ System Tray App? → **Hidden Window Pattern**

IPC Communication Patterns

Pattern Method Use Case
One-Way (Renderer → Main) ipcRenderer.send logging, analytics, minimizing window
Two-Way (Request/Response) ipcRenderer.invoke DB queries, file reads, heavy computations
Main → Renderer webContents.send Menu actions, system events, push notifications

Red Flags → Escalate to security-auditor:

  • Enabling nodeIntegration: true in production
  • Disabling contextIsolation
  • Loading remote content (https://) without strict CSP
  • Using remote module (Deprecated & insecure)


Workflow 2: Performance Optimization (Startup)

Goal: Reduce launch time to < 2s.

Steps:

  1. V8 Snapshot

    • Use electron-link or v8-compile-cache to pre-compile JS.
  2. Lazy Loading Modules

    • Don't require() everything at top of main.ts.
    // Bad
    import { heavyLib } from "heavy-lib";
    
    // Good
    ipcMain.handle("do-work", () => {
      const heavyLib = require("heavy-lib");
      heavyLib.process();
    });
    
  3. Bundle Main Process

    • Use esbuild or webpack for Main process (not just Renderer) to tree-shake unused code and minify.


4. Patterns & Templates

Pattern 1: Worker Threads (CPU Intensive Tasks)

Use case: Image processing or parsing large files without freezing the UI.

// main.ts
import { Worker } from "worker_threads";

ipcMain.handle("process-image", (event, data) => {
  return new Promise((resolve, reject) => {
    const worker = new Worker("./worker.js", { workerData: data });
    worker.on("message", resolve);
    worker.on("error", reject);
  });
});

Pattern 2: Deep Linking (Protocol Handler)

Use case: Opening app from browser (myapp://open?id=123).

// main.ts
if (process.defaultApp) {
  if (process.argv.length >= 2) {
    app.setAsDefaultProtocolClient("myapp", process.execPath, [
      path.resolve(process.argv[1]),
    ]);
  }
} else {
  app.setAsDefaultProtocolClient("myapp");
}

app.on("open-url", (event, url) => {
  event.preventDefault();
  // Parse url 'myapp://...' and navigate renderer
  mainWindow.webContents.send("navigate", url);
});


6. Integration Patterns

frontend-ui-ux-engineer:

  • Handoff: UI Dev builds the React/Vue app → Electron Dev wraps it.
  • Collaboration: Handling window controls (custom title bar), vibrancy/acrylic effects.
  • Tools: CSS app-region: drag.

devops-engineer:

  • Handoff: Electron Dev provides build config → DevOps sets up CI pipeline.
  • Collaboration: Code signing certificates (Apple Developer ID, Windows EV).
  • Tools: Electron Builder, Notarization scripts.

security-engineer:

  • Handoff: Electron Dev implements feature → Security Dev audits IPC surface.
  • Collaboration: Defining Content Security Policy (CSP) headers.
자주 묻는 질문

Electron이란 무엇인가요?

HTML, CSS, JavaScript 같은 웹 기술로 데스크톱 앱을 만들 수 있게 하는 프레임워크입니다.

기본적으로 안전한가요?

스킬은 컨텍스트 격리는 켜고 노드 통합은 끄는 등 안전한 설정을 권장합니다.

업데이트에도 도움을 주나요?

네. electron-updater로 자동 업데이트를 설정하는 방법을 다룹니다.

상세 정보

작성자의 원본 설명

Expert in building cross-platform desktop applications using web technologies (HTML/CSS/JS) with the Electron framework.

repo: fathah/hermes-desktop

인기도

GitHub 스타
15k
순위
#11137
라이선스
MIT
업데이트
2026. 10. 13.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬