SKILL.md
Sports Scores Skill
"Did we win?" is a live-data question with a keyless answer: ESPN serves structured JSON scoreboards for every major league over plain HTTPS — no key, no signup. The endpoints are unofficial (publicly accessible but undocumented, and they occasionally reshape), so this skill pairs them with the discipline that makes unofficial sources usable: state the source, expect drift, and never present a stale scoreboard as live.
What This Skill Produces
- The answer — the asked team's score/result first, with game state (live Q3, final, starts 19:30 local)
- The slate — today's games for a league when that's the question
- Standings/schedule — where the endpoints serve them
- The command — exact curl, rerunnable, with the unofficial caveat
Required Inputs
Ask for these if not provided:
- Team or league — resolve nicknames ("the Niners" → San Francisco 49ers, NFL); ambiguous city names ("New York") get asked
- Which game — today's default; "did they win" on an off-day means the most recent game — say which game is being answered
- Time zone — game times convert to the user's local
Framework: The Endpoint Map and the Discipline
- Scoreboards:
curl -s "https://site.api.espn.com/apis/site/v2/sports/{sport}/{league}/scoreboard"— pairs:football/nfl,basketball/nba,baseball/mlb,hockey/nhl,basketball/wnba,football/college-football,soccer/eng.1(Premier League; other comps:esp.1,ita.1,ger.1,uefa.champions,usa.1). Add?dates=YYYYMMDDfor a specific day. Each event:competitions[0].competitors[](team.displayName,score,homeAway),status.type(state: pre/in/post, : "Final", "End of 3rd").
