sports-scores

GitHub

通过ESPN公开接口获取NFL、NBA等主流联赛的实时比分、赛程和积分榜。支持昵称解析,强调数据来源非官方及状态同步,提供可复现的curl命令。

exports/openclaw/sports-scores/SKILL.md mohitagw15856/pm-claude-skills

触发场景

询问比赛结果或比分 查询今日赛程 查看球队排名 确认某队是否获胜

安装

npx skills add mohitagw15856/pm-claude-skills --skill sports-scores -g -y
更多选项

非标准路径

npx skills add https://github.com/mohitagw15856/pm-claude-skills/tree/main/exports/openclaw/sports-scores -g -y

不安装直接使用

npx skills use mohitagw15856/pm-claude-skills@sports-scores

指定 Agent (Claude Code)

npx skills add mohitagw15856/pm-claude-skills --skill sports-scores -a claude-code -g -y

安装 repo 全部 skill

npx skills add mohitagw15856/pm-claude-skills --all -g -y

预览 repo 内 skill

npx skills add mohitagw15856/pm-claude-skills --list

SKILL.md

Frontmatter
{
    "name": "sports-scores",
    "homepage": "https:\/\/mohitagw15856.github.io\/pm-claude-skills\/skill\/sports-scores.html",
    "metadata": {
        "openclaw": {
            "emoji": "🧠"
        }
    },
    "description": "Get live scores, schedules, and standings for major leagues with zero API keys — ESPN's public JSON endpoints via curl, covering NFL, NBA, MLB, NHL, and world football. Use when asked what's the score, did my team win, today's games, or league standings right now. Produces the scores with game state (live\/final\/scheduled), the asked-team answer first, and the rerunnable command — with the unofficial-API caveat stated."
}

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

  1. 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=YYYYMMDD for a specific day. Each event: competitions[0].competitors[] (team.displayName, score, homeAway), status.type (state: pre/in/post, detail: "Final", "End of 3rd").
  2. Teams and standings: .../{sport}/{league}/teams for the id map · .../{sport}/{league}/standings where available · a team's schedule: .../teams/{id}/schedule.
  3. State is part of the score: "Lakers 98–95" means opposite things live-in-Q4 vs. final — the state string accompanies every score, and live answers carry their fetch time ("as of 21:42 — game in progress").
  4. The nickname resolution step: fetch the teams list once when unsure rather than guessing which "Rangers" (NHL? MLB? Scottish football?) — the wrong-team answer is this domain's cardinal sin.
  5. The unofficial-source honesty: these endpoints are publicly served but undocumented — they can reshape or vanish without notice. Say "via ESPN's public feed" in the answer; on a failed or weird response, report that rather than improvising a score. Never answer scores from memory — training-data scores are, by definition, old games.

Output Format

[Team/League]: [the game]

[The direct answer: "49ers won 27–20 (final, last night)" or "Down 95–98, 4:12 left in the 4th — as of 21:42."]

Matchup Score State Time (local)
[The slate, when a league day was asked]

Source: ESPN public feed (unofficial) · as of [fetch time] · rerun: [exact curl]

Quality Checks

  • The asked team's result leads; the slate follows
  • Every score carries its game state, and live scores their fetch time
  • Nicknames/cities resolved to the right team, asked about when ambiguous
  • Game times converted to the user's zone
  • The unofficial-source line appears

Anti-Patterns

  • Do not answer scores from memory — every remembered score is an old score
  • Do not present a live score without its clock state and fetch time
  • Do not guess between same-name teams — resolve or ask
  • Do not improvise when the endpoint reshapes — report and hand over the command
  • Do not editorialize outcomes ("embarrassing loss") — the user's team just lost; read the room, give the facts

版本历史

  • 54fad50 当前 2026-07-19 12:34

同 Skill 集合

exports/openclaw/360-feedback-template/SKILL.md
exports/openclaw/401k-plan-decoder/SKILL.md
exports/openclaw/ab-test-planner/SKILL.md
exports/openclaw/ab-test-readout/SKILL.md
exports/openclaw/accessibility-audit/SKILL.md
exports/openclaw/account-plan/SKILL.md
exports/openclaw/acquirer-red-team/SKILL.md
exports/openclaw/ad-copy/SKILL.md
exports/openclaw/aeo-optimizer/SKILL.md
exports/openclaw/agenda-or-cancel/SKILL.md
exports/openclaw/agent-design-review/SKILL.md
exports/openclaw/agent-hiring-panel/SKILL.md
exports/openclaw/agent-observability-spec/SKILL.md
exports/openclaw/agent-severance/SKILL.md
exports/openclaw/agent-spec/SKILL.md
exports/openclaw/agm-in-a-box/SKILL.md
exports/openclaw/ai-ethics-review/SKILL.md
exports/openclaw/ai-eval-plan/SKILL.md
exports/openclaw/ai-feature-prd/SKILL.md
exports/openclaw/ai-product-canvas/SKILL.md
exports/openclaw/air-quality/SKILL.md
exports/openclaw/altitude-shifter/SKILL.md
exports/openclaw/ambiguity-resolver/SKILL.md
exports/openclaw/analyst-relations-brief/SKILL.md
exports/openclaw/announcement-card/SKILL.md
exports/openclaw/api-docs-writer/SKILL.md
exports/openclaw/api-test-plan/SKILL.md
exports/openclaw/api-versioning-strategy/SKILL.md
exports/openclaw/apology-letter/SKILL.md
exports/openclaw/architecture-decision-record/SKILL.md
exports/openclaw/architecture-diagram/SKILL.md
exports/openclaw/archive-strategy/SKILL.md
exports/openclaw/assumption-bounty/SKILL.md
exports/openclaw/assumption-mapper/SKILL.md
exports/openclaw/async-update-format/SKILL.md
exports/openclaw/auto-repair-estimate-decoder/SKILL.md
exports/openclaw/autopilot-charter/SKILL.md
exports/openclaw/awkward-message-helper/SKILL.md
exports/openclaw/behavior-intervention-plan/SKILL.md
exports/openclaw/benefits-decoder/SKILL.md
exports/openclaw/bennett-time-audit/SKILL.md
exports/openclaw/bid-tender-review/SKILL.md
exports/openclaw/board-deck-narrative/SKILL.md
exports/openclaw/board-game-designer/SKILL.md
exports/openclaw/board-game-night-planner/SKILL.md
exports/openclaw/board-minutes/SKILL.md
exports/openclaw/board-pre-read/SKILL.md
exports/openclaw/body-double-session/SKILL.md
exports/openclaw/bom-cost-review/SKILL.md
exports/openclaw/bookkeeping-categorization/SKILL.md

元信息

文件数
0
版本
a462f61
Hash
a96868fc
收录时间
2026-07-19 12:34

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-14 07:25
浙ICP备14020137号-1 $访客地图$