message-loader

Load message handlers from file system directories into Node.js routes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires glob, rou3, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of mapping file system structures to message routes, simplifying the creation and management of message handlers for various communication protocols like WebSockets, IPC, and Worker Threads.

Core Features & Use Cases

  • File System as Router: Automatically registers message handlers based on file names and directory structures.
  • Dynamic Parameter Support: Handles dynamic route parameters (e.g., [id]) for flexible message routing.
  • Use Case: Quickly set up a message handling system where new message types can be added simply by creating new .msg.ts files in a designated directory, without needing to manually update routing configurations.

Quick Start

Use the message-loader skill to load message handlers from the './messages' directory and dispatch a message to '/-/hello' with the data '{ name: "world" }'.

Frequently Asked Questions about message-loader

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

FAQPage Schema
How do I automatically map file system directories to message routes in Node.js?

You can map file system directories to message routes by using a file system-based message routing loader that automatically registers handlers based on file names and directory structures. This eliminates manual routing configuration updates when adding new message types.

How does file system based message routing work with dynamic parameters?

File system based message routing works by mapping directory structures to message routes and supporting dynamic parameters. You can use bracket syntax like [id] in file names to handle flexible, parameterized message routing for WebSocket, IPC, and Worker Thread protocols.

Can I use file system message routing for WebSocket and IPC communication in Node.js?

Yes, file system message routing supports various communication protocols including WebSockets, IPC, and Worker Threads. It simplifies the creation and management of message handlers by automatically mapping directory structures to message routes across different protocols.

What is the best way to add new message handlers without updating routing configurations manually?

The best way to add new message handlers without manual configuration updates is using file system based message routing. Simply create new .msg.ts files in a designated directory, and the loader will automatically discover them using glob and register the routes.

Does Node.js message routing support efficient route matching for large numbers of handlers?

Node.js message routing supports efficient route matching by utilizing the rou3 library. Combined with glob for file discovery, the loader maps directory structures to message routes and performs efficient matching even when handling dynamic parameters across multiple communication protocols.