acquire
Get football data: fetch, scrape or download from StatsBomb, Opta, FBref, Understat, SportMonks, Wyscout, Kaggle or any source,…
Calculate derived football metrics and models. Use when the user wants to compute xG, xGOT, PPDA, passing networks, expected threat, possession value, pressing intensity, or any derived football statistic from raw data.
Claude Code
$ npx -y skills add withqwerty/nutmeg --skill compute --agent claude-code
Codex
$ npx skills add withqwerty/nutmeg --skill compute -a codex -y
Cursor
$ npx skills add withqwerty/nutmeg --skill compute -a cursor -y
Gemini CLI
$ npx skills add withqwerty/nutmeg --skill compute -a gemini-cli -y
GitHub Copilot
$ npx skills add withqwerty/nutmeg --skill compute -a github-copilot -y
OpenCode
$ npx skills add withqwerty/nutmeg --skill compute -a opencode -y
Windsurf
$ npx skills add withqwerty/nutmeg --skill compute -a windsurf -y
name: nutmeg-compute description: "Calculate derived football metrics and models. Use when the user wants to compute xG, xGOT, PPDA, passing networks, expected threat, possession value, pressing intensity, or any derived football statistic from raw data." argument-hint: "[metric to compute]" allowed-tools: ["Read", "Write", "Bash", "Glob", "Grep", "Agent", "mcp__plugin_nutmeg_football-docs__search_docs", "mcp__football-docs__search_docs", "mcp__plugin_nutmeg_football-docs__get_metric", "mcp__football-docs__get_metric", "mcp__plugin_nutmeg_football-docs__list_metrics", "mcp__football-docs__list_metrics"]
Help the user calculate derived football metrics from raw event or stat data.
Read and follow `${CLAUDE_PLUGIN_ROOT}/docs/accuracy-guardrail.md` before answering any question about provider-specific facts (IDs, endpoints, schemas, coordinates, rate limits). Always use `search_docs` — never guess from training data.
Read `.nutmeg.user.md`. If it doesn't exist, continue with sensible defaults (Python and pandas, intermediate level) and suggest running `/nutmeg` setup at the end.
Before computing a metric that has a football-docs metric card (`list_metrics` shows them: xG, npxG, xA, xG assisted, PPDA, progressive passes and carries, xT, VAEP, field tilt, pass completion), read it with `get_metric("<card>")`:
from different variants are not comparable.
**What it measures:** Probability of a shot resulting in a goal, based on shot location, type, body part, and game situation.
**If provider already has xG:** look up where it lives before writing code, with `search_docs(query="expected goals xG", provider="[provider]")`. Providers differ: some put xG on shot events, some serve it from a separate endpoint, and scraped sources can drop it. Name the doc you used.
**Building your own xG model:** 1. Gather shot data with outcomes (goal/no goal) 2. Features: distance to goal, angle, body part, shot type (open play/set piece/counter), number of defenders 3. Model: logistic regression for baseline, gradient boosting for better accuracy 4. Use as many shots as you can, from several seasons, and keep penalties out (or model them separately) 5. Validate on held-out matches or seasons with calibration plots and log-loss, and compare with a simple baseline
**Common pitfall:** xG models trained on one league may not transfer well to another. Playing styles and league quality differ.
**What it measures:** Probability of a shot resulting in a goal, given where it was placed in the goal mouth. Higher than xG for well-placed shots, 0 for off-target.
**Available from:** some providers publish it; check with `search_docs(query="xGOT post-shot xG", provider="[provider]")`.
**What it measures:** Pressing intensity. Lower PPDA = more aggressive pressing.
**Calculation (general shape):**
PPDA = opponent passes in the pressing zone / defensive actions in that zone
There is no single PPDA. Published variants differ in the pressing zone (for example the opponent's own half, or a larger share of the pitch) and in which defensive actions count, and the same match can give very different values across them.
and source.
**What they show:** Who passes to whom, average positions, and pass frequency.
**Calculation from event data:** 1. Filter to successful passes in a match 2. Group by passer-receiver pair, count completions 3. Calculate average position for each player (mean x, y of their events) 4. Weight edges by pass count 5. Only show players who started (exclude subs for clean networks)
**Key decisions:** minimum pass threshold for showing a connection (typically 3-4), whether to include GK.
**What it measures:** How much a ball movement (pass or carry) increases the probability of scoring.
**Calculation** (Karun Singh's original model, [karun.in/blog/expected-threat.html](https://karun.in/blog/expected-threat.html)): 1. Divide the pitch into a grid (the original uses 16x12, 192 zones) 2. For each zone, estimate the probability of shooting from it (s), the probability that a shot from it scores (g), and the probability of moving the ball instead (m) 3. Estimate a transition matrix T: where moves from each zone end up. The original counts successful moves only 4. Solve iteratively: xT(zone) = s × g + m × Σ T(zone → other) × xT(other) 5. xT of an action = xT(destination) - xT(origin) 6. Use enough seasons of event data that each zone has a stable estimate; sparse zones give noisy values
**Reference implementation:** socceraction (or its maintained successor, silly-kicks) implements xT; check the current API with `search_docs(query="expected threat xT", provider="socceraction")`.
**VAEP (Valuing Actions by Estimating Probabilities; Decroos et al., 2019):**
**On-Ball Value (OBV):**
A Claude Code plugin that makes Claude an expert at football data analytics. Who it's for: Anyone who works with football data — analysts, developers, journalists, researchers, hobbyists.
Get football data: fetch, scrape or download from StatsBomb, Opta, FBref, Understat, SportMonks, Wyscout, Kaggle or any source,…
Explore and interpret football data, and judge players or teams from stats: rankings, 'who is the best', 'is he a poor finisher',…
Ideas for football data visualisations: chart types and designs for match reports, player profiles, dashboards and other…
Fix broken football data scrapers and pipelines: failed requests, API errors, changed formats. Also drafts upstream issues or PRs…
Explain football analytics concepts and provider documentation: what a metric means (xG, PPDA, xT), learning paths and resources,…
Football data analytics entry point. Use for any task with football data: xG, match or player stats, scouting, shot maps,…
Use this skill to extract structured Markdown/JSON from PDFs and document images—tables with cell-level precision, formulas as…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…