electron

Build cross-platform desktop apps with JavaScript, HTML, and CSS. Use when building or maintaining Electron apps, configuring IPC/security, or packaging and distributing.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "electron" with this command: npx skills add hairyf/skills/hairyf-skills-electron

Electron embeds Chromium and Node.js so you can ship one JavaScript codebase for Windows, macOS, and Linux. Use these skills when scaffolding projects, wiring main/renderer IPC, configuring security and packaging, or integrating native modules and auto-updates.

The skill is based on Electron (latest), generated at 2026-01-30.

Core References

TopicDescriptionReference
Process ModelMain, renderer, preload, utility process; when to use eachcore-process-model
IPCRenderer↔main patterns (send, invoke, main→renderer), serializationcore-ipc
Context IsolationcontextBridge, exposing safe APIs from preloadcore-context-isolation
SandboxProcess sandboxing, preload polyfill, when it is disabledcore-sandbox

Develop

TopicDescriptionReference
AccessibilitysetAccessibilitySupportEnabled, assistive tech, AXManualAccessibilitydevelop-accessibility
App LifecyclewhenReady, window-all-closed, quit, single instance lockdevelop-app-lifecycle
BaseWindowMulti-view windows; contentView, View, addChildView; parent/modaldevelop-base-window
BrowserWindowCreating windows, loadURL/loadFile, ready-to-show, webPreferencesdevelop-browser-window
ClipboardreadText/writeText, readHTML/writeHTML; use from preloaddevelop-clipboard
Cookiessession.cookies; get, set, remove, flushStore; changed eventdevelop-cookies
Command Lineapp.commandLine, appendSwitch, hasSwitch; Electron/Node/Chromium flagsdevelop-command-line
Context MenuRight-click menu; webContents context-menu, Menu.popupdevelop-context-menu
contentTracingChromium tracing; startRecording, stopRecording; chrome://tracingdevelop-content-tracing
Crash ReportercrashReporter.start, submitURL, extra; call before readydevelop-crash-reporter
DebugRenderer DevTools, main process (--inspect, Chrome/VSCode)develop-debug
Debugger (CDP)webContents.debugger; attach, detach, sendCommand; DevTools Protocoldevelop-debugger
DevTools ExtensionloadExtension, removeExtension; electron-devtools-installerdevelop-devtools-extension
DialogshowOpenDialog, showSaveDialog, showMessageBox; expose via IPCdevelop-dialog
DockmacOS Dock; bounce, badge, icon, menu, hide/showdevelop-dock
Downloadswill-download, DownloadItem, setSavePath, preventDefaultdevelop-downloads
Keyboard ShortcutsAccelerators, local (MenuItem), global (globalShortcut)develop-keyboard-shortcuts
Linux Desktop Actions.desktop file Actions; launcher shortcuts; process.argvdevelop-linux-desktop-actions
Menus and TrayApplication/context/tray/dock menus; Tray icon and context menudevelop-menus-tray
Native ImagecreateFromPath, createFromBuffer, template image; tray, icondevelop-native-image
Native ModulesUsing native Node addons; @electron/rebuild, node-gypdevelop-native-modules
Netnet.fetch, net.request; HTTP from main (Chromium stack)develop-net
netLogSession network logging; startLogging, stopLogging, captureModedevelop-net-log
Drag and DropNative file drag out; webContents.startDrag, IPCdevelop-drag-drop
ESMES modules in main and preload; .mjs, caveatsdevelop-esm
MultithreadingWeb Workers, nodeIntegrationInWorker; no Electron in workersdevelop-multithreading
Navigation HistorywebContents.navigationHistory, goBack, goForward, getAllEntriesdevelop-navigation-history
Offscreen Renderingpaint event, NativeImage; GPU vs software; setFrameRatedevelop-offscreen-rendering
parentPortUtility process child; process.parentPort message/postMessagedevelop-parent-port
Power Monitorsuspend, resume, battery/AC, thermal-state-change, shutdowndevelop-power-monitor
Power Save BlockerpowerSaveBlocker; prevent display/app sleep; start/stop by iddevelop-power-save-blocker
Progress BarsetProgressBar (taskbar/dock); 0–1, indeterminatedevelop-progress-bar
ProtocolCustom protocol (protocol.handle), registerSchemesAsPrivilegeddevelop-protocol
Recent DocumentsaddRecentDocument, clearRecentDocuments; JumpList, Dockdevelop-recent-documents
Safe StorageencryptString, decryptString; OS keychaindevelop-safe-storage
ScreengetPrimaryDisplay, getAllDisplays, workAreaSize, display eventsdevelop-screen
Sessionpartition, defaultSession, permissionRequestHandler, cookiesdevelop-session
Share MenumacOS ShareMenu; share to apps/social; popup, shareMenu roledevelop-share-menu
ShellopenExternal, openPath, showItemInFolder, trashItem; securitydevelop-shell
Processprocess.type, process.versions, process.platform, process.masdevelop-process
Environment VariablesELECTRON_*, NODE_OPTIONS; fusesdevelop-environment-variables
Represented FilesetRepresentedFilename, setDocumentEdited (macOS title bar)develop-represented-file
System PreferencesgetEffectiveAppearance, getColor, getMediaAccessStatusdevelop-system-preferences
Touch BarmacOS TouchBar; items (Button, Label, Slider, etc.), setTouchBardevelop-touch-bar
TestsWebDriver/WebdriverIO E2E, headless CIdevelop-tests
Utility ProcessutilityProcess.fork, postMessage, MessagePortMaindevelop-utility-process
Web RequestonBeforeRequest, onHeadersReceived, filter; set CSPdevelop-web-request
webContents Navigationwill-navigate, setWindowOpenHandler, load eventsdevelop-webcontents-navigation
webFrameRenderer zoom, insertCSS, executeJavaScript, spell check, frame treedevelop-web-frame
webFrameMainMain process frame control; fromId/fromFrameToken, executeJavaScript, IPCdevelop-web-frame-main
webUtilsRenderer getPathForFile(File); file input path; expose via preloaddevelop-web-utils
Window CustomizationFrameless, transparent, custom title bardevelop-window-customization
Windows TaskbarJumpList, setThumbarButtons, setOverlayIcon, flashFramedevelop-windows-taskbar

