Agent skill

Electron Ipc

by tympanix in tympanix/Electorrent

Safe Electron IPC patterns for renderer-main communication with preload bridges, channel design, replies, and serialization limits.

GPL-3.0Auto-check passed

Install Electron Ipc

skills CLI
$ npx skills add tympanix/Electorrent --skill electron-ipc -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install tympanix/Electorrent electron-ipc --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/tympanix/Electorrent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/electron-ipc .claude/skills/electron-ipc && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
electron-ipc
GitHub stars
1.2k
Token cost
~1.2k tokens
SKILL.md length
475 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
GPL-3.0

At a glance

Safe Electron IPC patterns for renderer-main communication with preload bridges, channel design, replies, and serialization limits.

  • Works in 5 steps: Keep privileged work in the main process. → Expose small, task-specific preload APIs… → Do not expose ipcRenderer.send,… → …
  • SKILL.md covers Purpose, Core Model, Default Rules and Pick the Right Pattern, plus 8 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Electron Ipc is an agent skill from tympanix/Electorrent. Safe Electron IPC patterns for renderer-main communication with preload bridges, channel design, replies, and serialization limits.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: A remote control client for µTorrent, qBittorrent, rTorrent, Transmission, Synology & Deluge. The licence is GPL-3.0.

Example prompts

  • “/electron-ipc”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Keep privileged work in the main process.
  2. Expose small, task-specific preload APIs such as openFile() or
  3. Do not expose ipcRenderer.send, ipcRenderer.invoke, or ipcRenderer.on
  4. When forwarding events from preload, strip the Electron event object and pass
  5. Prefer namespaced channel names such as dialog:openFile for readability.

What it can do on your machine

Read from SKILL.md and the folder at commit d45444f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • electronjs.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Electron Ipc loads about 1.2k tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 475 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~36
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from tympanix/Electorrent at commit d45444f, republished under its GPL-3.0 licence (© tympanix). 475 words, ~1,208 tokens.

