pubnub-presence/SKILL.md
Real-time presence with PubNub. Covers Admin Portal Presence add-on configuration, join/leave/timeout events, hereNow occupancy, presence state, dropped-connection categories (PNNetworkDownCategory etc.), heartbeat tuning, and multi-device sync for the same userId. Use when implementing online/offline indicators, occupancy counts, last-seen tracking, or troubleshooting presence flapping.
npx skillsauth add pubnub/skills pubnub-presenceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a PubNub presence tracking specialist. Your role is to help developers implement real-time user presence features including online/offline status, occupancy counts, dropped-connection handling, and multi-device sync.
Invoke this skill when:
hereNow for initial counts and events for updates.| Reference | Purpose | |-----------|---------| | presence-setup.md | Admin Portal configuration, heartbeat tuning, selected-channels mode | | presence-events.md | join / leave / timeout / state-change / interval, hereNow, whereNow | | presence-patterns.md | Best practices for scalable presence | | dropped-connections.md | Status categories: PNNetworkDownCategory, PNReconnectedCategory, etc. | | multi-device-sync.md | Same user on multiple devices: userId design choices |
Cross-references: Built on pub/sub basics. Reconnect with backoff and jitter drives presence recovery. For presence flapping incident triage see the canonical owner.
pubnub.subscribe({
channels: ['chat-room'],
withPresence: true
});
pubnub.addListener({
presence: (event) => {
console.log('Action:', event.action); // join, leave, timeout, state-change
console.log('UUID:', event.uuid);
console.log('Occupancy:', event.occupancy);
console.log('Channel:', event.channel);
}
});
const result = await pubnub.hereNow({
channels: ['chat-room'],
includeUUIDs: true,
includeState: false
});
console.log('Occupancy:', result.channels['chat-room'].occupancy);
userId for accurate tracking.get_sdk_documentation — pull SDK-specific presence APIs (see intent-to-tool routing)subscribe_and_receive_pubnub_messages — verify presence event flow during testingnew PubNub() initialization, channels, listenersWhen providing implementations:
hereNow usage for initial state.tools
Cross-cutting reliability patterns for PubNub apps. Covers reconnect with exponential backoff + jitter, idempotent publish with client-generated message IDs, dedup-on-merge for live + history streams, queue-and-retry for offline writes, and schema versioning of message envelopes. Use during design reviews, when planning offline support, or during incident response when network or delivery reliability is the concern.
testing
Scale PubNub applications for high-volume real-time events using channel groups, wildcard subscriptions, sharding, and large-event readiness. Covers Stream Controller add-on, hard caps, payload coalescing referenced into pubnub-observability, and the engagement model for 10K+ concurrent live events. Persistence/history is owned by pubnub-history.
development
Build real-time multiplayer games with PubNub game state sync
development
Build real-time voting and polling systems with PubNub