/sports-analytics-core:prediction-trackerfrom SportsDataHQ: analytics core
Logs and scores sports prediction models by recording forecasts before events and grading them after. Tracks Brier score, log loss, calibration, and closing-line comparison with sample sizes and intervals.
Ships in SportsDataHQ: analytics core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The honesty loop for a model: record what it predicted before the event, grade it after, and report how good it is with the uncertainty attached. This tracks predictions, not wagers. It has no money columns of any kind.
| Need | Tool |
|---|---|
Final results (hockey get_games, football get_games, basketball list_games, soccer list_games, tennis get_matches, golf get_leaderboard, UFC get_event) | the sport's results tool |
| Closing fair probability across books | get_game_probabilities (or get_odds and the margin removal in market-vs-model) |
| Open to close movement | get_line_movement |
Logging and metrics use a local CSV or SQLite file. There is no hosted prediction log; do not invent tools such as log_prediction or get_clv.
CSV for under 200 rows, SQLite beyond that.
date,event_id,sport,market,outcome,model_prob,model_version,open_fair_prob,close_fair_prob,result,brier,log_loss,notes
model_prob: probability for the stated outcome, 0 to 1, recorded before the eventmodel_version: so results are not mixed across retrainsopen_fair_prob, close_fair_prob: market fair probability for the same outcome (margin removed)result: 1 if the outcome happened, 0 if not, blank while openbrier: (model_prob - result)^2; log_loss: -ln(p) if result is 1, -ln(1-p) if 0Write the row with result blank before the event starts. Logging afterwards biases the record.
Pull outcomes with the sport's results tool, match by event id or teams and date, and fill result, brier, log_loss. Push or void events are excluded and counted separately.
After close, fill close_fair_prob from get_game_probabilities (or compute it). Compute the market's own Brier score and log loss for the same events.
skill = market_brier - model_brier # positive: model scored better than the closing market
moved_toward = abs(close - model_prob) < abs(open - model_prob)
Report the share of events where the market moved toward the model between open and close. Both are measures of model quality. Matching the closing market is a good result.
import numpy as np
n = len(resolved)
brier = resolved.brier.mean()
logloss = resolved.log_loss.mean()
accuracy = ((resolved.model_prob > 0.5) == resolved.result.astype(bool)).mean()
Add a calibration table: bin model_prob (for example 0.1 wide), show mean predicted, observed frequency and count per bin (see probability-calibration). Report a bootstrap or normal interval for Brier and log loss. Break results out per season and per model_version.
Compute rolling 50-event Brier and the closing market's rolling Brier. Flag drift when the model's rolling Brier is worse than its own full-history Brier by more than the interval, or worse than the market's for 3 consecutive windows. A flag means audit the data and features (backtesting, probability-calibration), not that something must be done to any wager.
For a Brier difference between model and market, report the paired difference with its interval. If the interval includes zero, say the data cannot tell them apart yet. As a guide, expect to need several hundred events to separate small differences, and report the actual interval rather than the guide. Do not call the model good from fewer than about 100 resolved events.
| Rationalization | Why it is wrong | Do this instead |
|---|---|---|
| "I'll log them later" | Memory favors the hits | Log before the event |
| "Accuracy is 58%, so it works" | Accuracy ignores probabilities and sample size | Report Brier, log loss, n and interval |
| "It backtested well" | Backtests overfit | Live record and closing-line comparison come first |
| "Mixing versions is fine" | It hides drift | Keep model_version and report per version |
| "Drop the bad week" | Selective reporting | Report all resolved events |
PREDICTION TRACKER: updated [date] (season convention: [..])
Predictions: N total | open X | resolved Y
Brier: 0.xxx (95% interval 0.xxx to 0.xxx) Market closing Brier: 0.xxx
Log loss: 0.xxx Accuracy: xx.x% (n = Y)
Model moved-toward-by-close share: xx% (n = Y)
By season: [table] By model_version: [table]
Calibration: [bin table]
Status: [IN LINE WITH MARKET / BEHIND MARKET / NOT ENOUGH DATA]
| Finding | Skill |
|---|---|
| Behind market for several windows | backtesting |
| Calibration bins off | probability-calibration |
| Need to retrain | model-building |
| Want a chart of rolling Brier or calibration | visualization |
| Compare with the market's probability | market-vs-model |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub sports-data-hq/birdieapi-mcp --plugin sports-analytics-core10 skills in this plugin
/backtestingUse when the user asks whether a sports model or system would have worked in the past, for any sport, in plain wording: 'does my model actually work', 'test it on the last three seasons', 'did it beat the closing line', 'is it still as accurate as it used to be', 'what is the confidence interval on my hit rate', 'how would this have done in 2023', 'run it against past odds', 'is this edge real or luck', 'how should I split seasons to test it'. Use this whenever historical performance, fold design, sample size or an interval is the question. Load this skill first, before calling any data tool; it says which tools to call. Walk-forward only; refuses k-fold and in-sample testing; reports sample size, an interval and a per-season breakdown. Not for logging live predictions as games finish (see prediction-tracker), tonight's gap to the market (see market-vs-model) or training (see model-building)./data-pipelineUse when the user wants anything sports-related to run on its own or keeps getting numbers that do not line up: 'run my model every morning', 'schedule a script to grab results daily', 'GitHub Action to refresh my ratings', 'automate the whole thing', 'email me when the model gets worse', 'where do I store predictions', 'I joined two tables and lost rows', 'duplicate rows in my data', 'does this date belong to last season'. Load this skill first, before calling any data tool; it says which tools to call. Covers cron jobs and GitHub Actions, storage, model versioning, retraining and drift alerts, plus the data checks other skills point to (ids, season convention per sport, one league, duplicates, sample-size floors). Not for one-off lookups (call your sport's tools directly), building the model (use model-building), historical testing (use backtesting) or grading logged predictions (use prediction-tracker)./elo-engineeringUse when the user asks to build Elo ratings, rate teams or players, tune K-factor or home advantage, carry ratings across seasons, add margin-of-victory, or mentions Fading, Form or Component Elo. Works for team sports and for tennis, golf, UFC and cricket player or fighter ratings. Load this skill first, before calling any data tool, for short fragments and follow-ups too; it says which tools to call. Not for general feature construction (use feature-engineering), not for a full model (use model-building), not for plain team stats (call get_standings or get_team_stats for hockey, or your sport's stats tools), not for season simulation (use nhl-playoff-simulation)./feature-engineeringUse when the user asks to prepare data for a model, build rolling averages or recent-form features, add rest days or back-to-back flags, adjust for strength of schedule, build starter or goalkeeper quality features, use Elo as an input, or check features for leakage. Enforces shift(1) before any rolling calculation. Load this skill first, before calling any data tool, for short fragments and follow-ups too; it says which tools to call. Not for looking up raw stats (call get_games, get_standings or get_team_stats), not for explaining hockey metrics (use nhl-advanced-stats), not for expected goals features (use nhl-xg-model), not for training (use model-building)./market-vs-modelUse when the user puts a model's or their own number next to the betting market, or asks what a price means as a probability, for any sport, in plain wording: 'our number vs the market tonight', 'is the market higher on them than my numbers', 'fair price vs our price', 'do my ratings beat the close', 'are we off the market on favorites', 'what does +250 mean as a chance', 'take the juice out of -300/+250', 'how big a gap is real'. Use this whenever a model probability meets a market probability, or odds need converting or the margin removed. Load this skill first, before calling any data tool; it says which tools to call. Covers odds conversion, margin removal, the model vs no-margin gap and the sample needed before a gap means anything. Odds are information only: no stakes, no picks. Not for today's prices alone (see your sport's odds skill), testing on past seasons (see backtesting) or logging live predictions (see prediction-tracker)./model-buildingUse when the user wants to build or choose a model that predicts sports outcomes, for any sport, in plain wording: 'predict who wins', 'which algorithm should I use', 'logistic regression or XGBoost', 'tune my model', 'train a classifier on fights', 'which features matter', 'can I blend two models', 'random forest for the NHL', 'my model is stuck at 55 percent'. Use this whenever a game or match prediction model is being built, picked or improved. Load this skill first, before calling any data tool, for short fragments and follow-ups too; it says which tools to call. Always walk-forward; refuses k-fold. Not for building input features (see feature-engineering), checking probabilities (see probability-calibration), hockey shot models (see nhl-xg-model) or market comparison (see market-vs-model).9 plugins ship this exact skill · first indexed Dec 3, 2026
Showing 6 of 9 plugins, one per repository first