ワンクリックで
electron-foundation
Handles Electron main process, preload bridge, window management, native macOS features, and build tooling configuration.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Handles Electron main process, preload bridge, window management, native macOS features, and build tooling configuration.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Builds React UI components, MobX stores, Tailwind styling with Factory design tokens, shadcn/ui integration, and Framer Motion animations in the Electron renderer.
Builds the Node-native Droid integration layer (transports, protocol, artifacts), SQLite persistence, and session management logic in the Electron main process.
| name | electron-foundation |
| description | Handles Electron main process, preload bridge, window management, native macOS features, and build tooling configuration. |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Features involving:
None — this worker operates at the Electron/Node level.
Read feature description thoroughly. Understand every expectedBehavior and verificationStep.
Read reference materials:
.factory/library/architecture.md for architectural decisions.factory/library/environment.md for paths, versions, platform constraints/Users/brojbean/code/personal-projects/droid-research/ for protocol reference (when building transport/IPC contracts)Write tests first (red). Use Vitest. For Electron main process code, test with mocked Electron APIs. For IPC contracts, test type safety and handler registration. For window management, test state serialization/deserialization.
Implement to make tests pass (green). Follow these Electron conventions:
src/main/src/preload/src/shared/ipc/src/main/windows/src/main/native/ipcRenderer directly — use contextBridge.exposeInMainWorldcontextIsolation: true, nodeIntegration: false, sandbox: trueVerify manually:
pnpm run dev to launch the appwindow.require is undefined, CSP headers presentRun validators:
pnpm exec vitest run — all tests passpnpm exec tsc --noEmit — no type errorsDocument findings in .factory/library/ if you discover environment quirks, native API behaviors, or constraints.
{
"salientSummary": "Set up frameless BrowserWindow with macOS vibrancy (dark material), custom traffic light positioning at {x:20, y:18}, and typed IPC bridge with 12 channel definitions. Ran `npx vitest run` (8 passing) and verified window renders with vibrancy effect visible behind sidebar region. DevTools confirms nodeIntegration:false and contextIsolation:true.",
"whatWasImplemented": "Frameless Electron BrowserWindow with titleBarStyle:'hidden', vibrancy:'sidebar', trafficLightPosition:{x:20,y:18}. Preload script exposes typed window.api with 12 IPC channels. Main process IPC handlers registered for all channels. CSP meta tag blocks eval and inline scripts. macOS dark theme forced via nativeTheme.themeSource='dark'.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{ "command": "npx vitest run", "exitCode": 0, "observation": "8 tests passing across 3 test files" },
{ "command": "npx tsc --noEmit", "exitCode": 0, "observation": "No type errors" }
],
"interactiveChecks": [
{ "action": "Launched app via pnpm run dev", "observed": "Frameless window appeared with dark vibrancy effect. Traffic lights positioned correctly at top-left with ~20px inset." },
{ "action": "Checked DevTools console", "observed": "Zero errors. typeof window.require === 'undefined'. CSP header present." },
{ "action": "Dragged window via titlebar region", "observed": "Window moved. Dragging content area did not move window." }
]
},
"tests": {
"added": [
{ "file": "src/main/__tests__/window.test.ts", "cases": [{ "name": "creates frameless window with vibrancy", "verifies": "BrowserWindow options" }] },
{ "file": "src/shared/__tests__/ipc-types.test.ts", "cases": [{ "name": "IPC channels type-check", "verifies": "typed IPC contract" }] }
]
},
"discoveredIssues": []
}