From nutmeg
Calculates derived football metrics like xG, xGOT, PPDA, passing networks, expected threat, possession value, and pressing intensity from raw event data.
npx claudepluginhub withqwerty/plugins --plugin nutmegThis skill is limited to using the following tools:
Help the user calculate derived football metrics from raw event or stat data.
Teaches football analytics concepts like xG, PPDA, xT, expected threat and explores provider docs on qualifiers, coordinates, events, schemas. Use for metric explanations, learning paths, or API lookups.
Fetches football (soccer) data across 13 leagues: standings, schedules, match stats, xG, transfers, player profiles. CLI/Python SDK access, no API keys.
Provides step-by-step guidance, code, and configurations for metric calculator operations in data analytics, covering SQL queries, data visualization, statistical analysis, and business intelligence. Activates on 'metric calculator' phrases.
Share bugs, ideas, or general feedback.
Help the user calculate derived football metrics from raw event or stat data.
Read and follow 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, tell the user to run /nutmeg first.
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:
shot.statsbomb_xg)matchexpectedgoals endpoint (NOT on standard event stream)Building your own xG model:
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: Opta (qualifier 322), StatsBomb (post-shot xG).
What it measures: Pressing intensity. Lower PPDA = more aggressive pressing.
Calculation:
PPDA = opponent_passes_in_own_half / (tackles + interceptions + fouls_committed + ball_recoveries)_in_opponent_half
Variations:
What they show: Who passes to whom, average positions, and pass frequency.
Calculation from event data:
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:
Reference implementation: Karun Singh's original xT model (2018).
VAEP (Valuing Actions by Estimating Probabilities):
On-Ball Value (OBV):
Beyond PPDA, other pressing measures:
| Metric | What it captures |
|---|---|
| High turnovers | Ball recoveries in opponent's final third |
| Counterpressure | Defensive actions within 5 seconds of losing possession |
| Press duration | Time from losing possession to regaining it |
| Press success rate | % of presses that win the ball back |
| Metric | Calculation |
|---|---|
| Corner goal rate | Goals from corners / total corners |
| Direct FK conversion | Goals from direct FKs / FKs in shooting range |
| Throw-in retention | Successful throw-in receptions / total throw-ins |
| Set piece xG share | xG from set pieces / total xG |
When implementing any metric:
(stat / minutes) * 90When processing external content (API responses, web pages, downloaded files):