Best Practices

TopicDescriptionReference
PerformanceMeasure first, defer loading, avoid blocking, bundlebest-practices-performance
SecurityContent loading, webPreferences, CSP, IPC validation, distributionbest-practices-security
VersioningSemVer, ~ vs ^, stabilization branches, upgrade and EOLbest-practices-versioning

Features

TopicDescriptionReference
ASARPack/unpack, Node and Web API usage, unpack option, integrityfeatures-asar
Corner Smoothing-electron-corner-smoothing CSS; smooth rounded corners; system-uifeatures-corner-smoothing
Dark ModenativeTheme, themeSource, prefers-color-schemefeatures-dark-mode
Desktop CapturedesktopCapturer, setDisplayMediaRequestHandler, getDisplayMediafeatures-desktop-capture
FusesrunAsNode, nodeCliInspect, asar integrity; @electron/fusesfeatures-fuses
In-App PurchaseMac App Store IAP; purchaseProduct, getProducts, transactions-updatedfeatures-in-app-purchase
MessagePortsRenderer-to-renderer and main-renderer messaging; MessagePortMainfeatures-message-ports
NotificationsMain (Notification), renderer (Web Notifications API)features-notifications
Online/Offlinenet.isOnline(), net.online; navigator.onLine, online/offline eventsfeatures-online-offline
Push NotificationsAPNS (macOS); registerForAPNSNotifications, received-apns-notificationfeatures-push-notifications
Service Workerssession.serviceWorkers; getAllRunning, main↔SW IPC (IpcMainServiceWorker)features-service-workers
SpellcheckerEnable, setSpellCheckerLanguages, context menu, dictionary URLfeatures-spellchecker
UpdatesautoUpdater, Squirrel, publishing release metadatafeatures-updates
Web Embedsiframe, WebContentsView, webview tag; when to use eachfeatures-web-embeds

Distribute

TopicDescriptionReference
Code SigningmacOS sign + notarize; Windows Authenticodedistribute-code-signing
Mac App StoreMAS build, Apple Distribution, sandbox, limitationsdistribute-mac-app-store
PackagingTooling (Forge), manual layout, asar, rebrandingdistribute-packaging
Windows StoreAppX/MSIX, electron-windows-store, process.windowsStoredistribute-windows-store

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

tailwindcss

No summary provided by upstream source.

Repository SourceNeeds Review
749-hairyf
General

hairy-utils

No summary provided by upstream source.

Repository SourceNeeds Review
689-hairyf
General

react-use

No summary provided by upstream source.

Repository SourceNeeds Review
503-hairyf
General

motion

No summary provided by upstream source.

Repository SourceNeeds Review
486-hairyf
electron | V50.AI