Skip to content

pubnub/skills

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PubNub Skills Collection

A comprehensive set of skills for building real-time applications with PubNub's platform. Each skill provides focused guidance, code examples, and best practices for specific PubNub capabilities.

For installation instructions, supported AI coding assistants, and the full skill catalog, see the PubNub Skills documentation.

Quick Start

Tessl Install PubNub Skills

npx tessl skill search pubnub

Vercel Skills Install PubNub Skills

The skills CLI requires no installation and can be run directly using npx:

npx skills add pubnub/skills

Available Skills

Skill Description
pubnub-app-developer Core pub/sub messaging, channels, SDK patterns
pubnub-presence Real-time user online/offline status, occupancy
pubnub-functions Serverless edge functions, webhooks, KVStore
pubnub-security Access Manager, AES-256 encryption, TLS
pubnub-chat Chat SDK, messaging, typing indicators, reactions
pubnub-scale High-volume optimization, channel groups, wildcard subscriptions
pubnub-choose-docs-path Router skill: chat-vs-non-chat, MCP tool selection
pubnub-keyset-management Apps, keysets, env separation, key hygiene, demo keys
pubnub-app-context Objects API: users, channels, memberships, metadata
pubnub-illuminate Business Objects, Metrics, Decisions, Queries, Dashboards
pubnub-history Storage & Playback, timetoken pagination, offline catch-up, dedup-on-merge
pubnub-reliability Backoff+jitter, idempotent publish, queue+retry, dedup, schema versioning
pubnub-observability Logging correlation, test pyramid, runbooks, payload hygiene, usage metrics
pubnub-events-and-actions Webhook / Lambda / Kafka / SQS / EventBridge integrations
pubnub-live-auctions Real-time auction platforms with bidding and countdowns
pubnub-live-betting-casino Real-time betting and casino game platforms
pubnub-live-sport-updates Real-time sports scores, play-by-play, scoreboards
pubnub-live-stock-quote-updates Real-time stock quotes and market data
pubnub-live-voting Real-time voting and polling systems
pubnub-multiplayer-gaming Real-time multiplayer game state synchronization
pubnub-order-delivery-driver Real-time order tracking and delivery driver systems
pubnub-telemedicine HIPAA-compliant telemedicine applications

For more details, see the CLI documentation.

Use with AI Coding Assistants

Once installed, skills are automatically available in any compatible AI coding assistant. Ask about PubNub topics and the relevant skill will be invoked.

Supported tools include:

  • Claude Code — skills load automatically from the project directory
  • Cursor — skills are picked up via the .cursor/skills/ convention
  • VS Code (GitHub Copilot) — compatible via the Vercel skills CLI
  • Codex and other agents that support the SKILL.md format

Skill Details

pubnub-app-developer

Build real-time applications with PubNub pub/sub messaging.

Use for:

  • Implementing channels and subscriptions
  • Message handling and SDK configuration
  • Cross-platform development (JavaScript, Python, Swift, Kotlin)

References:

  • publish-subscribe.md - Core pub/sub patterns
  • channels.md - Channel naming and design
  • sdk-patterns.md - SDK initialization across platforms
  • message-filters.md - Subscribe-side filter expressions
  • rest-api.md - REST API usage and auth headers
  • sdk-upgrades.md - Migration guide between SDK major versions

pubnub-presence

Implement real-time presence tracking with PubNub.

Use for:

  • User online/offline status indicators
  • Channel occupancy counts
  • Connection state management
  • Multi-device synchronization

References:

  • presence-setup.md - Admin Portal configuration
  • presence-events.md - Join/leave/timeout handling
  • presence-patterns.md - Scalable presence best practices
  • dropped-connections.md - Heartbeat, reconnect, and disconnect detection
  • multi-device-sync.md - Presence across multiple devices per user

pubnub-functions

Develop serverless edge functions with PubNub Functions 2.0.

