convez.ai
SkillFinanceiroAvançado
PackieY

Odds Pull

PackieY/odds-pull

Puxa odds de esportes multi-plataforma e gera relatório HTML em segundos

Ver no GitHub
InicialPluginScore · de 0 a 100

Skill autossuficiente que converte uma frase em linguagem natural em um relatório HTML de odds de esportes cross-platform. Integra dados de Polymarket, DraftKings, FanDuel e Kalshi, aplicando filtros inteligentes e detecção de anomalias para insights financeiros imediatos.

Instalação

$npx convez-ai PackieY/odds-pull

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
28%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Análise rápida de odds para apostas desportivas
  • Detecção de anomalias e disparidades entre plataformas
  • Geração automatizada de relatórios de mercados de previsão

Veredito

Solução robusta e bem arquitetada para traders e analistas que precisam monitorar odds multi-plataforma programaticamente. Exige configuração local (API keys, Python) mas oferece pipeline completo de coleta, matching inteligente e relatórios visuais prontos para ação.

README

A tradução para o português deste README ainda está na fila.

odds-pull skill

A portable, self-contained Claude Code skill that turns one natural-language sentence into a multi-platform sports-odds HTML report.

What it does

You say:

帮我拉一下 NBA 这周末的 odds 数据 compare odds for tonight's NBA games pull mainstream odds for the next 3 days

…and your AI:

  1. Parses the sport + time window from your sentence
  2. Fetches odds from Polymarket, DraftKings, FanDuel, Kalshi
  3. Cross-platform matches games (with LLM fallback for tricky cases)
  4. Filters to main-event games (≥ 3 platforms, volume ≥ $10K)
  5. Generates a self-contained HTML report — opens in your browser
  6. Summarizes the key signals (vig hotspots, anomalies) in chat

Compatibility

EnvironmentStatus
Claude Code (CLI or VS Code extension)✅ Auto-triggers; native sub-agent flow
Cursor / Aider / Continue / Codex CLI / WorkBuddy / etc.✅ Works — point your AI at SKILL.md, it'll follow the steps. The two LLM sub-agent steps (3 + 3.5) have explicit "if you have no Agent tool, inline-execute the prompt" fallback notes.
Pure Python invocation (no AI orchestrator)✅ for data + HTML pipeline (pull_odds.py → html_writer.py); ⚠️ skip the LLM merge / financial-analysis steps unless you wire your own LLM glue
LLM with no shell / file IO (browser-only chat)❌ Won't work — fetching needs local Python execution

Smoke test (post-install)

bash scripts/smoke_test.sh

Verifies Python deps + .env + a small NBA-only fetch + HTML render in ~30 seconds, without needing the LLM agents. Use this after a fresh clone or after editing vendored code.

Quick install

See INSTALL.md for full instructions. The TL;DR:

# Manual install
git clone <REPO_URL> ~/.claude/skills/odds-pull
cd ~/.claude/skills/odds-pull
pip install -r requirements.txt
echo "ODDS_API_KEY=your_key_from_the-odds-api.com" > .env
chmod 600 .env
bash scripts/smoke_test.sh    # ← verify before first real use

Or paste the AI-assisted install prompt from INSTALL.md §2 into your AI.

Architecture

User: "帮我拉一下 NBA 这周末的 odds"
   │
   ▼
