pubnub-illuminate/SKILL.md
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.
npx skillsauth add pubnub/skills pubnub-illuminateInstall 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 Illuminate specialist. Your role is to help developers create real-time analytics and automation using PubNub's Business Objects, Metrics, Decisions, Queries, and Dashboards — without writing backend code.
Invoke this skill when:
manage_illuminate MCP toolResources are built in dependency order. Skipping or reordering breaks things:
All Illuminate calls go to the PubNub Admin API. Every request requires both headers:
POST /v2/illuminate/business-objects HTTP/1.1
Host: admin-api.pubnub.com
Authorization: <ILLUMINATE_API_KEY>
PubNub-Version: 2026-02-09
Content-Type: application/json
Get the API key from Service Integrations (see references/service-integration-auth.md). Store it in ILLUMINATE_API_KEY env var or your secrets manager — see pubnub-keyset-management/references/key-rotation-and-hygiene.md for storage rules.
Illuminate evaluates JSONPath against a normalized document. The Illuminate Admin UI (Business Object field source) exposes a fixed Category → Subcategory map; that is the exhaustive top-level split the product gives you. Deeper keys (e.g. under body or custom) are your normal JSONPath continuation.
message — PubNub message slice
| Subcategory | JSONPath prefix | Notes |
|---------------|-----------------|--------|
| body | $.message.body | Your published payload; append . / [] for nested app fields (e.g. $.message.body.user_id). |
| meta | $.message.meta | Message metadata object; extend with nested keys as needed. |
| userId | $.message.userId | Publisher UUID (scalar path). |
| channel | $.message.channel | Channel name on the message (scalar path). |
channel — Channel object (App Context–style channel record on the document)
| Subcategory | JSONPath prefix |
|---------------|-----------------|
| name | $.channel.name |
| type | $.channel.type |
| status | $.channel.status |
| custom | $.channel.custom |
user — User object
| Subcategory | JSONPath prefix |
|---------------|-----------------|
| externalId | $.user.externalId |
| type | $.user.type |
| status | $.user.status |
| custom | $.user.custom |
membership — Membership object
| Subcategory | JSONPath prefix |
|---------------|-----------------|
| status | $.membership.status |
| custom | $.membership.custom |
After the subcategory: add the remaining path for nested or custom properties (e.g. $.message.body.data.score, $.channel.custom.lastSentMessageUnixTime, $.membership.custom.lastReadUnixTime). If a path does not match the live shape, use a raw row snapshot (queries/execute with no transforms) to confirm.
| Resource | Depends on | Owns | |---|---|---| | Business Object | nothing | schema (fields extracted from messages) | | Metric | a Business Object | aggregation over a time window | | Query | a Business Object | flexible pipeline (alternative to Metric) | | Decision | a Metric, BO, or Query | conditions + actions | | Dashboard | Metrics (and optionally Decisions for overlays) | visualization |
Cascade delete behavior: deleting a parent cascades to dependent analytics resources. Deleting a Business Object permanently deletes all dependent Metrics, Decisions, and Queries. Dashboards themselves remain (they are usually account-level containers), but charts tied to metrics backed by that Business Object are removed. Confirm before destructive operations.
These will save days of debugging. They are documented in detail in references/decisions-4-step-workflow.md:
activeFrom and activeUntil are required on every Decision POST (the API documents them as optional but returns a 500 if you omit them).hitType: "SINGLE" and executeOnce: false are also required.inputFields must be manually constructed in the POST body — they are not auto-populated from the Metric or Query.rules: [] and enabled: false, READ auto-generated IDs, PUT with rules, PUT to enable.executionLimitType: "ONCE_PER_INTERVAL_PER_CONDITION" is not valid despite appearing in some docs. Use ONCE_PER_INTERVAL_PER_CONDITION_GROUP.sourceId and businessObjectId set to the same BO ID.executionFrequency entirely (don't send null).$.message.body.TEXT_LONG fields per BO60, 300, 600, 900, 1800, 3600, 86400 secondsisActive: true — set inactive firstinputFields, outputFields, actions) while enabled — set enabled: false firstDELETEWhen this skill is active, prefer:
manage_illuminate — create, read, update, delete all five resource types (Business Objects, Metrics, Decisions, Queries, Dashboards). Handles the auth header injection.For runtime testing of message data flowing into Business Objects, use:
send_pubnub_message — publish test datasubscribe_and_receive_pubnub_messages — confirm test publishes are flowingAPPCONTEXT_SET_USER_METADATA, APPCONTEXT_SET_CHANNEL_METADATA, APPCONTEXT_SET_MEMBERSHIP_METADATAPUBNUB_PUBLISH actions publish messages to a channelWhen providing implementations:
activeFrom, activeUntil, hitType, executeOnce) even when the user didn't ask.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.
development
Build real-time applications with PubNub pub/sub messaging. Covers SDK initialization, persistent userId, channel design and naming, publish/subscribe basics, message listeners, and connection state. Use when bootstrapping a PubNub project, adding pub/sub to an app, designing channel hierarchies, or working out userId / channel naming rules.