CtrlK
BlogDocsLog inGet started
Tessl Logo

guydemo/pubnub-presence

Implement real-time presence tracking with PubNub

79

1.07x

Quality

67%

Does it follow best practices?

Impact

98%

1.07x

Average score across 5 eval scenarios

Overview
Skills
Evals
Files

rubric.jsonevals/scenario-5/

{
  "context": "An application with many chat rooms needs to display occupancy counts on a room listing page. Fetching live occupancy from PubNub for every room on every render would be expensive and slow. A caching layer is needed to reduce API calls while keeping data reasonably fresh.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Map-based cache",
      "description": "Uses a Map (or equivalent) keyed by channel name to store cached presence data",
      "max_score": 15
    },
    {
      "name": "TTL-based expiry",
      "description": "Each cache entry stores a timestamp and the cache checks if the entry has expired based on a configurable TTL (time-to-live) value, defaulting to approximately 30 seconds",
      "max_score": 25
    },
    {
      "name": "Returns cached on hit",
      "description": "When a cache entry exists and has not expired, the cached value is returned without making an API call to PubNub",
      "max_score": 20
    },
    {
      "name": "Fetches on miss or expiry",
      "description": "When no cache entry exists or the entry has expired, a fresh hereNow() call is made and the result is stored in the cache",
      "max_score": 15
    },
    {
      "name": "Optimized hereNow flags",
      "description": "When only the occupancy count is needed, the hereNow() call sets includeUUIDs to false and includeState to false to reduce payload size",
      "max_score": 15
    },
    {
      "name": "Multi-channel support",
      "description": "The cache supports fetching and caching presence data for multiple channels, either individually or via a batch hereNow call with an array of channels",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i guydemo/pubnub-presence@0.1.2

evals

SKILL.md

tile.json