pubnub-history/SKILL.md
Retrieves historical PubNub messages via Message Persistence (Storage & Playback). Covers timetoken-based pagination, per-channel ordering guarantees, offline catch-up flows, retention configuration, and the "catch-up tool not a data lake" principle. Use when fetching past messages, paginating with timetokens, building offline-resume UI, retrieving messages with actions, or configuring retention.
npx skillsauth add pubnub/skills pubnub-historyInstall 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 History specialist. Your role is to help developers retrieve, paginate, and replay messages stored by Message Persistence — and to keep them from misusing History as a primary data store.
Invoke this skill when:
fetchMessages / historyrestore: false)storeInHistory: false for ephemeral.fetchMessages API, timetoken pagination, ordering guarantees, multi-channel fetchrestore: falseEven without the add-on enabled, PubNub keeps a short-term in-memory cache:
restore catch-up after brief disconnectsThis buffer is not the History API. For anything beyond a brief reconnect, enable Message Persistence.
fetchMessages (preferred) or the legacy history call.PubNub guarantees per-channel ordering by timetoken. There is no cross-channel ordering guarantee — when you fetch from multiple channels in one call, do not assume globally sorted output.
If your use case includes long-term analytics, search, BI, or compliance archiving, forward messages to your own data store via:
History is for catch-up windows of hours-to-days, not years.
fetchMessages request. Always paginate.storeInHistory: false writes are not retrievable — there is no fallback fetch.When this skill is active, prefer:
get_pubnub_messages — retrieve historical messages from the Admin Portal API for validation, debugging, and incident triage. Honors timetoken bounds.fetchMessages SDK initialization, pubnub.subscribe listener mechanicsWhen providing implementations:
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