message-modem

Provides messaging abstraction for Node.js and browser environments with request/response and push support.

1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/cevio/hile --skill message-modem
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: message-modem
Source: https://github.com/cevio/hile/tree/main/packages/message-modem
Command: npx skills add https://github.com/cevio/hile --skill message-modem

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a robust abstraction layer for message-based communication, decoupling your application's core logic from the underlying transport mechanisms like WebSockets, IPC, or postMessage.

Core Features & Use Cases

  • Transport Agnostic: Implement communication logic once and deploy it across various channels.
  • Request/Response & Push: Supports both two-way request/response patterns and one-way notifications.
  • Error Handling & Abort: Built-in mechanisms for timeout, aborting requests, and propagating errors with status codes.
  • Use Case: Build a real-time chat application where the message sending logic remains the same whether you're using WebSockets for web clients or Node.js IPC for inter-process communication.

Quick Start

Implement a new communication channel by extending the MessageModem abstract class, defining post and exec methods.

Frequently Asked Questions about message-modem

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

FAQPage Schema
How do I decouple messaging logic from transport mechanisms like WebSockets or IPC in Node.js?

You can decouple messaging logic by implementing a transport-agnostic abstraction layer that defines clear interfaces for sending and receiving messages. This allows your core application logic to remain completely separate from the underlying communication protocols used.

How does request and response pairing work across different communication protocols?

Request and response pairing works by automatically managing message IDs to match outgoing requests with incoming replies. The abstraction layer handles this pairing internally, along with timeouts and error propagation, ensuring reliable two-way communication across any transport.

Can I use the same messaging abstraction layer for both browser and Node.js environments?

Yes, you can use this messaging abstraction layer in both browser and Node.js environments. It is designed to be transport-agnostic, allowing you to implement communication logic once and deploy it seamlessly across different channels like WebSockets or postMessage.

What is the best way to handle timeouts and aborts in asynchronous messaging systems?

The best way to handle timeouts and aborts is using a built-in messaging abstraction mechanism that natively supports request aborting and error propagation with status codes. This ensures failed requests are properly managed without hanging the application.

How do I implement a new custom communication channel for real-time chat applications?

You implement a new custom communication channel by extending the abstract MessageModem class and defining the post and exec methods. This allows you to build real-time chat applications while keeping the message sending logic consistent across various protocols.

Does this messaging abstraction support one-way push notifications or only request-response patterns?

This messaging abstraction supports both two-way request-response patterns and one-way push notifications. This dual support allows you to handle standard queries as well as broadcast event notifications across your decoupled communication systems.