pubnub-events-and-actions/SKILL.md
Routes PubNub events to external systems with no code via Events & Actions (E&A). Covers event listeners (Messages, Users, Channels, Push, Memberships), action targets (Webhook, SQS, Kinesis, S3, Kafka, IFTTT, AMQP), filter types (basic vs JSONPath), retry policy, envelopes, and batching. Use when integrating PubNub with Lambda, Kafka, SQS, S3, EventBridge, an analytics pipeline, or any external system.
npx skillsauth add pubnub/skills pubnub-events-and-actionsInstall 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 Events & Actions (E&A) specialist. Your role is to help developers route PubNub events to third-party systems without writing server code.
Invoke this skill when:
E&A vs Functions decision:
| Use E&A | Use Functions | |---|---| | Route messages to external systems | Modify messages in flight | | No code, configuration only | Custom logic per message | | Standard webhook / queue / blob target | Aggregation, transformation, enrichment | | Bulk batching to S3 | Conditional publishing |
| Tier | Events ingested | Listeners | Actions/listener | Action types | Retry | |---|---|---|---|---|---| | Free | 10K/mo | 1 | 1 | Webhook only | No | | Intro | 2M | Unlimited | 3 | All | Yes | | Tier 1 | 4M | Unlimited | 3 | All | Yes | | Tier 2 | 25M | Unlimited | 3 | All | Yes | | Tier 3 | 66M | Unlimited | 3 | All | Yes | | Tier 4 | 200M | Unlimited | 3 | All | Yes | | Tier 5 | 500M | Unlimited | 3 | All | Yes | | Tier 6 | Unlimited | Unlimited | Unlimited | All | Yes |
Free tier is webhook-only with no retry — production use almost always requires a paid tier.
Actions are independent objects. Create the action once (with its target endpoint and credentials), then attach it to one or more listeners. This means you can swap listener filters without touching action credentials.
E&A does not process internal presence publishes (e.g., -pnpres channels). Use the dedicated Presence event sources instead.
Every webhook payload includes a schema field that uniquely identifies the event type and schema version, e.g.:
pubnub.com/schemas/events/presence.user.channel.joined?v=1.0.0
Receivers should switch on schema to handle each event type. See references/event-types.md for the catalog.
Distinct from your application's message envelope schema version — those are separate.
E&A supports envelope versions 1.0, 2.0, and 2.1 (default). Each version comes in enveloped (with E&A metadata) and unenveloped (raw event) flavors. Default: 2.1, no envelope. See references/retries-and-batching.md for migration notes.
-pnpres) is excluded — use the Presence-source listeners instead.Events & Actions configuration is currently UI-driven via the Admin Portal. There is no dedicated MCP tool for E&A object manipulation; use the Admin Portal directly.
For verifying event flow:
send_pubnub_message — generate test eventssubscribe_and_receive_pubnub_messages — confirm publish path before E&A deliveryget_pubnub_messages — confirm events landed in historybefore publish / after publish / on requestWEBHOOK_EXECUTION action type in DecisionsWhen providing implementations:
schema field handling in any webhook receiver code example.tools
Builds real-time analytics and automation with PubNub Illuminate. Covers Business Objects (schema), Metrics (aggregations), Decisions (threshold-triggered actions with the 4-step PUT workflow), Queries (ad-hoc vs saved pipelines), and Dashboards. Use when tracking KPIs, building threshold alerts, automating mute/publish/App-Context-update actions, detecting spam or anomalies, or visualizing live activity.
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.
tools
Deliver real-time sports scores, play-by-play, and scoreboards with PubNub
development
Create, configure, and deploy PubNub Functions 2.0 event handlers, triggers, and serverless endpoints. Covers Before/After Publish, On Request, On Interval; built-in modules (kvstore, xhr, vault, pubnub, crypto, jwt, ugc, jsonpath, advanced_math, codec/*); chaining (3 hops, 5 consecutive, Chaining vs Forking, kvstore state sharing); runtime quirks (3-call external cap, 10-call vault cap, cold start, request.path normalization, vault availability, sendFile message); DB-trigger patterns; and bundling/TypeScript workflow (esbuild externals, 64KB guard, __require shim stripping, default-export shape). Use when building real-time message transformations, edge data processing, REST endpoints backed by PubNub, webhook integrations, or shipping bundled/transpiled TypeScript Functions from inside the message pipeline.