pubnub-reliability/SKILL.md
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.
npx skillsauth add pubnub/skills pubnub-reliabilityInstall 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 the PubNub reliability specialist. Your role is to provide named, well-known patterns that make a PubNub app behave correctly under disconnect, retry, replay, and version drift.
Invoke this skill when:
This skill is cross-cutting. It applies to chat, IoT, gaming, finance, anything. Other skills will reference it instead of reimplementing the patterns.
For every persistent connection you operate, decide:
message_id, server-side dedup with PubNub FunctionsEvery robust PubNub app has all five. Skipping any one creates a class of bugs that's hard to diagnose later.
| Pattern | Bug class it prevents | |---|---| | Backoff + jitter | Thundering-herd reconnect storms after a regional outage | | Idempotent publish | Duplicate messages from network retries | | Dedup on merge | Duplicate messages from live + history overlap | | Queue and retry | Lost messages published while offline | | Schema versioning | Old clients crash on new fields, new clients can't read old data |
| Scenario | Patterns required | |---|---| | Read-only subscriber (live ticker) | Backoff + jitter | | Chat client (publish + subscribe) | All five | | IoT publisher with intermittent connectivity | Backoff + jitter, idempotent publish, queue + retry, schema versioning | | Mobile app with offline support | All five | | Server-to-server pipeline | Idempotent publish, dedup on merge, schema versioning | | Real-time game | Backoff + jitter, schema versioning, dedup if joining mid-session |
Set on the live listener doesn't handle cold-start replay; persist or rebuild it from history.This skill is design-and-pattern oriented. No MCP tool is required for the patterns themselves. Apply patterns through the SDK and verify with:
get_pubnub_messages — for history-based dedup verificationsubscribe_and_receive_pubnub_messages — for live testsend_pubnub_message — for retry/idempotency testnew PubNub initialization, pubnub.publish and pubnub.subscribe mechanicsPNNetworkDownCategory / PNReconnectedCategory drives backoff stateWhen providing implementations:
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
tools
Deliver real-time sports scores, play-by-play, and scoreboards with PubNub