nfl-data by machina-sports/sports-skills
npx skills add https://github.com/machina-sports/sports-skills --skill nfl-data在编写查询之前,请查阅 references/api-reference.md 以了解端点、ID 约定和数据形状。
首次使用前,请检查 CLI 是否可用:
which sports-skills || pip install sports-skills
如果 pip install 失败(包未找到或 Python 版本错误),请从 GitHub 安装:
pip install git+https://github.com/machina-sports/sports-skills.git
该包需要 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 nfl get_scoreboard
sports-skills nfl get_standings --season=2025
sports-skills nfl get_teams
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
Python SDK(备选方案):
from sports_skills import nfl
scores = nfl.get_scoreboard({})
standings = nfl.get_standings({"params": {"season": "2025"}})
关键提示:在调用任何数据端点之前,请验证:
currentDate —— 切勿硬编码。get_teams 来解析球队 ID。从系统提示中的日期推导当前年份(例如,currentDate: 2026-02-16 → 当前年份是 2026)。
season = current_year(即将到来的赛季)。如果是 9 月至 2 月,则活跃赛季开始于上一个日历年(如果您在 1 月或 2 月),否则开始于当前年份。| 命令 | 描述 |
|---|---|
get_scoreboard | 实时/最近的 NFL 比分 |
get_standings | 按联盟和分区排列的排名 |
get_teams | 所有 32 支 NFL 球队 |
get_team_roster | 球队的完整阵容名单 |
get_team_schedule | 特定球队的赛程 |
get_game_summary | 详细的技术统计和得分回合 |
get_leaders | NFL 统计数据领先者 |
get_news | NFL 新闻文章 |
get_play_by_play | 比赛的完整逐回合记录 |
get_win_probability | 获胜概率图表数据 |
get_schedule | 按周排列的赛季赛程 |
get_injuries | 所有球队的伤病报告 |
get_transactions | 最近的球员交易 |
get_futures | 未来市场/赔率 |
get_depth_chart | 球队的深度图 |
get_team_stats | 球队统计数据概况 |
get_player_stats | 球员统计数据概况 |
完整的参数列表和返回形状请参阅 references/api-reference.md。
示例 1:今日比分 用户说:"What are today's NFL scores?" 操作:
get_scoreboard()
结果:所有实时和最近的 NFL 比赛,包含比分和状态示例 2:联盟排名 用户说:"Show me the AFC standings" 操作:
currentDate 推导赛季年份get_standings(season=<derived_year>)示例 3:球队阵容 用户说:"Who's on the Chiefs roster?" 操作:
get_team_roster(team_id="12")
结果:酋长队的完整阵容名单,包含姓名、位置、球衣号码、身高、体重示例 4:超级碗技术统计 用户说:"How did the Super Bowl go?" 操作:
get_schedule(week=23) 以找到超级碗的 event_idget_game_summary(event_id=<id>) 获取完整技术统计
结果:完整的技术统计,包含传球/冲球/接球数据和得分回合示例 5:伤病报告 用户说:"Who's injured on the Chiefs?" 操作:
get_injuries()示例 6:球员统计数据 用户说:"Show me Patrick Mahomes' stats this season" 操作:
currentDate 推导赛季年份get_player_stats(player_id="3139477", 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。如果不在 PyPI 上,请从 GitHub 安装:pip install git+https://github.com/machina-sports/sports-skills.git
错误:未通过 ID 找到球队
原因:使用了错误或过时的 ESPN 球队 ID
解决方案:调用 get_teams 获取所有 32 支 NFL 球队及其 ID 的当前列表
错误:未来比赛未返回数据
原因:ESPN 仅返回已完成或正在进行比赛的数据
解决方案:使用 get_schedule 查看即将到来的比赛详情;get_scoreboard 仅涵盖活跃/最近的比赛
错误:季后赛周编号未返回结果 原因:季后赛使用统一的周编号(19-23),与常规赛不同 解决方案:使用第 19 周表示外卡赛,第 20 周表示分区赛,第 21 周表示联盟冠军赛,第 23 周表示超级碗
每周安装量
102
代码仓库
GitHub 星标数
55
首次出现
2026 年 2 月 18 日
安全审计
已安装于
codex98
opencode97
gemini-cli95
cursor95
github-copilot92
kimi-cli90
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 (package not found or Python version error), install from GitHub:
pip install git+https://github.com/machina-sports/sports-skills.git
The package requires Python 3.10+. If your default Python is older, use a specific version:
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 nfl get_scoreboard
sports-skills nfl get_standings --season=2025
sports-skills nfl get_teams
Python SDK (alternative):
from sports_skills import nfl
scores = nfl.get_scoreboard({})
standings = nfl.get_standings({"params": {"season": "2025"}})
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-16 → current year is 2026).
season = current_year (upcoming season). If September–February, the active season started in the previous calendar year if you're in Jan/Feb, otherwise current year.| Command | Description |
|---|---|
get_scoreboard | Live/recent NFL scores |
get_standings | Standings by conference and division |
get_teams | All 32 NFL 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 NFL scores?" Actions:
get_scoreboard() Result: All live and recent NFL games with scores and statusExample 2: Conference standings User says: "Show me the AFC standings" Actions:
currentDateget_standings(season=<derived_year>)Example 3: Team roster User says: "Who's on the Chiefs roster?" Actions:
get_team_roster(team_id="12") Result: Full Chiefs roster with name, position, jersey number, height, weightExample 4: Super Bowl box score User says: "How did the Super Bowl go?" Actions:
get_schedule(week=23) to find the Super Bowl event_idget_game_summary(event_id=<id>) for full box score Result: Complete box score with passing/rushing/receiving stats and scoring playsExample 5: Injury report User says: "Who's injured on the Chiefs?" Actions:
get_injuries()Example 6: Player statistics User says: "Show me Patrick Mahomes' stats this season" Actions:
currentDateget_player_stats(player_id="3139477", 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. If not on PyPI, install from GitHub: pip install git+https://github.com/machina-sports/sports-skills.git
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 32 NFL teams with their 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: Postseason week number returns no results Cause: Postseason uses unified week numbers (19-23) that differ from regular season Solution: Use week 19 for Wild Card, 20 for Divisional, 21 for Conference Championship, 23 for Super Bowl
Weekly Installs
102
Repository
GitHub Stars
55
First Seen
Feb 18, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex98
opencode97
gemini-cli95
cursor95
github-copilot92
kimi-cli90
DOCX文件创建、编辑与分析完整指南 - 使用docx-js、Pandoc和Python脚本
49,900 周安装
Google Workspace CLI 教程:基于模板创建文档并自动填充内容与共享
7,700 周安装
C# TUnit单元测试框架:最佳实践、数据驱动测试与xUnit迁移指南
7,700 周安装
Google日历每周日程规划技能:自动查看空闲时段与添加事件
7,700 周安装
AI邮件设计工具:使用inference.sh CLI生成高转化率营销邮件模板与布局指南
7,700 周安装
GitHub Copilot TLDR Prompt:AI助手快速生成技术文档摘要工具
7,700 周安装
Power Platform Dataverse Python SDK 解决方案架构师 - 业务用例构建与代码生成
7,700 周安装
get_leaders | NFL statistical leaders |
get_news | NFL news articles |
get_play_by_play | Full play-by-play for a game |
get_win_probability | Win probability chart data |
get_schedule | Season schedule by week |
get_injuries | Injury reports across all teams |
get_transactions | Recent transactions |
get_futures | Futures/odds markets |
get_depth_chart | Depth chart for a team |
get_team_stats | Team statistical profile |
get_player_stats | Player statistical profile |