Use for:

  • Message transformation and enrichment
  • Webhook integrations with external APIs
  • HTTP endpoints for REST APIs
  • Scheduled tasks and aggregation
  • Function chaining (3-hop, 5-consecutive) and shared-state designs
  • Bundling/transpiling TypeScript Functions

References:

  • functions-basics.md - Function structure, event types, On Request URI routing, execution limits
  • functions-modules.md - KVStore, XHR, Vault, PubNub, Crypto/JWT/UUID, codec/*, jsonpath, advanced_math, ugc modules
  • functions-patterns.md - Counters, rate limiting, workflows
  • functions-chaining.md - 3-chain rule, Chaining vs Forking, kvstore state sharing, channel hygiene
  • db-triggers-and-runtime-quirks.md - DB-trigger patterns and runtime quirks (3-call cap, vault availability, request.path, sendFile, etc.)
  • bundling-and-typescript.md - esbuild externals, 64 KB guard, default-export shape, require-placement

pubnub-security

Secure PubNub applications with Access Manager and encryption.

Use for:

  • Authentication and authorization
  • Token grants and permission management
  • AES-256 message encryption
  • TLS configuration

References:

  • access-manager.md - Access Manager setup and grants
  • encryption.md - Message and file encryption
  • security-best-practices.md - Key security, compliance
  • dos-mitigation.md - Rate limiting and abuse prevention
  • ip-whitelisting.md - IP allowlist configuration
  • compliance-reports.md - SOC 2, HIPAA, GDPR compliance evidence

pubnub-chat

Build chat applications with PubNub Chat SDK.

Use for:

  • Direct messaging and group channels
  • Typing indicators and read receipts
  • Message reactions and threading
  • User management

References:

  • chat-setup.md - Chat SDK initialization
  • chat-features.md - Channels, messages, reactions
  • chat-patterns.md - User management, real-time sync
  • file-sharing.md - File upload, download, and message attachments
  • message-actions.md - Reactions, receipts, and custom action types
  • threading.md - Threaded replies and conversation trees

pubnub-scale

Scale PubNub applications for high-volume events.

Use for:

  • Performance optimization
  • Channel groups and wildcard subscriptions
  • Large-scale event handling (10K+ users)
  • Throughput tuning and concurrency

References:

  • scaling-patterns.md - Channel groups, wildcards
  • performance.md - Message optimization, batching
  • large-events.md - 10K+ concurrent live-event playbook + PubNub engagement

Message persistence, history, and offline catch-up have moved to the dedicated pubnub-history skill.


pubnub-choose-docs-path

Route PubNub questions to the correct documentation source, MCP tool, and specialist skill.

Use for:

  • First-touch triage when a user mentions PubNub without naming a feature
  • Choosing between chat SDK vs core SDK
  • Picking between Functions, Events & Actions, and Illuminate
  • Mapping intent to the right user-pubnub MCP tool

References:

  • intent-to-tool.md - Decision tree from user intent to (skill, MCP tool, docs link)

pubnub-keyset-management

Manage PubNub apps, keysets, and environment separation.

Use for:

  • Setting up dev / staging / prod keysets
  • Publish, subscribe, and secret key handling
  • Key rotation and hygiene
  • Demo-key boundaries and custom origin configuration

References:

  • keysets-and-environments.md - App/keyset model, env separation
  • key-rotation-and-hygiene.md - Rotation procedure, secret-key handling
  • demo-keys.md - Demo-key limits and migration
  • custom-origin.md - Custom origin configuration

pubnub-app-context

Manage users, channels, and memberships with the PubNub App Context (Objects) API.

Use for:

  • User profile CRUD with custom metadata
  • Channel metadata for descriptions, settings, and tags
  • Membership management between users and channels
  • Server-side filtering and live metadata-change events

References:

  • users.md - User CRUD, profile metadata, filtering
  • channels-and-memberships.md - Channel metadata, memberships, members
  • metadata-and-filtering.md - Filter expressions, eTag concurrency, change events

pubnub-illuminate

Build real-time analytics, decisions, and dashboards with PubNub Illuminate.

Use for:

  • Defining Business Objects from in-flight messages
  • Authoring Metrics (COUNT, SUM, AVG) over dimensions
  • The 4-step Decision workflow (POST → READ → PUT rules → PUT enable)
  • Saved Queries and Dashboards
  • Service Integration auth for the admin API

References:

  • business-objects.md - Schema, JSONPath fields, activation
  • metrics.md - Aggregations, dimensions, windows
  • decisions-4-step-workflow.md - METRIC and BUSINESSOBJECT decision flows
  • queries-adhoc-vs-saved.md - Query types and reuse
  • dashboards.md - Dashboard composition and sharing
  • service-integration-auth.md - Admin API authentication

pubnub-history

Replay PubNub messages with Storage & Playback, timetoken pagination, and offline catch-up.

Use for:

  • Paginated history loaders for chat, tickets, and timelines
  • Offline app catch-up when a client reconnects
  • Multi-channel history retrieval with fetchMessages
  • Dedup-on-merge between live and historical streams

References:

  • pagination-and-ordering.md - Timetoken pagination, ordering, edge cases
  • offline-catch-up.md - Reconnect-and-catch-up flow with bounded windows
  • retention-and-storage.md - Storage tiers, retention, storeInHistory

pubnub-reliability

Cross-cutting reliability patterns for PubNub apps.

Use for:

  • Reconnect with exponential backoff and jitter
  • Idempotent publish with client-generated message_id
  • Dedup-on-merge between live and history streams
  • Persistent offline publish queues with dead-letter
  • Schema versioning and tolerant readers

References:

  • backoff-and-jitter.md - Reconnect controller, jitter formula
  • idempotent-publish.md - Stable IDs across retries
  • dedup-on-merge.md - LRU and Set-based dedup
  • queue-and-retry.md - Persistent, FIFO, bounded queues
  • schema-versioning.md - Version routing and migration flow

pubnub-observability

Logging, testing, cost hygiene, incident triage, and usage metrics for PubNub apps.

Use for:

  • Correlation logging for every publish/subscribe (four-field standard)
  • Test pyramid for real-time apps
  • Pre-launch cost projection (transactions, not bytes)
  • Incident-triage runbook for messages-dropped and connection issues
  • Weekly usage-metrics review and billing reconciliation

References:

  • logging-correlation.md - Four-field correlation, structured logs
  • test-pyramid.md - Unit, integration, load test layers
  • cost-and-payload-hygiene.md - Fan-out math, payload sizing, coalescing
  • incident-runbook.md - Triage flows for common incidents
  • usage-metrics.md - get_pubnub_usage_metrics, anomaly detection

pubnub-events-and-actions

Route PubNub events to external systems with no code via Events & Actions (E&A).

Use for:

  • Webhook receivers (Lambda, Cloud Functions, custom HTTP)
  • Fan-out to SQS, Kinesis, Kafka, S3, EventBridge, IFTTT, AMQP
  • JSONPath filters on Messages, Users, Channels, Push, Memberships events
  • Idempotent batched receivers, retries, and envelope handling

References:

  • event-types.md - Listener categories and event shapes
  • action-targets.md - Webhook, queue, stream, storage, and IFTTT targets
  • filters-and-jsonpath.md - Basic vs JSONPath filters, operators
  • retries-and-batching.md - Retry policy, batching, envelope versions

pubnub-live-auctions

Build real-time auction platforms with PubNub bidding and countdowns.

Use for:

  • Live bidding with server-side validation
  • Countdown timer synchronization
  • Outbid notifications and bid activity feeds
  • Auction lifecycle management

References:

  • auction-setup.md - Auction channel design, lifecycle management
  • auction-bidding.md - Bid validation, race condition handling
  • auction-patterns.md - Reserve prices, auto-extend, proxy bidding

pubnub-live-betting-casino

Build real-time betting and casino game platforms with PubNub.

Use for:

  • Live/in-play betting with real-time odds updates
  • Casino game state synchronization
  • Wager placement, validation, and settlement
  • Responsible gambling features

References:

  • betting-setup.md - Platform initialization, market channels, odds broadcasting
  • betting-wagers.md - Wager validation, bet settlement, cash-out
  • betting-patterns.md - Casino game sync, in-play patterns, compliance

pubnub-live-sport-updates

Deliver real-time sports scores, play-by-play, and scoreboards with PubNub.

Use for:

  • Live scoreboards and score tickers
  • Play-by-play and timeline feeds
  • Multi-sport dashboards
  • Fan engagement features

References:

  • sport-updates-setup.md - Channel hierarchy, data models, subscription patterns
  • sport-updates-events.md - Game event types, scoring logic, play-by-play
  • sport-updates-patterns.md - Multi-sport dashboards, fan engagement, scaling

pubnub-live-stock-quote-updates

Deliver real-time stock quotes and market data with PubNub.

Use for:

  • Live stock quote streaming
  • Portfolio tracking and watchlists
  • Price alert systems
  • Ticker displays and charting dashboards

References:

  • stock-quotes-setup.md - Channel design, quote broadcasting, ingestion
  • stock-quotes-portfolio.md - Watchlist management, price alerts
  • stock-quotes-patterns.md - Ticker displays, charting, market hours

pubnub-live-voting

Build real-time voting and polling systems with PubNub.

Use for:

  • Live audience polling and voting
  • Real-time vote tallying with duplicate prevention
  • Survey systems with live results
  • Multi-round voting workflows

References:

  • voting-setup.md - Poll creation, channel design, lifecycle management
  • voting-tallying.md - Duplicate prevention, atomic counters, fraud detection
  • voting-patterns.md - Result broadcasting, multi-round voting, weighted votes

pubnub-multiplayer-gaming

Build real-time multiplayer games with PubNub game state sync.

Use for:

  • Game lobbies and room management
  • Game state synchronization with delta updates
  • Matchmaking systems
  • Player connection and reconnection handling

References:

  • gaming-setup.md - Game room creation, lobby management
  • gaming-state-sync.md - Game state synchronization, delta updates
  • gaming-patterns.md - Matchmaking, turn-based/real-time patterns, anti-cheat

pubnub-order-delivery-driver

Build real-time order tracking and delivery driver systems with PubNub.

Use for:

  • GPS location streaming from driver apps
  • Order status pipeline management
  • Dispatch coordination and driver assignment
  • Customer-facing tracking pages

References:

  • delivery-setup.md - Channel design, GPS publishing, SDK initialization
  • delivery-status.md - Order lifecycle states, ETA calculation, geofencing
  • delivery-patterns.md - Dispatch coordination, fleet dashboards, proof of delivery

pubnub-telemedicine

Build HIPAA-compliant telemedicine apps with PubNub real-time messaging.

Use for:

  • Secure patient-provider communication
  • Virtual waiting rooms and patient queues
  • WebRTC video consultation signaling
  • Audit logging and consent management

References:

  • telemedicine-setup.md - HIPAA configuration, encryption, Access Manager
  • telemedicine-features.md - Patient queue management, notifications, consent
  • telemedicine-patterns.md - Consultation workflows, WebRTC signaling, audit logging

Publishing & Updating Skills

Initial Publish

To publish a new skill to the pubnub workspace:

tessl skill publish --workspace pubnub --public ./<skill-name>

Publish All Skills (admin-only)

To publish or update all PubNub skills:

npm i -g @tessl/cli
tessl login
tessl skill publish --workspace pubnub --public ./pubnub-app-developer
tessl skill publish --workspace pubnub --public ./pubnub-presence
tessl skill publish --workspace pubnub --public ./pubnub-functions
tessl skill publish --workspace pubnub --public ./pubnub-security
tessl skill publish --workspace pubnub --public ./pubnub-chat
tessl skill publish --workspace pubnub --public ./pubnub-scale
tessl skill publish --workspace pubnub --public ./pubnub-choose-docs-path
tessl skill publish --workspace pubnub --public ./pubnub-keyset-management
tessl skill publish --workspace pubnub --public ./pubnub-app-context
tessl skill publish --workspace pubnub --public ./pubnub-illuminate
tessl skill publish --workspace pubnub --public ./pubnub-history
tessl skill publish --workspace pubnub --public ./pubnub-reliability
tessl skill publish --workspace pubnub --public ./pubnub-observability
tessl skill publish --workspace pubnub --public ./pubnub-events-and-actions
tessl skill publish --workspace pubnub --public ./pubnub-live-auctions
tessl skill publish --workspace pubnub --public ./pubnub-live-betting-casino
tessl skill publish --workspace pubnub --public ./pubnub-live-sport-updates
tessl skill publish --workspace pubnub --public ./pubnub-live-stock-quote-updates
tessl skill publish --workspace pubnub --public ./pubnub-live-voting
tessl skill publish --workspace pubnub --public ./pubnub-multiplayer-gaming
tessl skill publish --workspace pubnub --public ./pubnub-order-delivery-driver
tessl skill publish --workspace pubnub --public ./pubnub-telemedicine

Updating a Skill

  1. Edit the skill files - Update SKILL.md or reference files in the skill directory

  2. Bump the version - Update the version in both tile.json and the metadata.version field in SKILL.md — they must stay in sync:

    {
      "version": "0.2.0"
    }
    metadata:
      version: "0.2.0"
  3. Re-publish - Run the publish command again from the repo root:

    tessl skill publish --workspace pubnub --public ./<skill-name>

Skill Structure

Each skill lives at the repo root and follows this directory structure:

pubnub-<skill-name>/
├── SKILL.md           # Main skill definition with frontmatter
├── tile.json          # Committed manifest (name, version, summary, dependencies)
├── references/        # Supporting documentation
│   ├── <topic-1>.md
│   ├── <topic-2>.md
│   └── <topic-3>.md
└── evals/             # Automated evaluation harness (5 scenarios per skill)
    ├── instructions.json
    ├── summary.json
    └── scenario-0/
        ├── task.md
        ├── capability.txt
        └── criteria.json

SKILL.md Frontmatter

Each SKILL.md requires YAML frontmatter:

---
name: skill-name
description: Short description for CLI display
license: PubNub
metadata:
  author: pubnub
  version: "0.1.0"
  domain: real-time
  triggers: comma, separated, keywords
  role: specialist
  scope: implementation
  output-format: code
---

Verify Publication

After publishing, verify the skill is available:

tessl skill search pubnub

Workspace

All skills are published to the pubnub workspace on tessl.io.

Version

Catalog versions:

  • 8 vertical skills at 0.2.0: pubnub-live-auctions, pubnub-live-betting-casino, pubnub-live-sport-updates, pubnub-live-stock-quote-updates, pubnub-live-voting, pubnub-multiplayer-gaming, pubnub-order-delivery-driver, pubnub-telemedicine.
  • 5 foundational skills at 0.2.0: pubnub-app-developer, pubnub-presence, pubnub-security, pubnub-chat, pubnub-scale.
  • 9 cross-cutting skills:
    • pubnub-functions at 0.3.0.
    • pubnub-choose-docs-path, pubnub-keyset-management, pubnub-app-context, pubnub-illuminate, pubnub-history, pubnub-reliability, pubnub-observability, pubnub-events-and-actions at 0.1.0.

License

PubNub

About

Skills for AI Agents using PubNub SDKs and APIs to enable multiplayer in games, in-app chat, live score updates and in-app communication.

Topics

Resources

License

Stars

Watchers

Forks

Contributors