Agent skill · pedronauck
centrifugo
Centrifugo real-time messaging server expert for WebSocket PUB/SUB, channel management, JWT authentication, event proxying, and horizontal scaling with Redis/NATS. Use when: centrifugo, centrifugal, real-time messaging, websocket pubsub, channel subscriptions, real-time notifications, live updates, presence, history recovery, server-sent events integration, real-time transport layer. Do not use for: general WebSocket programming without Centrifugo, Socket.IO, Pusher SDK, or other real-time frameworks.
What it needs
About 6k tokens when loaded.
What this skill does
Centrifugo Real-Time Messaging Integration Centrifugo is a self-hosted, language-agnostic real-time messaging server. It handles persistent connections (WebSocket, SSE, HTTP-streaming, WebTransport, GRPC) and broadcasts messages via a channel-based PUB/SUB model. The application backend publishes to channels via Server API; Centrifugo delivers to online subscribers instantly. Core Architecture Key principle: All user-generated data flows through the application backend first (validate, persist, then publish to Centrifugo). Centrifugo is the transport layer, not the source of truth. Procedures Step 1: Determine Integration Pattern Identify the real-time feature being built and select the appropriate pattern: 1. Unidirectional publish (most common): Backend publishes to channels after processing user requests. Clients subscribe and receive updates passively. 2. Bidirectional with proxy: Clients send data over the real-time connection; Centrifugo proxies events (connect, subscribe, publish, RPC) to the backend for validation. 3. Server-side subscriptions: Backend controls which channels a user subscribes to (useful for personalized feeds, notifications). Step 2: Configure Centrifugo Server Generate a minimal configuration: Or use Docker: Essential configuration structure (JSON, YAML, or TOML supported): Read references/configuration.md for the full configuration reference including TLS, admin UI, environment variables, and advanced options. Step 3: Set Up Authentication Centrifugo authenticates clients via JWT or connect proxy. JWT approach (recommended for most cases): Backend generates a JWT with sub (user ID) and exp claims, signed with the configured HMAC/RSA/ECDSA key. Client passes the token when connecting. Supports token refresh for long-lived connections. Connect proxy approach (alternative): Centrifugo forwards connection requests to the backend endpoint for authentication. No JWT needed; backend responds with user identity. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills pedronauck/centrifugo--a12a84