pubnub-presence

Track real-time user presence in PubNub channels with presence events.

3|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/sjmaple/skills --skill pubnub-presence-sjmaple
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pubnub-presence
Source: https://github.com/sjmaple/skills/tree/main/pubnub-presence
Command: npx skills add https://github.com/sjmaple/skills --skill pubnub-presence-sjmaple

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

PubNub Presence provides real-time visibility into which users are online in a given channel, enabling accurate online indicators and occupancy counts across devices and sessions.

Core Features & Use Cases

  • Enable presence in Admin Portal and narrow channel scope with Presence Management
  • Subscribe with presence to receive join, leave, timeout, state-change, and interval events
  • Manage per-user state data and multi-device scenarios, with hereNow for initial state

Quick Start

Initialize PubNub with a persistent userId, enable presence on your target channels, and subscribe withPresence to start receiving updates.

Frequently Asked Questions about pubnub-presence

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

FAQPage Schema
How do I track real-time user presence and occupancy in PubNub channels?▼

Track real-time user presence in PubNub by subscribing with presence enabled to receive join, leave, timeout, state-change, and interval events for accurate online indicators and occupancy counts.

What PubNub presence events are available for monitoring online and offline user states?▼

PubNub presence events include join, leave, timeout, state-change, and interval events, which monitor user connectivity and update online or offline states across devices and sessions in real time.

How do I get the initial occupancy state for a PubNub channel?▼

Use the PubNub hereNow function to retrieve the initial occupancy state, showing which users are currently online in a channel before subsequent real-time presence events are received.

Can I manage per-user state data across multiple devices with PubNub presence?▼

PubNub presence supports managing per-user state data and multi-device scenarios, allowing you to maintain custom state information across all active sessions for a single user.

How does PubNub handle connection management and cleanup for presence events?▼

PubNub uses an Event Engine-based connection handling approach to manage presence workflows, automatically processing connection events and performing cleanup when users disconnect or time out.

Do I need a persistent userId to enable PubNub presence on my channels?▼

Yes, initialize PubNub with a persistent userId to accurately track presence, enable presence on target channels, and subscribe withPresence to start receiving real-time presence updates.