electron-crossplatform-performance

electron-crossplatform-performance is a skill for Claude Code, Codex from hamzabellouch/agent-skills. It costs 57 tokens per session (1,829 once invoked), scanned A, original, MIT.

A guide to building and tuning Electron desktop applications across Windows, macOS, and Linux. It covers Electron’s separate main, renderer, and utility processes, secure inter-process communication, native Node modules, and memory use.

In plain words
What is it for?
Use it to design Electron process architecture, secure communication through ContextBridge, move work off the interface thread, manage windows, and tune application performance.
Why use it?
It helps prevent unsafe process boundaries, blocked user interfaces, excessive memory consumption, and problems caused by platform-specific native code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is preload: path.join(__dirname, '../preload/index.js'),.

Good fit Use it to design Electron process architecture, secure communication through ContextBridge, move work off the interface thread, manage windows, and tune application performance.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/hamzabellouch/agent-skills
agentmods
npx agentmods add skills/hamzabellouch/agent-skills/electron-crossplatform-performance

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for electron-crossplatform-performance

README.md
[![agentmods](https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/electron-crossplatform-performance/github.svg)](https://agentmods.dev/skills/hamzabellouch/agent-skills/electron-crossplatform-performance)
Your own site
<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/electron-crossplatform-performance"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/electron-crossplatform-performance/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for electron-crossplatform-performance

Your own site · 80×15
<a href="https://agentmods.dev/skills/hamzabellouch/agent-skills/electron-crossplatform-performance"><img src="https://agentmods.dev/badge/skills/hamzabellouch/agent-skills/electron-crossplatform-performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,829 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00057 $0.01829
Opus 5 $0.00028 $0.00915
Sonnet 5 $0.00011 $0.00366
Haiku 4.5 $0.00006 $0.00183

Measured 5d ago against content hash 585fede861ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

electron-crossplatform-performance scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Desktop Application Development/electron-crossplatform-performance/SKILL.md · 224 lines

How it starts

The opening of the file, as written. The whole thing — 224 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Electron Cross-Platform Performance & Architecture

Process Architecture & Isolation

Electron applications operate across distinct processes isolated by Chromium sandboxing. Enterprise applications must maintain strict process boundaries:

+-------------------------------------------------------------------------+
|                              Main Process                               |
|  - Node.js Environment (Full System Privilege)                          |
|  - Manages Application Lifecycle & Native Menus / Tray                  |
|  - Controls BrowserWindow instances & Native APIs                       |
+-------------------------------------------------------------------------+
       |                                              |
       | IPC (ContextBridge)                          | UtilityProcess API
       v                                              v
+-----------------------------+         +---------------------------------+
|     Renderer Process        |         |        Utility Process          |
|  - Chromium Web Engine      |         |  - Background Node.js Work      |
|  - Isolated DOM Rendering   |         |  - Non-blocking CPU tasks       |
|  - `nodeIntegration: false` |         |  - Heavy Data Ingestion         |
|  - `contextIsolation: true` |         +---------------------------------+
+-----------------------------+

Security Hardening & Safe IPC Design

1. Mandatory Secure BrowserWindow Configurations

Enforce strict security flags on all BrowserWindow instances:

// main/windowFactory.ts
import { BrowserWindow, app } from 'electron';
import * as path from 'path';

export function createSecureWindow(): BrowserWindow {
  const win = new BrowserWindow({
    width: 1280,
    height: 800,
    show: false, // Prevent white flashing during load
    webPreferences: {
      preload: path.join(__dirname, '../preload/index.js'),
      contextIsolation: true,       // Enforce IPC bridge separation
      nodeIntegration: false,        // Disable node access in renderer
      nodeIntegrationInWorker: false,
      sandbox: true,                 // Enable Chromium Renderer Sandbox
      webSecurity: true,             // Enforce Same-Origin Policy
      allowRunningInsecureContent: false,
    },
  });

  win.once('ready-to-show', () => {
    win.show();
  });

  // Enforce Navigation Restraints
  win.webContents.on('will-navigate', (event, url) => {
    const parsedUrl = new URL(url);
    if (parsedUrl.origin !== 'https://app.yourdomain.com' && !url.startsWith('file://')) {
      event.preventDefault();
      console.warn(`Blocked unauthorized navigation to: ${url}`);
    }
  });

  // Prevent New Windows / Popups
  win.webContents.setWindowOpenHandler(({ url }) => {
    // Open external URLs in default system browser securely
    if (url.startsWith('https:')) {
      require('electron').shell.openExternal(url);
    }
    return { action: 'deny' };
  });

  return win;
}

Read the full file on GitHub · 224 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 224 lines · 57 tokens per session scan A 585fede861ea

Subscribe to this mod's changes

electron-crossplatform-performance is a skill published in the GitHub repository hamzabellouch/agent-skills (4 stars, last pushed 1mo ago), licensed MIT. It adds 57 tokens to every session and 1,829 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.