/sports-analytics-core:elo-engineeringfrom SportsDataHQ: analytics core
Builds, tunes, and exports multi-variant Elo rating systems for team sports and individual sports (tennis, golf, UFC, cricket). Handles K-factor, home advantage, season carryover, margin-of-victory, and form tracking.
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.
You are an expert in Elo rating construction. The goal is to build, tune and export multi-variant Elo systems that serve as model features or as standalone win-probability estimates.
Call your sport's SportsDataHQ MCP tools for historical results: get_games or list_games (hockey, football, basketball, baseball, soccer), get_matches (tennis), get_event and get_fighter_fights (UFC), get_leaderboard (golf), get_schedule where a server has no games list. Several servers also expose their own ratings (get_ratings); those are the server's published ratings, useful as a cross-check against your own build, not a substitute for it.
Own data: required columns are game_id, date, home_team, away_team, home_score, away_score. Sort ascending by date. Flag games with missing scores; do not silently drop.
feature-engineeringget_standings or get_team_stats (hockey) or your sport's stats toolsmodel-buildingnhl-playoff-simulation (hockey)Before building, establish:
parameter-reference.md)The baseline. Ratings update after every game based on expected vs actual outcome.
expected_home = 1 / (1 + 10^((away_elo - home_elo - HFA) / 400))
new_home_elo = home_elo + K * MOV_multiplier * (actual - expected_home)
new_away_elo = away_elo + K * MOV_multiplier * ((1 - actual) - (1 - expected_home))
actual = 1 (home win), 0 (away win), 0.5 (tie/OT loss handled by sport)HFA = home field advantage in Elo points (hockey default: 35; see parameter-reference.md for other sports)Recent performance weighted more heavily via exponential decay. Useful when teams change significantly mid-season (trades, injuries).
weight = exp(-decay_rate * days_since_game)
weighted_K = K * weight
Short-term momentum. Only the last N games (default N=5, test N=7 and N=10) contribute to the rating. Ratings reset to a baseline each calculation.
Process:
Separate offense and defense ratings per team. Offensive rating updates based on goals scored vs expected; defensive rating updates based on goals allowed vs expected.
expected_goals_for = f(home_off_elo, away_def_elo, HFA_goals)
off_update = K_component * (actual_goals_for - expected_goals_for)
def_update = K_component * (actual_goals_against - expected_goals_against)
Standard Elo with fixed K-factor: no margin-of-victory adjustment, no adaptation. Simpler and sometimes competitive when training data is limited.
new_elo = elo + K_flat * (actual - expected)
Apply to Standard, Fading, and Component variants. Prevents a blowout from moving ratings far more than a narrow win when the true gap is already large.
MOV_multiplier = ln(abs(score_diff) + 1) * (2.2 / (win_elo_diff * 0.001 + 2.2))
score_diff = absolute goal/point differencewin_elo_diff = winner's Elo - loser's Elo before the gameGrid search to minimize log loss on held-out historical data.
Parameters to tune (Standard Elo):
Process:
See parameter-reference.md for published starting points by sport.
At the start of each new season, blend each team's end-of-season rating toward 1500 (league mean). This accounts for roster turnover and regression to the mean.
new_season_elo = carryover * end_elo + (1 - carryover) * 1500
parameter-reference.md for other sports)Expansion teams: Initialize at 1380-1400 (below mean) to reflect unknown quality.
| Rationalization | Why It's Wrong | Do This Instead |
|---|---|---|
| "Initialize all teams at 1000 for simplicity" | Scale doesn't matter, but 1500 is conventional and matches published benchmarks you'll want to compare against | Use 1500. Deviation gains nothing. |
| "Use the same K for all sports" | Sports differ in games per season and score variance. K must reflect both. | Use sport-specific defaults in parameter-reference.md. Tune from there. |
| "Skip MOV adjustment to keep it simple" | Without MOV, a 6-1 blowout and a 2-1 win shift ratings identically. Signal is lost. | Implement the logarithmic MOV multiplier. It's 3 lines of code. |
| "One Elo variant is enough" | Each variant captures different signal; Standard and Form are often the two most useful. | Build all 5. Use feature selection to prune later if needed. |
| "Don't regress ratings between seasons" | Last season's best team is not the same team this season. Over-confident carry-forward pollutes predictions. | Apply carryover. Hockey uses 0.88 (12% regression); sports with more roster churn regress more. |
| "Use end-of-season ratings for next season's opening day" | Without regression, teams that had lucky seasons stay overrated. | Apply carryover formula on day 1 of the new season. |
For each variant, produce a ratings table:
team | elo_standard | elo_fading | elo_form | elo_off | elo_def | elo_flat | as_of_date
-------------|-------------|------------|----------|---------|---------|----------|----------
Team A| 1487.3 | 1491.2 | 1502.1 | 1495.6 | 1478.9 | 1489.1 | 2026-05-01
Team B | 1534.8 | 1529.4 | 1518.7 | 1541.2 | 1528.3 | 1532.0 | 2026-05-01
For model features: output as one row per game with home/away ratings as of game date.
| What You Found | Next Action | Skill |
|---|---|---|
| Elo variants built, ready to add to model | Combine with other features | feature-engineering |
| Ratings built, want a full model | Train on Elo + other features | model-building |
| Model trained, need to verify calibration | Check probability output quality | probability-calibration |
| Want to simulate playoff bracket | Use Elo to seed simulations | nhl-playoff-simulation |
| Elo accuracy unclear | Backtest against the market's no-margin probabilities | backtesting |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
10 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)./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)./prediction-trackerUse when the user keeps, or wants to keep, a running record of a model's forecasts and score it as games finish, for any sport, in plain wording: 'save tonight's win chances', 'log my picks' probabilities', 'how has the model done since I started tracking', 'grade yesterday's forecasts', 'Brier on my last 150 predictions', 'is my model getting worse lately', 'running log of my numbers vs the closing price', 'accurate this month'. Use this whenever predictions were (or will be) written down before games and graded after, even for a short window. Load it for short fragments and follow-ups too, instead of answering from memory or going straight to the raw tools. Logs probability, outcome, Brier score, log loss, calibration and closing-line comparison with sample sizes and intervals. Not for placing or sizing wagers (never done), testing on past seasons the model never logged (see backtesting), fixing calibration (see probability-calibration) or retraining (see model-building).npx claudepluginhub sports-data-hq/strikerapi-mcp --plugin sports-analytics-core9 plugins ship this exact skill · first indexed Dec 3, 2026
Showing 6 of 9 plugins, one per repository first