Claude (orchestrator) reads SKILL.md → 5-step recipe
   │
   ├─ Step 1 [LLM]   Parse intent → CLI args
   │                 ("这周末" → --hours-max 96)
   │
   ├─ Step 2 [Bash]  scripts/pull_odds.py
   │                 ├─ load_dotenv() — get ODDS_API_KEY
   │                 ├─ fetch_all_markets() — parallel pull
   │                 │     PM (~15s) + The Odds API (~2s) + Kalshi (~2s)
   │                 ├─ build_game_rows() — cross-platform join
   │                 ├─ Apply --min-volume-usd + --min-platforms filters
   │                 └─ Dump JSON to /tmp/odds_pull.json
   │
   ├─ Step 3 [Agent] If orphans non-empty:
   │                 Spawn general-purpose sub-agent with orphan list
   │                 → returns JSON pairs (with confidence)
   │                 → write back to JSON's llm_matches field
   │
   ├─ Step 4 [Bash]  scripts/html_writer.py
   │                 ├─ Apply LLM-merged orphans
   │                 ├─ Detect anomalies (PM-missing-Spread, line mismatch,
   │                 │   high vig, low-confidence LLM match)
   │                 ├─ Compute vig heatmap (matched-only)
   │                 └─ Render self-contained HTML → output path
   │
   └─ Step 5 [Text]  Tell user file path + 3 key anomalies + 1-line insight

Default behaviour (per design spec)

  • --sports mainstream — NBA + NFL + MLB + NHL + SOCCER (off-season leagues return empty; that's fine)
  • --hours-min 0 --hours-max 72 — 3-day window
  • --min-platforms 3 — only show games seen on ≥ 3 platforms (i.e. real cross-platform comparisons; drops single-platform long-tail markets)
  • --min-volume-usd 10000 — drop PM/Kalshi markets with < $10K lifetime volume (thin liquidity skews vig calculations)

Override via natural language:

User saysBecomes
"看看所有运动"--sports all
"包括 PM 那种小盘子"--min-platforms 1 --min-volume-usd 0
"只看 NBA 今晚"--sports nba --hours-max 12

Files

PathPurpose
SKILL.mdTrigger keywords + 5-step orchestration recipe
INSTALL.mdFull install guide (manual + AI-assisted)
README.mdThis file (architecture overview)
requirements.txt3 Python deps (aiohttp, Brotli, python-dotenv)
.envYOU create this; holds ODDS_API_KEY (not committed)
scripts/pull_odds.pyFetch + cross-platform join → JSON
scripts/html_writer.pyJSON → self-contained HTML report
lib/oddspull_vendored/Vendored core libraries (~5900 lines)

Why vendored core libraries?

The skill ships with a frozen copy of the data-layer code from the parent odds_comparison project (under lib/oddspull_vendored/). This is deliberate — it makes the skill fully self-contained:

  • Your colleague clones this repo to ~/.claude/skills/odds-pull/ and it works immediately. No need to also clone odds_comparison.
  • The vendored code carries 100+ months of bug fixes — Kalshi fee continuous formula, strike-by-volume picker, commence_time correction, sport-aware team-name disambiguation, retry-on-5xx-with-cache-skip, etc.
  • The trade-off: when the parent project fixes a new edge case (e.g. a new Kalshi API field), you'll need to re-vendor (run a sync script — TBD). But for a stable consumer, this is rare.

What's NOT in this skill

  • No Excel writer — HTML is the only output format. Open in any browser. If you want Excel, copy-paste from the HTML table or open the JSON in pandas.
  • No live web UI — the HTML is a static snapshot of the data at fetch time. For continuous monitoring, see the parent project's web/ app.
  • No Kalshi browser-mode auth — Kalshi's public REST API is enough for the data this skill needs. No Playwright dependency.
  • No PM mobile-app spread/total scraping — Polymarket's mobile sportsbook uses a third-party odds feed not exposed in their public API. Markets missing on PM but present elsewhere are flagged in the Anomalies section.

Future (Stage 2 — not yet implemented)

  • Pre-flight common-sense agent: spawned at Step 1.5; uses WebSearch to check what's in season + any major news (injuries, trades, league decisions) that could affect the games being pulled
  • Post-report financial-analysis agent: spawned at Step 4.5; reads the vig heatmap + anomalies and writes investment-style commentary into a new section of the HTML

To enable Stage 2 later, edit SKILL.md to add the two extra spawn steps. No script changes needed.

Ver o original no GitHub

Bom para

Relacionados