nhl-data by machina-sports/sports-skills
npx skills add https://github.com/machina-sports/sports-skills --skill nhl-data在编写查询之前,请查阅 references/api-reference.md 以了解端点、ID 约定和数据格式。
首次使用前,检查 CLI 是否可用:
which sports-skills || pip install sports-skills
如果 pip install 因 Python 版本错误而失败,则该包需要 Python 3.10+。请查找兼容的 Python 版本:
python3 --version # 检查版本
# 如果版本 < 3.10,尝试:python3.12 -m pip install sports-skills
# 在 macOS 上使用 Homebrew:/opt/homebrew/bin/python3.12 -m pip install sports-skills
无需 API 密钥。
推荐使用 CLI —— 它可以避免 Python 导入路径问题:
sports-skills nhl get_scoreboard
sports-skills nhl get_standings --season=2025
sports-skills nhl get_teams
:在调用任何数据端点之前,请验证:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
currentDate 派生的 —— 切勿硬编码。get_teams 来解析球队 ID。从系统提示的日期派生当前年份(例如,currentDate: 2026-02-18 → 当前年份是 2026)。
2025。| 命令 | 描述 |
|---|---|
get_scoreboard | 实时/最近的 NHL 比分 |
get_standings | 按联盟和分区的排名 |
get_teams | 所有 NHL 球队 |
get_team_roster | 球队的完整阵容名单 |
get_team_schedule | 特定球队的赛程 |
get_game_summary | 详细的技术统计和得分过程 |
get_leaders | NHL 统计数据领先者 |
get_news | NHL 新闻文章 |
get_play_by_play | 比赛的完整文字直播 |
get_schedule | 特定日期或赛季的赛程 |
get_injuries | 所有球队的伤病报告 |
get_transactions | 最近的交易 |
get_futures | 未来/赔率市场 |
get_team_stats | 球队统计数据概况 |
get_player_stats | 球员统计数据概况 |
完整参数列表和返回格式请参阅 references/api-reference.md。
示例 1:今日比分 用户说:“今天的 NHL 比分是什么?” 操作:
get_scoreboard()
结果:所有实时和最近的 NHL 比赛,包含比分和状态。示例 2:联盟排名 用户说:“给我看看东部联盟的排名” 操作:
currentDate 派生赛季年份get_standings(season=<derived_year>)示例 3:球队阵容 用户说:“枫叶队的阵容有哪些人?” 操作:
get_team_roster(team_id="21")
结果:枫叶队的完整阵容名单,包含姓名、位置、球衣号码、持杆/接球手。示例 4:比赛技术统计 用户说:“给我看看昨晚棕熊队比赛的完整技术统计” 操作:
get_scoreboard(date="<yesterday>") 来查找 event_idget_game_summary(event_id=<id>) 获取完整技术统计
结果:完整的技术统计,包含每位球员的数据和得分过程。示例 5:斯坦利杯赔率 用户说:“斯坦利杯的赔率是多少?” 操作:
get_futures(limit=10)
结果:斯坦利杯的主要竞争者及其赔率值。示例 6:球员统计数据 用户说:“给我看看康纳·麦克戴维德的统计数据” 操作:
currentDate 派生赛季年份get_player_stats(player_id="3895074", season_year=<derived_year>)
结果:按类别的赛季统计数据,包含数值、排名和场均平均值。get_oddsget_betting_oddssearch_teamsget_teams。get_box_scoreget_game_summary。get_player_ratingsget_player_stats。如果某个命令未在上方的命令表中列出,则它不存在。
当命令失败时,不要向用户显示原始错误信息。而是:
get_teams 查找 ID错误:sports-skills 命令未找到
原因:软件包未安装
解决方案:运行 pip install sports-skills
错误:未通过 ID 找到球队
原因:使用了错误或过时的 ESPN 球队 ID
解决方案:调用 get_teams 获取所有 NHL 球队及其 ID 的当前列表(西雅图海怪和犹他猛犸等扩军球队的 ID 不是连续的)
错误:未来比赛未返回数据
原因:ESPN 只返回已完成或正在进行比赛的数据
解决方案:使用 get_schedule 查看即将到来的比赛详情;get_scoreboard 仅涵盖活跃/最近的比赛
错误:休赛期 —— 比分板返回 0 个事件
原因:休赛期(7 月至 9 月)没有比赛安排
解决方案:改用 get_standings 或 get_news;使用 get_schedule 查找赛季何时恢复
每周安装次数
88
仓库
GitHub 星标数
55
首次出现
2026 年 2 月 19 日
安全审计
安装于
opencode85
codex85
gemini-cli84
cursor84
github-copilot82
amp81
Before writing queries, consult references/api-reference.md for endpoints, ID conventions, and data shapes.
Before first use, check if the CLI is available:
which sports-skills || pip install sports-skills
If pip install fails with a Python version error, the package requires Python 3.10+. Find a compatible Python:
python3 --version # check version
# If < 3.10, try: python3.12 -m pip install sports-skills
# On macOS with Homebrew: /opt/homebrew/bin/python3.12 -m pip install sports-skills
No API keys required.
Prefer the CLI — it avoids Python import path issues:
sports-skills nhl get_scoreboard
sports-skills nhl get_standings --season=2025
sports-skills nhl get_teams
CRITICAL: Before calling any data endpoint, verify:
currentDate — never hardcoded.get_teams to resolve the team ID before using team-specific commands.Derive the current year from the system prompt's date (e.g., currentDate: 2026-02-18 → current year is 2026).
2025.| Command | Description |
|---|---|
get_scoreboard | Live/recent NHL scores |
get_standings | Standings by conference and division |
get_teams | All NHL teams |
get_team_roster | Full roster for a team |
get_team_schedule | Schedule for a specific team |
get_game_summary | Detailed box score and scoring plays |
See references/api-reference.md for full parameter lists and return shapes.
Example 1: Today's scores User says: "What are today's NHL scores?" Actions:
get_scoreboard() Result: All live and recent NHL games with scores and statusExample 2: Conference standings User says: "Show me the Eastern Conference standings" Actions:
currentDateget_standings(season=<derived_year>)Example 3: Team roster User says: "Who's on the Maple Leafs roster?" Actions:
get_team_roster(team_id="21") Result: Full Maple Leafs roster with name, position, jersey number, shoots/catchesExample 4: Game box score User says: "Show me the full box score for last night's Bruins game" Actions:
get_scoreboard(date="<yesterday>") to find the event_idget_game_summary(event_id=<id>) for full box score Result: Complete box score with per-player stats and scoring playsExample 5: Stanley Cup odds User says: "What are the Stanley Cup odds?" Actions:
get_futures(limit=10) Result: Top Stanley Cup contenders with odds valuesExample 6: Player statistics User says: "Show me Connor McDavid's stats" Actions:
currentDateget_player_stats(player_id="3895074", season_year=<derived_year>) Result: Season stats by category with value, rank, and per-game averagesget_oddsget_betting_oddssearch_teamsget_teams instead.get_box_scoreget_game_summary instead.get_player_ratingsget_player_stats instead.If a command is not listed in the Commands table above, it does not exist.
When a command fails, do not surface raw errors to the user. Instead:
get_teams to find the ID firstError: sports-skills command not found Cause: Package not installed Solution: Run pip install sports-skills
Error: Team not found by ID Cause: Wrong or outdated ESPN team ID used Solution: Call get_teams to get the current list of all NHL teams with their IDs (expansion teams like the Seattle Kraken and Utah Mammoth have non-sequential IDs)
Error: No data returned for a future game Cause: ESPN only returns data for completed or in-progress games Solution: Use get_schedule to see upcoming game details; get_scoreboard only covers active/recent games
Error: Offseason — scoreboard returns 0 events Cause: No games scheduled during the offseason (July–September) Solution: Use get_standings or get_news instead; use get_schedule to find when the season resumes
Weekly Installs
88
Repository
GitHub Stars
55
First Seen
Feb 19, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode85
codex85
gemini-cli84
cursor84
github-copilot82
amp81
DOCX文件创建、编辑与分析完整指南 - 使用docx-js、Pandoc和Python脚本
51,800 周安装
get_leaders | NHL statistical leaders |
get_news | NHL news articles |
get_play_by_play | Full play-by-play for a game |
get_schedule | Schedule for a specific date or season |
get_injuries | Injury reports across all teams |
get_transactions | Recent transactions |
get_futures | Futures/odds markets |
get_team_stats | Team statistical profile |
get_player_stats | Player statistical profile |