golf-data by machina-sports/sports-skills
npx skills add https://github.com/machina-sports/sports-skills --skill golf-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 golf get_leaderboard --tour=pga
sports-skills golf get_schedule --tour=pga --year=2026
sports-skills golf get_news --tour=pga
关键:在调用任何数据端点之前,请验证:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
tour 参数(pga、lpga 或 eur)— 没有默认巡回赛。get_leaderboard 结果或 ESPN 高尔夫 URL 获取的 — 切勿猜测。tour 参数大多数命令需要 --tour=pga、--tour=lpga 或 --tour=eur:
如果用户未指定,则默认为 pga。如果用户提到"女子高尔夫"或"LPGA",则使用 lpga。如果用户提到欧洲巡回赛或 DP 世界巡回赛,则使用 eur。
| 命令 | 描述 |
|---|---|
get_leaderboard | 当前锦标赛领先榜,包含所有高尔夫球手分数 |
get_schedule | 完整赛季锦标赛赛程 |
get_player_info | 个人高尔夫球手资料 |
get_player_overview | 详细概览,包含赛季统计数据、排名、近期成绩 |
get_scorecard | 高尔夫球手逐洞记分卡 |
get_news | 高尔夫新闻文章 |
完整参数列表和返回结构请参见 references/api-reference.md。
示例 1:当前领先榜 用户说:"现在 PGA 的领先榜是什么?" 操作:
get_leaderboard(tour="pga")
结果:当前锦标赛领先榜,按位置排序,包含每位高尔夫球手的分数和逐轮细分示例 2:赛季赛程 用户说:"给我看看 2026 年 LPGA 的赛程" 操作:
get_schedule(tour="lpga", year=2026)
结果:完整的 LPGA 锦标赛日历,包含名称、日期和场地示例 3:高尔夫球手资料 用户说:"告诉我关于斯科蒂·舍夫勒的信息" 操作:
get_player_info(player_id="9478", tour="pga")
结果:舍夫勒的资料,包含年龄、国籍、身高/体重、转职业年份示例 4:即将到来的大满贯赛 用户说:"今年的美国大师赛是什么时候?" 操作:
currentDate 推导年份get_schedule(tour="pga", year=<derived_year>)示例 5:球员记分卡 用户说:"给我看看斯科蒂·舍夫勒的记分卡" 操作:
get_scorecard(tour="pga", player_id="9478")
结果:每轮已完成的逐洞分数,包含杆数和相对于标准杆的分数示例 6:球员赛季状态 用户说:"罗里·麦克罗伊这个赛季打得怎么样?" 操作:
get_player_overview(player_id="3470", tour="pga")
结果:赛季统计数据(平均杆数、收入、胜利次数、前十名次数)、世界排名和近期成绩get_tournament_resultsget_leaderboard 获取当前/近期锦标赛分数。get_rankingsget_player_overview 获取个人排名。get_oddsget_betting_oddssearch_playerget_leaderboard 从当前参赛阵容中查找球员 ID。如果某个命令未在上方的命令表中列出,则它不存在。
当命令失败时,不要向用户显示原始错误信息。而是:
get_leaderboard 查找当前球员 ID错误:sports-skills 命令未找到
原因:软件包未安装
解决方案:运行 pip install sports-skills
错误:领先榜上没有正在进行的锦标赛
原因:高尔夫锦标赛在周四至周日进行;赛事之间领先榜可能显示没有正在进行的锦标赛
解决方案:调用 get_schedule(tour="pga") 查找下一个即将到来的赛事
错误:轮次数据有限 — 分数为空
原因:锦标赛开始前,轮次分数将为空。锦标赛期间,只有已完成的轮次才有分数。
解决方案:检查 get_leaderboard 了解锦标赛状态和当前轮次;等待轮次完成
错误:未通过 ID 找到球员
原因:球员 ID 不正确,或者该球员不在当前锦标赛的参赛阵容中
解决方案:从 get_leaderboard 结果中获取球员 ID,或者查找 ESPN 高尔夫 URL(espn.com/golf/player/_/id/<id>/player-name)
每周安装量
87
仓库
GitHub 星标数
55
首次出现
2026 年 2 月 20 日
安全审计
安装于
opencode86
codex86
gemini-cli85
github-copilot84
cursor84
amp83
Before writing queries, consult references/api-reference.md for endpoints, player IDs, and score formats.
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 golf get_leaderboard --tour=pga
sports-skills golf get_schedule --tour=pga --year=2026
sports-skills golf get_news --tour=pga
CRITICAL: Before calling any data endpoint, verify:
tour parameter is specified (pga, lpga, or eur) — there is no default tour.get_leaderboard results or ESPN golf URLs — never guessed.tour ParameterMost commands require --tour=pga, --tour=lpga, or --tour=eur:
If the user doesn't specify, default to pga. If they say "women's golf" or "LPGA", use lpga. If they mention the European Tour or DP World Tour, use eur.
| Command | Description |
|---|---|
get_leaderboard | Current tournament leaderboard with all golfer scores |
get_schedule | Full season tournament schedule |
get_player_info | Individual golfer profile |
get_player_overview | Detailed overview with season stats, rankings, recent results |
get_scorecard | Hole-by-hole scorecard for a golfer |
get_news |
See references/api-reference.md for full parameter lists and return shapes.
Example 1: Current leaderboard User says: "What's the PGA leaderboard right now?" Actions:
get_leaderboard(tour="pga") Result: Current tournament leaderboard sorted by position with each golfer's score and round-by-round breakdownExample 2: Season schedule User says: "Show me the LPGA schedule for 2026" Actions:
get_schedule(tour="lpga", year=2026) Result: Full LPGA tournament calendar with names, dates, and venuesExample 3: Golfer profile User says: "Tell me about Scottie Scheffler" Actions:
get_player_info(player_id="9478", tour="pga") Result: Scheffler's profile with age, nationality, height/weight, turned pro yearExample 4: Upcoming major User says: "When is the Masters this year?" Actions:
currentDateget_schedule(tour="pga", year=<derived_year>)Example 5: Player scorecard User says: "Show me Scottie Scheffler's scorecard" Actions:
get_scorecard(tour="pga", player_id="9478") Result: Hole-by-hole scores for each completed round with strokes and score-to-parExample 6: Player season form User says: "How has Rory McIlroy been playing this season?" Actions:
get_player_overview(player_id="3470", tour="pga") Result: Season stats (scoring average, earnings, wins, top-10s), world ranking, and recent resultsget_tournament_resultsget_leaderboard for current/recent tournament scores.get_rankingsget_player_overview for individual rankings.get_oddsget_betting_oddssearch_playerget_leaderboard to find player IDs from the current field.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_leaderboard to find current player IDsError: sports-skills command not found Cause: Package not installed Solution: Run pip install sports-skills
Error: No active tournament on leaderboard Cause: Golf tournaments run Thursday–Sunday; between events the leaderboard may show no active tournament Solution: Call get_schedule(tour="pga") to find the next upcoming event
Error: Limited round data — scores are empty Cause: Before a tournament starts, round scores will be empty. During the tournament, only completed rounds have scores. Solution: Check get_leaderboard for tournament status and current round; wait for rounds to complete
Error: Player not found by ID Cause: Player ID is incorrect or the player is not in the current tournament field Solution: Get player IDs from get_leaderboard results, or look up ESPN golf URLs (espn.com/golf/player/_/id/<id>/player-name)
Weekly Installs
87
Repository
GitHub Stars
55
First Seen
Feb 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode86
codex86
gemini-cli85
github-copilot84
cursor84
amp83
DOCX文件创建、编辑与分析完整指南 - 使用docx-js、Pandoc和Python脚本
51,800 周安装
| Golf news articles |