Ratings Strength Models logo

Ratings Strength Models

Community
WalrusQuant
ratings-strength-models

Build and evaluate sports strength models, including sequential Elo ratings, offense/defense splits, power ratings, and strict pre-event matchup features. Use for rankings, opponent adjustment, and strong prediction baselines.

Overview

PublisherWalrusQuant
Repositorysports-analytic-skills
Skill nameratings-strength-models
Stars
53
Forks
4
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by WalrusQuant on GitHub. Read the source before you install it.

Installation

Install the Ratings Strength Models AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/WalrusQuant/sports-analytic-skills/tree/main/skills/ratings-strength-models
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/WalrusQuant/sports-analytic-skills.git /tmp/sports-analytic-skills
mkdir -p .claude/skills
cp -r /tmp/sports-analytic-skills/skills/ratings-strength-models .claude/skills/ratings-strength-models
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ratings Strength Models in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ratings Strength Models on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ratings Strength Models is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Ratings & Strength Models (Sports)

Overview

Estimate latent team (or player) strength from past results, then use those ratings only as they existed before game T.

Ratings are often the strongest simple sports baselines and strong features for logistic/ML models. The non-negotiable rule: as-of only.

Bundled standalone path:

  • standalone sequential rating construction
  • held-out evaluation against simple baselines

When to Use This Skill

Use when:

  • Team power ratings / rankings over a season
  • Matchup priors for win or margin models
  • Opponent adjustment
  • Strong baselines before feature-heavy ML
  • User says “Elo,” “power ratings,” or “team strength”
  • NFL/NBA/MLB Elo baselines

Do not use as a substitute for:

NeedGo to
Raw form windows onlytime-series-sports / feature-rules
Full ML horse racepredictive-modeling
Validation designvalidation-design
Season win distributions from ratingssimulation-sports

Installation

The standalone Elo builder and evaluator require pandas:

bash
python -m pip install pandas

Parquet input also needs pyarrow or fastparquet.


Workflow

  1. Choose the result signal (win, margin, goal diff, points ratio, EPA, runs).
  2. Choose update style (sequential Elo-like vs batch season-to-date).
  3. Fit/update using only past games.
  4. Export an as-of rating for each team before each game.
  5. Predict matchups from rating differentials (+ home).
  6. Evaluate with season walk-forward (validation-design).
  7. Compare to constant / home / form baselines (baseline-models).
  8. Report params, as-of rule, metrics, limits.
  9. Optional: feed into simulation-sports.

Model Families

FamilyBest forNotes
Elo / Glicko-stylesequential win strengtheasy as-of; margin optional
Offense/defense splitscore modelsattack vs defense ratings
Least-squares power ratingsseason-to-date marginssolve system each week
Hierarchical strengthplayers with uneven npartial pooling
Possession modelspace sportssport-specific later

Start with Elo-like or margin power ratings before exotic variants.

The bundled scripts implement only the sequential Elo row builder and its score table. Glicko, offense/defense, least-squares, hierarchical, margin, and possession models are methodology in this skill and require separate code.

Read rating_families.md when choosing Elo, power ratings, or an offense/defense model. Read parameters.md before setting update, home-advantage, carryover, or margin rules. Read evaluation.md before designing forward scoring and baseline comparisons.


Standalone Elo Builder and Evaluator

The builder reads a user-owned CSV, Parquet, JSON, JSONL, or NDJSON table with one row per completed game. Defaults require season, game_date, unique game_id, home_team, away_team, home_score, and away_score; all names are configurable.

bash
python /path/to/ratings-strength-models/scripts/elo_asof.py \
  --input games.csv --out elo_asof.csv --k 20 --home-adv 65

python /path/to/ratings-strength-models/scripts/eval_elo_baseline.py \
  --input elo_asof.csv

The builder saves both teams' pre-event ratings before updating either one. Its two-row-per-game output includes team, opponent, is_home, elo_pre, raw rating_diff, home-adjusted elo_diff, win_probability, and actual. Ties receive 0.5.

The order field must strictly order each team's events. If calendar dates can tie, use kickoff timestamps or a verified event sequence. The evaluator scores home rows once per game and reports season-level Elo log loss, Brier score, accuracy, a fixed 0.5 reference, and—after the first season—a home-win-rate reference estimated only from prior seasons. Pass a matched legal baseline with --baseline-prob-col to score it on the same rows. This is a score table for already-built as-of probabilities, not a full walk-forward parameter-tuning pipeline.


Design Choices

K factor

  • Higher K: reacts faster, noisier
  • Lower K: stabler, slower to adapt
  • NFL/NBA starting point: K ≈ 20 on 1500-scale Elo
  • Long-season competitions often justify a lower starting K

