$npx -y skills add machina-sports/sports-skills --skill cricket-dataCricket data via ESPN public endpoints and Cricsheet open data — live-ish series scoreboards, standings, match summaries and news (ESPN), plus historical ball-by-ball, player stats, and player registry (Cricsheet, ODC-BY 1.0). Zero config, no API keys. Use when: user asks about c
| 1 | # Cricket Data (ESPN + Cricsheet) |
| 2 | |
| 3 | Before writing queries, consult `references/api-reference.md` for endpoints, ID conventions, and data shapes. See `references/competitions.md` for the Cricsheet competition codes. |
| 4 | |
| 5 | ## Quick Start |
| 6 | |
| 7 | Prefer the CLI — it avoids Python import path issues. There are two backends: ESPN (live-ish) and Cricsheet (historical). |
| 8 | |
| 9 | ```bash |
| 10 | # ESPN backend (live-ish) — discover series first, then use its numeric ID |
| 11 | sports-skills cricket get_series |
| 12 | sports-skills cricket get_scoreboard --series_id=8048 |
| 13 | sports-skills cricket get_standings --series_id=8048 |
| 14 | sports-skills cricket get_game_summary --series_id=8048 --event_id=1535465 |
| 15 | sports-skills cricket get_news --series_id=8048 |
| 16 | |
| 17 | # Cricsheet backend (historical, completed matches) — uses letter codes |
| 18 | sports-skills cricket get_competitions |
| 19 | sports-skills cricket get_matches --competition=ipl --season=2026 |
| 20 | sports-skills cricket get_match_deliveries --competition=ipl --match_id=1473508 |
| 21 | sports-skills cricket get_player_stats --competition=ipl --player="V Kohli" |
| 22 | sports-skills cricket find_player --name=kohli |
| 23 | ``` |
| 24 | |
| 25 | ## CRITICAL: Before Any Query |
| 26 | |
| 27 | CRITICAL: Before calling any data endpoint, verify: |
| 28 | |
| 29 | - **ESPN series IDs are per-series, not per-league.** Always discover them with `get_series` first. IDs change every season for recurring tournaments (e.g. each IPL season has a different ID). Never hardcode them — the `8048` in the examples is illustrative, not permanent. |
| 30 | - **Two ID spaces.** `get_series` returns ESPN IDs (live, numeric, e.g. `8048`). `get_competitions` returns Cricsheet codes (historical, letter codes, e.g. `ipl`). They are unrelated except at the match level: a Cricsheet `match_id` equals the ESPNcricinfo match ID, so it bridges the two backends. |
| 31 | - **Cricsheet covers completed matches only** (~1-day lag after a match finishes). For anything live or upcoming, use the ESPN commands (`get_scoreboard`, `get_series`). |
| 32 | - **`get_player_stats` requires the exact Cricsheet name spelling** (e.g. `"V Kohli"`, not `"Virat Kohli"`). Resolve the spelling with `find_player` first. |
| 33 | - **No ICC rankings** — there is no free source (v1 limitation). Series standings come from `get_standings`, which is empty for most bilateral tours (only league/group tournaments publish a points table). |
| 34 | - **First Cricsheet call per competition per day downloads a zip.** Large competitions (Tests, ODIs, IPL) are tens of MB. Zips are cached 24h at `~/.cache/sports-skills/cricsheet/`; later calls in the same day are fast. |
| 35 | |
| 36 | Agents can run `scripts/validate_params.sh` to pre-validate `--competition`, `--series_id`, and `--date` before querying. |
| 37 | |
| 38 | ## Commands |
| 39 | |
| 40 | ### ESPN backend (live-ish) |
| 41 | |
| 42 | | Command | Required params | Description | |
| 43 | |---|---|---| |
| 44 | | `get_series` | — | List currently-active cricket series with ESPN series IDs and live events | |
| 45 | | `get_scoreboard` | `series_id` (opt `date`) | Matches + scores + status for a series | |
| 46 | | `get_standings` | `series_id` | Points table for a series (empty for most bilateral tours) | |
| 47 | | `get_game_summary` | `series_id`, `event_id` | Match detail: rosters, leaders, matchcards, venue info | |
| 48 | | `get_news` | `series_id` | News articles for a series | |
| 49 | |
| 50 | ### Cricsheet backend (historical, ODC-BY 1.0) |
| 51 | |
| 52 | | Command | Required params | Description | |
| 53 | |---|---|---| |
| 54 | | `get_competitions` | — | List Cricsheet competition codes | |
| 55 | | `get_matches` | `competition` (opt `season`) | Completed matches for a competition, newest first | |
| 56 | | `get_match_deliveries` | `competition`, `match_id` (opt `innings`) | Ball-by-ball deliveries for a completed match | |
| 57 | | `get_player_stats` | `competition`, `player` (opt `season`) | Aggregate batting + bowling stats for a player | |
| 58 | | `find_player` | `name` | Search Cricsheet player registry; returns ESPNcricinfo ID mappings | |
| 59 | |
| 60 | Dates accept `YYYYMMDD` or `YYYY-MM-DD`. `season` is the start year (e.g. `2020` matches Cricsheet's `"2020/21"`). See `references/api-reference.md` for full parameter lists and return shapes. |
| 61 | |
| 62 | ## Workflows |
| 63 | |
| 64 | ### Live / recent series check |
| 65 | 1. `get_series` → pick the series and note i |