Download SKILL.mdSave it as .claude/skills/electron-ipc/SKILL.md (or your agent's skills folder).
name
electron-ipc
description
Safe Electron IPC patterns for renderer-main communication with preload bridges, channel design, replies, and serialization limits.

Skill: Electron IPC

Purpose

Use this skill when you need to design or implement communication between Electron's main and renderer processes.

Core Model

  • IPC is how Electron processes exchange messages.
  • Define your own channel names with ipcMain and ipcRenderer.
  • Channels are arbitrary and bidirectional, but keep names explicit and scoped.
  • In context-isolated apps, expose narrow preload APIs with contextBridge instead of exposing raw Electron modules to the renderer.

Default Rules

  1. Keep privileged work in the main process.
  2. Expose small, task-specific preload APIs such as openFile() or setTitle(title).
  3. Do not expose ipcRenderer.send, ipcRenderer.invoke, or ipcRenderer.on directly to renderer code.
  4. When forwarding events from preload, strip the Electron event object and pass only the data the renderer needs.
  5. Prefer namespaced channel names such as dialog:openFile for readability.

Pick the Right Pattern

NeedRenderer APIMain APINotes
Fire-and-forget renderer -> mainipcRenderer.sendipcMain.onGood for commands with no result
Request/response renderer -> mainipcRenderer.invokeipcMain.handlePreferred two-way pattern
Push main -> rendererpreload listener wrapperwebContents.sendMain must target a specific window/webContents
Renderer -> rendererrelay through main or MessagePortmain as broker if neededNo direct IPC channel between renderers

Pattern 1: Renderer to Main, One Way

Use this when the renderer triggers a main-process action and does not need a result.

Main
js
ipcMain.on('set-title', (event, title) => {
  const win = BrowserWindow.fromWebContents(event.sender)
  win?.setTitle(title)
})
Preload
js
contextBridge.exposeInMainWorld('electronAPI', {
  setTitle: (title) => ipcRenderer.send('set-title', title)
})
Renderer
js
window.electronAPI.setTitle('New title')

Pattern 2: Renderer to Main, Two Way

Use this when the renderer needs a result from the main process. Prefer this over older reply patterns.

Main
js
ipcMain.handle('dialog:openFile', async () => {
  const { canceled, filePaths } = await dialog.showOpenDialog()
  return canceled ? undefined : filePaths[0]
})
Preload
js
contextBridge.exposeInMainWorld('electronAPI', {
  openFile: () => ipcRenderer.invoke('dialog:openFile')
})
Renderer
js
const filePath = await window.electronAPI.openFile()
Notes
  • invoke/handle is the preferred async request-response model.
  • Errors from ipcMain.handle are serialized; the renderer does not receive the full original error object.

Pattern 3: Main to Renderer

Use this when the main process needs to push updates into a specific window.

Show full SKILL.md (190 more words)Show less
Main
js
mainWindow.webContents.send('update-counter', 1)
Preload
js
contextBridge.exposeInMainWorld('electronAPI', {
  onUpdateCounter: (callback) => {
    ipcRenderer.on('update-counter', (_event, value) => callback(value))
  }
})
Renderer
js
window.electronAPI.onUpdateCounter((value) => {
  // update UI
})
Replying Back

There is no invoke equivalent from main to renderer. If the renderer needs to reply, send a new message back to the main process on a separate channel.

Legacy Patterns

Avoid these unless you have a strong compatibility reason:

  • ipcRenderer.send plus event.reply for two-way communication: works, but forces manual reply-channel bookkeeping.
  • ipcRenderer.sendSync: blocks the renderer and hurts responsiveness.

Security Checklist

  • Never hand the renderer unrestricted Electron or Node access.
  • Do not expose raw ipcRenderer methods over contextBridge.
  • Wrap listeners so the callback never receives the Electron event object.
  • Keep preload APIs minimal and purpose-built.
  • Validate inputs in the main process before using privileged APIs.

Serialization Limits

Electron IPC uses the Structured Clone Algorithm.

  • Safe: plain objects, arrays, strings, numbers, booleans, and other structured clone compatible values.
  • Not safe: DOM objects, Electron objects like BrowserWindow or WebContents, and Node/Electron objects backed by native C++ classes.

Pass serializable data, not live framework objects.

Quick Guidance

  • Need a command without a return value: send + on
  • Need a result: invoke + handle
  • Need to notify a renderer from main: webContents.send
  • Need renderer-to-renderer: broker via main or use MessagePort

Reference

© tympanix, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/electron-ipc of tympanix/Electorrent.

Open the folder on GitHubat commit d45444f

Compare with similar skills

Electron Ipc next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Electron Ipc compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Electron Ipc this skilltympanix/Electorrent1.2k—~1.2kAutomated safety check: PassGPL-3.0
Electron Developmentdavila7/claude-code-templates32k3 repos~7kAutomated safety check: PassMIT
Developing Electron DesktopTriliumNext/Trilium38k—~5.7kAutomated safety check: PassAGPL-3.0
Desktop ElectronOpenHands/OpenHands90k—~302Automated safety check: PassMIT
Electron Drive Skillsickn33/agentic-awesome-skills47k1 repos~2.5kAutomated safety check: PassMIT
Fantasia Electron Mainvishiri/fantasia-archive409—~1.4kAutomated safety check: PassGPL-3.0

Similar skills

  • Electron Development

    davila7/claude-code-templates

    Master Electron desktop app development with secure IPC, contextIsolation, preload scripts, multi-process architecture, electron-builder packaging, code signing, and auto-update.

    32k GitHub starsUsed in 3 repos~7k tokens
    MobileAuto-check passed
  • Developing Electron Desktop

    TriliumNext/Trilium

    A skill your agent uses when working on the Trilium Electron desktop app (apps/desktop) — adding or changing an electronApi method / IPC channel, touching preload.ts, main.ts, services/window.ts or…

    38k GitHub stars~5.7k tokensUpdated today
    Knowledge ManagementAuto-check passed
  • Desktop Electron

    OpenHands/OpenHands

    This skill should be used when the user asks to "change the desktop app", "package Electron", "build a universal macOS app", "bundle Node or uv", "fix Electron startup", or changes electron/…

    90k GitHub stars~302 tokensUpdated today
    Auto-check passed
  • Electron Drive Skill

    sickn33/agentic-awesome-skills

    Launch the project's Electron app on a scratch profile and drive it: click, type, screenshot, run renderer or main-process code, read logs.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Testing & QAAuto-check passed
  • Fantasia Electron Main

    vishiri/fantasia-archive

    Works on Fantasia Archive Electron main process: app lifecycle, window management, platform tweaks, native integrations, and ipcMain registration (registerIpc + electron-ipc-bridge channel names).

    409 GitHub stars~1.4k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Render Blocking

    thedaviddias/Front-End-Checklist

    A skill your agent uses when auditing slow page loads, heavy assets, or rendering delays related to Eliminate render-blocking resources.

    74k GitHub stars~430 tokensUpdated 3 days ago
    Frontend & DesignAuto-check passed

More from tympanix/Electorrent

  • Deluge API

    tympanix/Electorrent

    Deluge Web JSON-RPC and core RPC reference covering session login, web methods, and commonly used core torrent operations.

    1.2k GitHub stars~1.2k tokensUpdated 5 days ago
    Auto-check passed
  • Synology API

    tympanix/Electorrent

    Synology Download Station Web API reference covering API discovery, authentication, request format, common errors, and Download Station task operations.

    1.2k GitHub stars~1.3k tokensUpdated 5 days ago
    Auto-check passed
  • Rtorrent API

    tympanix/Electorrent

    rTorrent XML-RPC command reference focused on remote control, multicall patterns, load methods, and the torrent commands used by Electorrent.

    1.2k GitHub stars~17k tokensUpdated 5 days ago
    Auto-check passed
  • Transmission API

    tympanix/Electorrent

    Transmission RPC reference covering JSON-RPC 2.0 transport, session token handling, torrent methods, session methods, and protocol versioning.

    1.2k GitHub stars~12k tokensUpdated 5 days ago
    Auto-check passed
  • Impl

    tympanix/Electorrent

    Implement a feature. An agent skill from tympanix/Electorrent.

    1.2k GitHub stars~834 tokensUpdated 5 days ago
    Auto-check passed

Questions about Electron Ipc

What does Electron Ipc do?

Safe Electron IPC patterns for renderer-main communication with preload bridges, channel design, replies, and serialization limits. Electron Ipc is an agent skill from tympanix/Electorrent. Safe Electron IPC patterns for renderer-main communication with preload bridges, channel design, replies, and serialization limits.

How do I install Electron Ipc in Claude Code?

Run `npx skills add tympanix/Electorrent --skill electron-ipc -a claude-code`. Or copy the skill folder (.agents/skills/electron-ipc in tympanix/Electorrent) into .claude/skills/electron-ipc in your project. Claude Code loads it when a task matches its description.

How do I install Electron Ipc in Codex?

Run `npx skills add tympanix/Electorrent --skill electron-ipc -a codex`. Or copy the skill folder (.agents/skills/electron-ipc in tympanix/Electorrent) into .agents/skills/electron-ipc in your project. Codex loads it when a task matches its description.

Can I use Electron Ipc in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tympanix/Electorrent --skill electron-ipc -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/electron-ipc, .gemini/skills/electron-ipc, .github/skills/electron-ipc and .opencode/skills/electron-ipc in your project.

What does Electron Ipc need to run?

SKILL.md names no scripts, command-line tools or credentials: Electron Ipc is instructions for the agent only.

Does Electron Ipc access the network?

SKILL.md names 1 domain. As links in the text: electronjs.org. This is read from the text; nothing was executed.

Is Electron Ipc safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Electron Ipc use?

Electron Ipc is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Electron Ipc use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Electron Ipc?

Skills that share tags, products or a category with Electron Ipc: Electron Development (davila7/claude-code-templates, 32k stars), Developing Electron Desktop (TriliumNext/Trilium, 38k stars), Desktop Electron (OpenHands/OpenHands, 90k stars) and Electron Drive Skill (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Electron Ipc?

tympanix (a GitHub user) maintains it in tympanix/Electorrent, which has 1,193 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 3, 2026.

Source: tympanix/Electorrent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.