Electrobun RPC

Facilitate type-safe bidirectional communication between Bun processes and webview renderers via WebSockets.

366|65|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/milady-ai/milady --skill electrobun-rpc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Electrobun RPC
Source: https://github.com/milady-ai/milady/tree/main/.claude/plugins/electrobun-dev/skills/electrobun-rpc
Command: npx skills add https://github.com/milady-ai/milady --skill electrobun-rpc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines communication between your Bun backend and webview renderers, ensuring type safety and efficient data exchange for a seamless application experience.

Core Features & Use Cases

  • Bidirectional Communication: Enables requests (with responses) and fire-and-forget messages between Bun and the webview.
  • Type Safety: Uses a shared schema definition to prevent runtime errors and ensure data integrity.
  • Use Case: Imagine a user action in the webview (like clicking a button) that needs to trigger a complex data fetch on the Bun side. This Skill allows the webview to send a request, and Bun to send back the processed data, all with guaranteed type compatibility.

Quick Start

Use the Electrobun RPC skill to send a 'menuAction' message with the action 'file-new' to the renderer.

Frequently Asked Questions about Electrobun RPC

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up type-safe communication between a Bun backend and a webview?

Bidirectional communication between Bun and a webview uses WebSockets with AES-GCM encryption. This mechanism supports both request-response cycles and fire-and-forget messages to handle interactive application workflows.

Can I trigger a data fetch on the Bun side from a webview user action?

Yes, the webview can send a request to trigger a complex data fetch on the Bun side. Bun processes the request and sends back the data, all with guaranteed type compatibility through the shared schema.

Does Electrobun RPC support fire-and-forget messaging?

Electrobun RPC supports fire-and-forget messaging alongside request-response patterns. You can send messages, such as a 'menuAction' with 'file-new', directly to the renderer without waiting for a response.

How are custom RPC schemas defined for Bun and webview interactions?

Custom RPC schemas are defined using a shared schema definition to manage bun-to-renderer and renderer-to-bun interactions. This schema definition prevents runtime errors and ensures type safety across communication channels.