Home advantage

  • Add home_adv to home team pre-game Elo when computing expected score
  • Start fixed; estimate later from data if needed

Margin

  • Optional multiplier on K using point differential
  • Diminishing returns (log/sqrt) to avoid blowout domination

Mean reversion / season regression

  • Regress ratings toward mean between seasons for multi-year series
  • Important for long panels and roster turnover

Initialization

  • Common: all teams 1500
  • Report init explicitly

Other Families (patterns)

Least-squares power ratings (season-to-date)

Each week, solve team strengths from margins-to-date; store as-of ratings before each game. Recompute weekly — never use end-of-season solution for early weeks.

Offense/defense split

Each team has attack and defense parameters; predict score lines, not only winners. Still as-of only.

Hierarchical player strength

Partial pooling when player n is uneven (statistical-modeling mixed models / Bayesian refs).


Evaluation

Primary

  • walk-forward log-loss / Brier for win probability from rating diff
  • MAE for predicted margin if modeling spreads

Always compare to in the full methodology

  • constant baseline
  • home-only model
  • form logistic baseline when available

The bundled evaluator implements the 0.5 and prior-season home-rate references plus an optional supplied probability baseline. Constructing home-only logistic, form, or alternative-rating predictions requires baseline-models or another fold-local workflow before calling the evaluator.

Success

  • beats constant on most folds
  • preferably competitive with form logistic

Hard Constraints

  1. As-of only — never use post-game rating to predict that game.
  2. Update order must follow real chronology.
  3. Do not fit K on the final test season repeatedly without nested validation.
  4. Report initialization and scale (e.g. mean 1500).
  5. Do not treat ratings as causal player quality without more structure.
  6. Every rating claim must name sport, seasons, event ordering, and parameters.

Anti-Patterns

  • Final rating applied backward to early games
  • Huge K chasing noise
  • Ignoring home advantage
  • Mixing playoffs and regular season without a flag
  • Claiming ranking quality without forward prediction metrics
  • Using form and Elo interchangeably without a bakeoff

Reporting Template

text
Rating model: Elo
Sport:
Signal: win (margin multiplier: …)
Params: K=…, home_adv=…, init=1500
As-of rule: pre-game rating before update
Validation: season walk-forward
Metrics vs constant / home / form logistic: …
Calibration:
Limits: no roster continuity, no injuries, …
Reproduce: python /path/to/ratings-strength-models/scripts/elo_asof.py --input …

Output Contract

Done means:

  • As-of rule stated
  • Params stated
  • Walk-forward metrics vs baselines present
  • Limits stated
  • Repro command present

Worked Examples

bash
python /path/to/ratings-strength-models/scripts/elo_asof.py \
  --input games.csv --out elo_asof.csv --k 20 --home-adv 65

python /path/to/ratings-strength-models/scripts/eval_elo_baseline.py \
  --input elo_asof.csv

For season simulation, pass a documented pre-event probability artifact to simulation-sports; do not treat final ratings as if they existed before earlier games.


Bundled Resources

references/

FileContents
rating_families.mdfamily overview
parameters.mdK, home_adv, margin, regression
evaluation.mdhow to score ratings

scripts/

FileContents
elo_asof.pybuild pre-game Elo table
eval_elo_baseline.pyscore pre-event Elo probabilities against 0.5, prior-season home rate, and an optional supplied baseline

Related Skills

NeedSkill
Baselinesbaseline-models
Featuresfeature-rules
Form windowstime-series-sports
Predictive MLpredictive-modeling
Validationvalidation-design
Simulation from ratingssimulation-sports

Quick Command Card

bash
python /path/to/ratings-strength-models/scripts/elo_asof.py \
  --input games.csv --out elo_asof.csv --k 20 --home-adv 65

python /path/to/ratings-strength-models/scripts/eval_elo_baseline.py \
  --input elo_asof.csv

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ratings Strength Models AI skill do?

Build and evaluate sports strength models, including sequential Elo ratings, offense/defense splits, power ratings, and strict pre-event matchup features. Use for rankings, opponent adjustment, and strong prediction baselines.

Why use Ratings Strength Models on TypingMind?

Because you install it once and use it with any model. Ratings Strength Models is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ratings Strength Models in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/WalrusQuant/sports-analytic-skills/tree/main/skills/ratings-strength-models. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ratings Strength Models?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ratings Strength Models?

As many as you like. As long as a model supports skills, you can use Ratings Strength Models with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ratings Strength Models AI skill free?

Yes. It is published on GitHub by WalrusQuant under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