electron
Skill15 starsChanged 42 days agoMITView on GitHub
Expert Electron assistance covering Main and Renderer processes, IPC communication, preload scripts, and packaging. Use when building cross-platform desktop applications with web technologies.
- Installs packages
21 other projects use a version of this.
Adopted by
Most recently taken up by
- full-stack-skills/electron-skillstheir own version, first seen Nov 8, 2026
- skillpie/ZCodeOnlinetheir own version, first seen Nov 5, 2026
- ZCodium-project/ZCodiumtheir own version, first seen Nov 1, 2026
- JunfengRan/dev-envtheir own version, first seen Oct 20, 2026
- foxl-ai/skillstheir own version, first seen Oct 15, 2026
- ccbud/CCBuddytheir own version, first seen Oct 14, 2026
Used with
Projects with it also use dep-refs, feature-boundary-planner and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
betacatslingSkilldep-refs
Use when needs to inspect TypeScript export references in the z-code workspace, list exports from a file, verify whether an export is unused before deletion, investigate who imports a symbol during refactors, or combine pnpm knip unused-export results with pnpm dep:refs symbol-level reference tracing.
Also in 5 projects that use this
betacatslingSkillfeature-boundary-planner
Map a ZCode behavior change to current UI surfaces, state owners, protocol commands, persistence, and validation. Use for impact analysis, product-boundary planning, or an implementation handoff grounded in the checked-out source.
Also in 5 projects that use this
Cartograf666Skillarchitecture-governance
Bootstrap, document, enforce, and review a project's architecture through layer responsibilities, dependency direction, architecture manifests, legacy baselines, Change Envelopes, cross-layer approval policy, and deterministic architecture checks. Use when starting a project, auditing an existing codebase, planning cross-layer work, preventing architecture erosion, reviewing structural changes, or deciding whether implementation may expand into another layer.
Also in 5 projects that use this
ZCodium-projectSkille2e-case-lifecycle
Plan, maintain, replay, and promote ZCode desktop E2E cases and their fixtures, coverage matrices, and CI admission evidence.
Also in 3 projects that use this
ZCodium-projectSkillzcode-large-task-fixture
Generate, verify, or remove large synthetic ZCode task fixtures in local ~/.zcode persistence for UI/session performance testing. Use when testing big conversation/task rendering, task list performance, snapshot recovery, tool-call rendering, reasoning, patches, todos, and model usage without spending time chatting manually.
Also in 3 projects that use this
VercelSkillai-elements
Build AI chat interfaces using ai-elements components — conversations, messages, tool displays, prompt inputs, and more. Use when the user wants to build a chatbot, AI assistant UI, or any AI-powered chat interface.
Also in 5 projects that use this
Other versions21 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 21
- vercel-labs/agent-browser★ 47ksame name
- zai-org/ZCode★ 8.6ksame name
- coder/cmux★ 2.1ksame name
- coder/mux★ 2.1ksame name
- phodal/routa★ 1.8ksame name
- opral/flashtype★ 292same name
- ZCodium-project/ZCodium★ 248same name
- 302ai/302-AI-Studio★ 133same name
- intent-hq/cloudlands-fe★ 9same name
- ccbud/CCBuddy★ 8same name
11 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 21 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 139
Always set contextIsolation: true and nodeIntegration: false in webPreferences.
- Very specific: line 141
Use ipcMain.handle() and ipcRenderer.invoke() for asynchronous request-response IPC.
“Common” is measured: kept by at least 6 in 10 of the 21 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Electron
Electron bundles Chromium and Node.js into a desktop app. It is the industry standard (VS Code, Slack, Discord) despite the file size.
When to Use
- Cross-Platform Desktop Applications: Building native macOS, Windows, and Linux apps using web technologies (HTML, CSS, JS).
- Desktop Software Requiring Deep OS Integration: System tray menus, native notifications, file system access, and global hotkeys.
- High-Performance Offline Desktop Tools: IDEs (VS Code), communication tools (Slack), and media editors.
- Enterprise Desktop Packaging: Code-signing, auto-updating, and multi-architecture builds (x64, arm64).
Quick Start
// main.js
const { app, BrowserWindow } = require("electron");
const path = require("path");
function createWindow() {
const win = new BrowserWindow({
width: 1000,
height: 700,
webPreferences: {
preload: path.join(__dirname, "preload.js"),
contextIsolation: true,
nodeIntegration: false,
},
});
win.loadFile("index.html");
}
app.whenReady().then(createWindow);Core Concepts
Secure Main and Renderer Architecture with Context Isolation
Enforcing security boundaries via preload scripts:
// main.js (Main Process)
const { app, BrowserWindow, ipcMain } = require("electron");
const path = require("path");
function createWindow() {
const win = new BrowserWindow({
width: 1200,
height: 800,
webPreferences: {
preload: path.join(__dirname, "preload.js"),
contextIsolation: true, // Enforce security isolation
nodeIntegration: false, // Disable raw Node in renderer
sandbox: true,
},
});
win.loadFile("index.html");
}
ipcMain.handle("read-app-version", async () => {
return app.getVersion();
});
app.whenReady().then(createWindow);Preload Script & ContextBridge
Exposing safe, audited IPC channels to renderer window:
// preload.js (Preload Script)
const { contextBridge, ipcRenderer } = require("electron");
contextBridge.exposeInMainWorld("electronAPI", {
getAppVersion: () => ipcRenderer.invoke("read-app-version"),
onFileSaved: (callback) => {
ipcRenderer.on("file-saved", (_event, value) => callback(value));
},
});Renderer Process Invocation
Calling native desktop capabilities from client frontend:
// renderer.ts (Frontend / React / Vue / Vanilla)
declare global {
interface Window {
electronAPI: {
getAppVersion: () => Promise<string>;
onFileSaved: (callback: (path: string) => void) => void;
};
}
}
async function initUI() {
const version = await window.electronAPI.getAppVersion();
const versionDisplay = document.getElementById("app-version");
if (versionDisplay) {
versionDisplay.textContent = `v${version}`;
}
}
initUI();Common Patterns
Secure IPC Communication with Context Bridge
Problem: Enabling Renderer processes to communicate with OS APIs without creating remote code execution vulnerabilities.
Solution:
Expose strictly typed APIs via contextBridge in preload.js:
// preload.js
const { contextBridge, ipcRenderer } = require("electron");
contextBridge.exposeInMainWorld("electronAPI", {
openFile: () => ipcRenderer.invoke("dialog:openFile"),
});
// main.js: ipcMain.handle("dialog:openFile", async () => { ... });Best Practices
Do:
- Always set
contextIsolation: trueandnodeIntegration: falseinwebPreferences. - Enforce Content Security Policy (CSP) headers in all loaded HTML files to prevent XSS execution.
- Use
ipcMain.handle()andipcRenderer.invoke()for asynchronous request-response IPC. - Validate and sanitize all IPC arguments received from renderer processes.
Don't:
- Enable
webSecurity: falseor disable certificate validation. - Expose entire Node.js modules (e.g.
fs,child_process) throughcontextBridge. - Block the Main process event loop with heavy computation; delegate work to utility processes.
Troubleshooting
| Error | Cause | Solution |
require is not defined in renderer process | nodeIntegration: false and contextIsolation: true enabled (secure default). | Expose necessary Node functions through preload.js with contextBridge. |
Error: Cannot find module 'electron' | Electron installed globally instead of local devDependencies. | Run npm install --save-dev electron in project directory. |
White screen on app launch in production | Asset paths relative to file system failing when packaged. | Use hash routing or ensure relative paths (./) in build output. |
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

