Fantasia electron main

From vishiri/fantasia-archive · View interactive version

Fantasia electron main is an AI agent skill from the GitHub repository vishiri/fantasia-archive. Works on Fantasia Archive Electron main process: app lifecycle, window management, platform tweaks, native integrations, and ipcMain registration (register*Ipc + electron-ipc-bridge channel names). Use when editing electron-main.ts, src-electron/mainScripts/, or main-side tests.

How to use this skill

Skill file

Fantasia Archive — Electron main process

Entry and flow

IPC payload validation (Zod)

ipcMain.handle args untrusted at runtime — validate in main before stores/privileged APIs.

When Zod not replacing existing code

Testing

Renderer sandbox

Window chrome IPC

Packaged DevTools (intentional — do not regress)

Product law: installed / app.isPackaged builds must open Chrome DevTools via Help → Toggle developer tools, default keybind (F12 / primary chord), and faDevToolsControl IPC — same as unpackaged.

Security hardening (main)

Keybind persistence

mainScripts/keybinds/ — overrides, Zod patch, registerFaKeybindsIpc. See fantasia-keybinds.

SQLite and files

Types

Shared types → types/. See types-folder.mdc.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.