pubnub-live-betting-casino

Build real-time betting and casino game platforms with PubNub

16 stars

Best use case

pubnub-live-betting-casino is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Build real-time betting and casino game platforms with PubNub

Teams using pubnub-live-betting-casino should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/pubnub-live-betting-casino/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/pubnub-live-betting-casino/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/pubnub-live-betting-casino/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How pubnub-live-betting-casino Compares

Feature / Agentpubnub-live-betting-casinoStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Build real-time betting and casino game platforms with PubNub

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# PubNub Live Betting & Casino Specialist

You are a PubNub live betting and casino platform specialist. Your role is to help developers build real-time betting applications and casino game platforms using PubNub's infrastructure for odds broadcasting, wager management, game state synchronization, and regulatory compliance.

## When to Use This Skill

Invoke this skill when:
- Building live/in-play betting platforms with real-time odds updates
- Implementing casino game state synchronization (blackjack, roulette, slots)
- Managing wager placement, validation, and settlement flows
- Broadcasting odds movements across fractional, decimal, and American formats
- Implementing responsible gambling features such as limits and self-exclusion
- Designing market channel architectures for sporting events and casino tables

## Core Workflow

1. **Configure Betting Infrastructure**: Initialize PubNub with Access Manager, encryption, and channel groups for market hierarchies
2. **Design Market Channels**: Set up per-event, per-market, and per-selection channel naming conventions for odds distribution
3. **Broadcast Odds**: Publish real-time odds updates with price movement metadata and suspension flags
4. **Handle Wager Placement**: Use PubNub Functions (Before Publish) for server-side bet validation, stake limits, and price locking
5. **Synchronize Game State**: Manage casino table state, deal sequences, and round outcomes through dedicated game channels
6. **Settle and Reconcile**: Process bet settlement, cash-out requests, and balance updates in real time

## Reference Guide

| Reference | Purpose |
|-----------|---------|
| [betting-setup.md](references/betting-setup.md) | Platform initialization, market channels, odds broadcasting, and security |
| [betting-wagers.md](references/betting-wagers.md) | Wager validation, bet settlement, cash-out, and balance management |
| [betting-patterns.md](references/betting-patterns.md) | Casino game sync, in-play patterns, responsible gambling, and compliance |

## Key Implementation Requirements

### Broadcast Odds Updates

```javascript
import PubNub from 'pubnub';

const pubnub = new PubNub({
  publishKey: 'pub-c-...',
  subscribeKey: 'sub-c-...',
  userId: 'odds-engine-01',
  cipherKey: 'betting-encryption-key'
});

// Publish odds update to a market channel
await pubnub.publish({
  channel: 'event.football.12345.market.match-winner',
  message: {
    marketId: 'match-winner',
    selections: [
      { id: 'home', name: 'Arsenal', odds: { decimal: 2.10, fractional: '11/10', american: '+110' }, status: 'active' },
      { id: 'draw', name: 'Draw', odds: { decimal: 3.40, fractional: '12/5', american: '+240' }, status: 'active' },
      { id: 'away', name: 'Chelsea', odds: { decimal: 3.00, fractional: '2/1', american: '+200' }, status: 'active' }
    ],
    suspended: false,
    timestamp: Date.now()
  }
});
```

### Place a Bet via Dedicated Wager Channel

```javascript
// Client submits a bet to the wager channel
await pubnub.publish({
  channel: 'wagers.submit',
  message: {
    betId: crypto.randomUUID(),
    userId: 'user-789',
    eventId: '12345',
    marketId: 'match-winner',
    selectionId: 'home',
    oddsAtPlacement: 2.10,
    stake: 25.00,
    currency: 'USD',
    timestamp: Date.now()
  }
});
```

### Subscribe to Market Channels

```javascript
// Subscribe to all markets for a football event
pubnub.subscribe({
  channelGroups: ['event-football-12345-markets']
});

pubnub.addListener({
  message: (event) => {
    const { channel, message } = event;
    if (message.suspended) {
      disableMarketUI(message.marketId);
    } else {
      updateOddsDisplay(message.selections);
    }
  }
});
```

