pikku-websocket

Wire WebSocket channels to Pikku actions with per-action routing and EventHub pub/sub.

56|Updated Apr 18, 2021
One-click install
npx skills add https://github.com/pikkujs/pikku --skill pikku-websocket
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pikku-websocket
Source: https://github.com/pikkujs/pikku/tree/main/.claude/skills/pikku-websocket
Command: npx skills add https://github.com/pikkujs/pikku --skill pikku-websocket

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Real-time features require reliable wiring of WebSocket channels, per-action routing, and live event broadcasting; this Skill provides a structured approach to implementing WebSocket-based communication in Pikku apps.

Core Features & Use Cases

  • Wire WebSocket channels to Pikku actions with per-action authentication and optional channel middleware.
  • Enable pub/sub and cross-connection broadcasts using EventHub.
  • Generate a type-safe WebSocket client for easy integration and testing across runtimes.

Quick Start

Connect a WebSocket client to a Pikku-wired channel and send a test action to verify real-time messaging.

Frequently Asked Questions about pikku-websocket

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

FAQPage Schema
How do I wire WebSocket channels with per-action routing and authentication?▼

WebSocket channels can be wired to Pikku actions to enable per-action authentication, allowing each action to enforce its own auth rules while maintaining bidirectional real-time communication.

What is the best way to add real-time pub/sub broadcasting to a WebSocket application?▼

Using an EventHub with WebSocket wiring enables pub/sub and cross-connection broadcasts, allowing events to be efficiently distributed across multiple active WebSocket connections.

Can I apply middleware to WebSocket channels for preprocessing messages?▼

Yes, optional channel middleware can be applied to WebSocket channels, enabling message preprocessing and custom logic execution before actions are dispatched.

How do I generate a type-safe WebSocket client for testing real-time features?▼

A type-safe WebSocket client can be auto-generated during the wiring process, providing easy integration and reliable testing capabilities across different runtimes.

Does WebSocket real-time communication work across multiple runtime environments?▼

Yes, the flexible wiring model supports real-time, bidirectional WebSocket communication across multiple runtimes, making it suitable for live chat, dashboards, and collaborative apps.

When should I use per-action routing instead of a single WebSocket message handler?▼

Per-action routing is ideal when different WebSocket messages require distinct authentication checks and processing logic, providing structured handling for complex real-time applications.