nba-data by machina-sports/sports-skills
npx skills add https://github.com/machina-sports/sports-skills --skill nba-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 nba get_scoreboard
sports-skills nba get_standings --season=2025
sports-skills nba get_teams
重要提示:在调用任何数据端点之前,请验证:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
currentDateget_teams 来解析球队 ID。从系统提示的日期推导当前年份(例如,currentDate: 2026-02-18 → 当前年份是 2026)。
| 命令 | 描述 |
|---|---|
get_scoreboard | NBA 实时/近期比分 |
get_standings | 按赛区划分的排名 |
get_teams | 所有 30 支 NBA 球队 |
get_team_roster | 球队的完整阵容名单 |
get_team_schedule | 特定球队的赛程 |
get_game_summary | 详细的技术统计和得分过程 |
get_leaders | NBA 数据领先者 |
get_news | NBA 新闻文章 |
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:今日比分 用户说:“今天的 NBA 比分是什么?” 操作:
get_scoreboard()
结果:所有 NBA 实时和近期比赛,包含比分和状态示例 2:赛区排名 用户说:“给我看看西部赛区排名” 操作:
currentDate 推导赛季年份get_standings(season=<derived_year>)示例 3:球队阵容 用户说:“湖人队的阵容有谁?” 操作:
get_team_roster(team_id="13")
结果:完整的湖人队阵容,包含姓名、位置、球衣号码、身高、体重示例 4:比赛技术统计 用户说:“给我看看昨晚凯尔特人比赛的完整技术统计” 操作:
get_scoreboard(date="<yesterday>") 以查找 event_idget_game_summary(event_id=<id>) 获取完整技术统计
结果:完整的技术统计,包含每位球员的数据和得分过程示例 5:伤病报告 用户说:“湖人队谁受伤了?” 操作:
get_injuries()示例 6:球员数据 用户说:“给我看看勒布朗本赛季的数据” 操作:
currentDate 推导赛季年份get_player_stats(player_id="1966", 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 获取当前所有 30 支 NBA 球队及其 ID 的列表
错误:未来比赛未返回数据
原因:ESPN 仅返回已完成或正在进行比赛的数据
解决方案:使用 get_schedule 查看即将到来的比赛详情;get_scoreboard 仅涵盖活跃/近期比赛
错误:休赛期 — 比分板返回 0 个事件
原因:休赛期(七月至九月)没有比赛安排
解决方案:请改用 get_standings 或 get_news;使用 get_schedule 查找赛季何时恢复
每周安装次数
187
代码仓库
GitHub 星标数
54
首次出现时间
2026年2月18日
安全审计
安装于
codex183
opencode182
gemini-cli180
github-copilot178
cursor178
kimi-cli176
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 nba get_scoreboard
sports-skills nba get_standings --season=2025
sports-skills nba 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).
| Command | Description |
|---|---|
get_scoreboard | Live/recent NBA scores |
get_standings | Standings by conference |
get_teams | All 30 NBA 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 NBA scores?" Actions:
get_scoreboard() Result: All live and recent NBA games with scores and statusExample 2: Conference standings User says: "Show me the Western Conference standings" Actions:
currentDateget_standings(season=<derived_year>)Example 3: Team roster User says: "Who's on the Lakers roster?" Actions:
get_team_roster(team_id="13") Result: Full Lakers roster with name, position, jersey number, height, weightExample 4: Game box score User says: "Show me the full box score for last night's Celtics 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: Injury report User says: "Who's injured on the Lakers?" Actions:
get_injuries()Example 6: Player statistics User says: "Show me LeBron's stats this season" Actions:
currentDateget_player_stats(player_id="1966", 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 30 NBA 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: 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
187
Repository
GitHub Stars
54
First Seen
Feb 18, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex183
opencode182
gemini-cli180
github-copilot178
cursor178
kimi-cli176
Lark Drive API 使用指南:飞书云文档、Wiki、表格 Token 处理与文件管理
37,500 周安装
moai-docs-generation:自动化文档生成工具指南 - Sphinx, MkDocs, TypeDoc, JSDoc, OpenAPI
88 周安装
Next.js 身份验证模式指南:NextAuth.js、Clerk、Lucia、Supabase Auth 与 JWT 实现
88 周安装
shadcn/ui 设置工具:一键配置 Tailwind CSS v4 与 shadcn/ui 集成
89 周安装
React/Next.js/NestJS性能优化专家 - 前端后端数据库AWS全栈性能优化方案
89 周安装
Cursor子代理创建器:AI代理开发与多步骤工作流自动化专家指南
89 周安装
download-anything:一站式命令行下载工具包,支持视频、音频、图片、种子等资源下载
92 周安装
get_leaders | NBA statistical leaders |
get_news | NBA news articles |
get_play_by_play | Full play-by-play for a game |
get_win_probability | Win probability chart data |
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_depth_chart | Depth chart for a team |
get_team_stats | Team statistical profile |
get_player_stats | Player statistical profile |