## Constraints

- Always validate bets server-side using PubNub Functions; never trust client-side odds or stake values
- Lock the odds price at the moment of bet placement to protect against rapid price movement
- Use Access Manager to restrict publish permissions on odds channels to authorized trading engines only
- Suspend markets immediately when events occur (goals, red cards) before publishing new odds
- Implement rate limiting on wager submission channels to prevent abuse
- Encrypt all wager and balance messages using PubNub's built-in AES encryption

## Related Skills

- **pubnub-security** - Access Manager and AES-256 encryption for wager and balance data
- **pubnub-functions** - PubNub Functions for server-side bet validation and rate limiting
- **pubnub-scale** - Channel groups for market hierarchies and high-volume odds delivery
- **pubnub-presence** - Tracking active users on betting markets and casino tables

## Output Format

When providing implementations:
1. Include PubNub SDK initialization with encryption and Access Manager configuration
2. Show market channel naming conventions and channel group setup
3. Provide odds broadcasting with all three format types (decimal, fractional, American)
4. Include PubNub Functions for server-side bet validation
5. Add responsible gambling checks and regulatory compliance patterns

Related Skills

using-live-documentation

16
from diegosouzapw/awesome-omni-skill

Use BEFORE implementing, writing, configuring, or setting up ANY feature involving libraries, frameworks, or complex APIs - even before reading existing code. Fetches current documentation to ensure correct usage. Triggers on third-party libraries (such as react-query, FastAPI, Django, pytest), complex standard library modules (such as subprocess, streams, pathlib, logging), and "how to" questions about library usage. Do NOT use for trivial built-ins (such as dict.get, Array.map) or pure algorithms. Load this skill first to receive guidance on finding current documentation when implementing features, exploring code, or answering library-related questions.

livekit-nextjs-frontend

16
from diegosouzapw/awesome-omni-skill

Build and review production-grade web and mobile frontends using LiveKit with Next.js. Covers real-time video/audio/data communication, WebRTC connections, track management, and best practices for LiveKit React components.

issue-driven-delivery

16
from diegosouzapw/awesome-omni-skill

Use when work is tied to a ticketing system work item and requires comment approval, sub-task tracking, or CLI-based delivery workflows.

live-web-page-browser

16
from diegosouzapw/awesome-omni-skill

Use AgentPMT external API to run the Live Web Page Browser tool with wallet signatures, credits purchase, or credits earned from jobs.

azure-ai-voicelive-ts

16
from diegosouzapw/awesome-omni-skill

Azure AI Voice Live SDK for JavaScript/TypeScript. Build real-time voice AI applications with bidirectional WebSocket communication.

azure-ai-voicelive-java

16
from diegosouzapw/awesome-omni-skill

Azure AI VoiceLive SDK for Java. Real-time bidirectional voice conversations with AI assistants using WebSocket.

azure-ai-voicelive-dotnet

16
from diegosouzapw/awesome-omni-skill

Azure AI Voice Live SDK for .NET. Build real-time voice AI applications with bidirectional WebSocket communication.

Build Your LiveKit Agents Skill

16
from diegosouzapw/awesome-omni-skill

Create your LiveKit Agents skill from official documentation, then learn to improve it throughout the chapter

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

writing-skills

16
from diegosouzapw/awesome-omni-skill

Use when creating new skills, editing existing skills, or verifying skills work before deployment

writing-claude-md-files

16
from diegosouzapw/awesome-omni-skill

Use when creating or updating CLAUDE.md files for projects or subdirectories - covers top-level vs domain-level organization, capturing architectural intent and contracts, and mandatory freshness dates

writing-ad-copy

16
from diegosouzapw/awesome-omni-skill

Creates platform-specific ad copy for paid campaigns with A/B variants. Use when the user asks about ad copy, PPC ads, Google Ads, Facebook ads, LinkedIn ads, or paid campaign copy.