Agent skill · data analytics · machina-sports

mlb-data

MLB data via ESPN public endpoints and the official MLB Stats API — scores, standings, rosters, schedules, game summaries, injuries, leaders, and news, plus an analytics backend: pitch-level velocity/spin/exit-velocity, career splits by stat group, league leaders, and schedules to 1901. Zero config, no API keys. Use when: user asks about MLB scores, standings, team rosters, schedules, game stats, box scores, play-by-play, injuries, transactions, depth charts, team/player statistics, MLB news, pitch speeds/spin/exit velocity, career stats, league leaders, or historical MLB seasons. Don't use when: user asks about minor league baseball, college baseball, or international baseball. For other sports use: nfl-data (NFL), nba-data (NBA), wnba-data (WNBA), nhl-data (NHL), football-data (soccer), tennis-data (tennis), golf-data (golf), cricket-data (cricket), cfb-data (college football), cbb-data (college basketball), fastf1 (F1). For betting odds use polymarket or kalshi. For news use sports-news.

Why this skill is useful

Provides specific commands and data structures for accessing MLB statistics and analytics that the AI wouldn't reliably generate on its own.

What it needs

Requires sports-skills installed locally. About 5k tokens when loaded. Last updated 2026-08-06. 201 stars on the source repository.

What this skill does

MLB Data Before writing queries, consult references/api-reference.md for endpoints, ID conventions, and data shapes. Setup Before first use, check if the CLI is available: If pip install fails with a Python version error, the package requires Python 3.10+. Find a compatible Python: No API keys required. Quick Start Prefer the CLI — it avoids Python import path issues: CRITICAL: Before Any Query CRITICAL: Before calling any data endpoint, verify: Season year is derived from the system prompt's currentDate — never hardcoded. If only a team name is provided, call getteams to resolve the team ID before using team-specific commands. Choosing the Season Derive the active season from the system prompt's date — not just the calendar year. If the user specifies a season, use it as-is. If the user says "current", "this season", or doesn't specify: The MLB season runs late March/April through October. If the current month is January–March, the last completed season was the prior calendar year. From April onward, use the current calendar year. Commands Command Description --- --- getscoreboard Live/recent MLB scores getstandings Standings by league and division getteams All 30 MLB teams getteamroster Full roster for a team getteamschedule Schedule for a specific team getgamesummary Detailed box score and scoring plays getleaders MLB statistical leaders getnews MLB news articles getplaybyplay Full play-by-play for a game getwinprobability Win probability chart data getschedule Schedule for a specific date or season getinjuries Injury reports across all teams gettransactions Recent transactions getdepthchart Depth chart for a team getteamstats Team statistical profile getplayerstats Player statistical profile findmlbplayer Search MLB's player registry by name getmlbstatsschedule Games via the MLB Stats API — history to 1901, carries gamePk ids getmlbstatsplayerstats Season/career/year-by-year splits by stat group via MLB Stats API getmlbstatsplaybyplay Pitch-level PBP — velocity, …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills machina-sports/mlb-data

View the source on GitHub

Browse the @skills marketplace