CtrlK
BlogDocsLog inGet started
Tessl Logo

pubnub/pubnub-functions

Create, configure, and deploy PubNub Functions 2.0 event handlers, triggers, and serverless endpoints. Use when building real-time message transformations, PubNub modules, webhook integrations, or edge data processing.

Does it follow best practices?

Evaluation98%

1.81x

Agent success when using this tile

Validation for skill structure

Overview
Skills
Evals
Files

rubric.jsonevals/scenario-4/

{
  "context": "Tests whether the agent correctly implements an On Interval PubNub Function using the event parameter, proper counter retrieval with getCounter, pubnub.publish for subscriber-visible broadcast, and correct async patterns.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Event parameter",
      "description": "Function signature uses 'event' parameter (not 'request'): export default async (event) => { ... }",
      "max_score": 10
    },
    {
      "name": "Event.ok() return",
      "description": "Returns event.ok() on successful execution (not request.ok())",
      "max_score": 10
    },
    {
      "name": "Event.abort() on error",
      "description": "Returns event.abort() in the catch block or on failure (not request.abort())",
      "max_score": 8
    },
    {
      "name": "GetCounter for votes",
      "description": "Uses db.getCounter() (not db.get()) to read the atomic vote counter values",
      "max_score": 12
    },
    {
      "name": "Publish for broadcast",
      "description": "Uses pubnub.publish() (not pubnub.fire() or pubnub.signal()) to broadcast the leaderboard, since it needs to reach subscribers and be stored in history",
      "max_score": 12
    },
    {
      "name": "Default async export",
      "description": "Function uses 'export default async' syntax",
      "max_score": 6
    },
    {
      "name": "Try/catch wrapping",
      "description": "Main function logic is wrapped in a try/catch block",
      "max_score": 6
    },
    {
      "name": "Async/await pattern",
      "description": "Uses async/await for all asynchronous operations, no .then()/.catch() chains",
      "max_score": 8
    },
    {
      "name": "Require inside function",
      "description": "Module imports (require('kvstore'), require('pubnub')) are inside the function body",
      "max_score": 8
    },
    {
      "name": "Operation limit awareness",
      "description": "The function does not exceed 3 combined operations (KV + publish) per execution, or documents awareness of this limit",
      "max_score": 8
    },
    {
      "name": "On Interval trigger",
      "description": "Deployment doc identifies the trigger type as On Interval / scheduled",
      "max_score": 6
    },
    {
      "name": "Console logging",
      "description": "Uses console.log() for informational messages and/or console.error() for error messages",
      "max_score": 6
    }
  ]
}

Install with Tessl CLI

npx tessl i pubnub/pubnub-functions@0.2.2

evals

SKILL.md

tile.json