betterbets-ufc — UFC Fight-Night Skill

What this skill does

Wraps the existing prediction-trader infrastructure (80+ scripts at prediction-trader) into one reusable workflow for any UFC card. Three modes:

  1. Pre-card (T-4h to T-0) — discover card → run LLM analyzer → filter for underdog edges → stage shadow orders → Discord post
  2. Live (during card) — per-fight WebSocket trader spawns on Sportradar events to bet before market repurces
  3. Post-card — reconciler matches shadow orders to outcomes → CLV update → Discord recap

Validated foundation (do not relitigate)

When this skill triggers

  • User says: “ucs fights”, “ufc tonight”, “ufc card”, “fight night”, “underdog plays”, “betterbets ufc”
  • User asks for picks, edges, or to monitor a UFC event
  • A scheduled cron fires bin/preflight.sh 4 hours before any UFC card start time

Quick commands

CommandWhenWhat it does
bin/preflight.sh <YYMMMDD>T-4h before cardDiscover → analyze → filter → stage
bin/golive.sh <YYMMMDD>T-0 (1st bell)Spawn ws_live_trader per pick (requires auth token)
bin/recap.sh <YYMMMDD>T+post-cardReconcile shadows → CLV update → Discord
lib/discover_card.py --date <YYMMMDD>AnytimeLookup all tickers + slugs + SR IDs for a date
lib/underdog_edge_filter.py --llm-json <path>After analyzerApply underdog filter to LLM output

Date format: YYMMMDD matching Kalshi convention (26APR25 = April 25, 2026).

Architecture (thin wrapper over existing engine)

DISCOVERY                  ANALYSIS                  EXECUTION
─────────                  ────────                  ─────────
discover_card.py           ufc_llm_analyzer.py       ws_live_trader.py
  ├─ Kalshi events           (Sonnet via Portkey)      (one process per fight)
  ├─ Polymarket Gamma          ↓                       ├─ Kalshi WS ticker
  └─ Sportradar IDs        underdog_edge_filter.py     ├─ Polymarket USA WS
                             (price<0.50,              └─ Sportradar SR poller
                              edge≥5pp,                  → spawn_live_traders.py
                              conf≥6)                      respects auto-bet-rules.yaml
                               ↓                           and event-to-direction.yaml
                           shadow_orchestrator.py
                             (stages orders)         POST
                                                     ────
                                                     outcome_reconciler.py
                                                       → CLV + win-rate update

The skill DOES NOT REBUILD any of the prediction-trader engine. It provides:

  • lib/discover_card.py — generic card discovery (replaces hardcoded FIGHTS arrays)
  • lib/underdog_edge_filter.py — applies underdog filter to existing analyzer output
  • lib/spawn_live_traders.py — spawns ws_live_trader.py per pick with correct config
  • config/event-to-direction.yaml — formalizes the SR-event → price-direction map (currently scattered across buzukja_event_trader.py + bossar_live_trader.py)
  • config/underdog-filter.yaml — filter rules
  • config/auto-bet-rules.yaml — Kelly sizing, hard caps, kill-switch
  • runbook/ — codified T-4h / Live / Post-card runbooks

Auto-bet authorization model (CLAUDE.md compliance)

Live order placement requires:

  1. Session-level Henry authorization — Henry types: "approved up to $X tonight" → cached at /tmp/betterbets-auth-YYYY-MM-DD.token with the dollar cap
  2. Daily kill-switch token/tmp/trading-paper-ok-YYYYMMDD must exist (created at 06:00 UTC by daily timer)
  3. Hard caps in config/auto-bet-rules.yaml:
    • MAX_PER_ORDER: $5
    • MAX_PER_FIGHT: $15
    • MAX_TOTAL_SESSION: $50
    • STAKE_AS_HALF_KELLY: true
  4. Default mode: paper until BOTH token + --live flag present

spawn_live_traders.py refuses to start without these gates passing. This is the same model used by lifecycle_validator.py for individual orders, lifted to the session level.

What’s intentionally NOT in scope

  • Combo bet creation (Kalshi has no API for this — operator builds via UI per feedback_live_event_betting_workflow)
  • Cross-event manipulation strategies (legal risk, flagged out of scope in pm-arbitrage-execution plan §11)
  • Player props beyond moneyline + distance (prop calibration backtest not yet validated)
  • Polymarket global (US users prohibited; PM USA only)
  • Sherdog / Tapology integration (separate skill, not built)

Plan sources

Invokes / Invoked by

Invokes: SKILL, SKILL, SKILL Invoked by: _summary, _summary