$npx -y skills add machina-sports/sports-skills --skill golf-dataPGA Tour, LPGA, and DP World Tour golf data via ESPN public endpoints — tournament leaderboards, scorecards, season schedules, golfer profiles/overviews, and news. Zero config, no API keys. Use when: user asks about golf scores, tournament leaderboards, scorecards, PGA Tour sched
| 1 | # Golf Data (PGA / LPGA / DP World Tour) |
| 2 | |
| 3 | Before writing queries, consult `references/api-reference.md` for endpoints, player IDs, and score formats. |
| 4 | |
| 5 | ## Setup |
| 6 | |
| 7 | Before first use, check if the CLI is available: |
| 8 | ```bash |
| 9 | which sports-skills || pip install sports-skills |
| 10 | ``` |
| 11 | If `pip install` fails with a Python version error, the package requires Python 3.10+. Find a compatible Python: |
| 12 | ```bash |
| 13 | python3 --version # check version |
| 14 | # If < 3.10, try: python3.12 -m pip install sports-skills |
| 15 | # On macOS with Homebrew: /opt/homebrew/bin/python3.12 -m pip install sports-skills |
| 16 | ``` |
| 17 | No API keys required. |
| 18 | |
| 19 | ## Quick Start |
| 20 | |
| 21 | Prefer the CLI — it avoids Python import path issues: |
| 22 | ```bash |
| 23 | sports-skills golf get_leaderboard --tour=pga |
| 24 | sports-skills golf get_schedule --tour=pga --year=2026 |
| 25 | sports-skills golf get_news --tour=pga |
| 26 | ``` |
| 27 | |
| 28 | ## CRITICAL: Before Any Query |
| 29 | |
| 30 | CRITICAL: Before calling any data endpoint, verify: |
| 31 | - The `tour` parameter is specified (`pga`, `lpga`, or `eur`) — there is no default tour. |
| 32 | - Player IDs are obtained from `get_leaderboard` results or ESPN golf URLs — never guessed. |
| 33 | |
| 34 | ## Important: Golf is Not a Team Sport |
| 35 | |
| 36 | - **Tournaments, not games**: Each event is a multi-day tournament (typically 4 rounds, Thu–Sun). |
| 37 | - **Individual athletes**: The leaderboard has 72–147 individual golfers, not 2 teams. |
| 38 | - **Score relative to par**: Scores are strings like "-17", "E" (even), "+2" — not point totals. |
| 39 | - **One event per week**: Unlike team sports, golf has one tournament per week per tour. |
| 40 | - **No standings endpoint**: FedEx Cup standings are not available via this API. |
| 41 | |
| 42 | ## The `tour` Parameter |
| 43 | |
| 44 | Most commands require `--tour=pga`, `--tour=lpga`, or `--tour=eur`: |
| 45 | - **PGA**: PGA Tour (men's professional golf) |
| 46 | - **LPGA**: LPGA Tour (women's professional golf) |
| 47 | - **EUR**: DP World Tour (formerly European Tour) |
| 48 | |
| 49 | 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`. |
| 50 | |
| 51 | ## Commands |
| 52 | |
| 53 | | Command | Description | |
| 54 | |---|---| |
| 55 | | `get_leaderboard` | Current tournament leaderboard with all golfer scores | |
| 56 | | `get_schedule` | Full season tournament schedule | |
| 57 | | `get_player_info` | Individual golfer profile | |
| 58 | | `get_player_overview` | Detailed overview with season stats, rankings, recent results | |
| 59 | | `get_scorecard` | Hole-by-hole scorecard for a golfer | |
| 60 | | `get_news` | Golf news articles | |
| 61 | |
| 62 | See `references/api-reference.md` for full parameter lists and return shapes. |
| 63 | |
| 64 | ## Examples |
| 65 | |
| 66 | Example 1: Current leaderboard |
| 67 | User says: "What's the PGA leaderboard right now?" |
| 68 | Actions: |
| 69 | 1. Call `get_leaderboard(tour="pga")` |
| 70 | Result: Current tournament leaderboard sorted by position with each golfer's score and round-by-round breakdown |
| 71 | |
| 72 | Example 2: Season schedule |
| 73 | User says: "Show me the LPGA schedule for 2026" |
| 74 | Actions: |
| 75 | 1. Call `get_schedule(tour="lpga", year=2026)` |
| 76 | Result: Full LPGA tournament calendar with names, dates, and venues |
| 77 | |
| 78 | Example 3: Golfer profile |
| 79 | User says: "Tell me about Scottie Scheffler" |
| 80 | Actions: |
| 81 | 1. Call `get_player_info(player_id="9478", tour="pga")` |
| 82 | Result: Scheffler's profile with age, nationality, height/weight, turned pro year |
| 83 | |
| 84 | Example 4: Upcoming major |
| 85 | User says: "When is the Masters this year?" |
| 86 | Actions: |
| 87 | 1. Derive year from `currentDate` |
| 88 | 2. Call `get_schedule(tour="pga", year=<derived_year>)` |
| 89 | 3. Search results for "Masters Tournament" |
| 90 | Result: Masters date, course (Augusta National), and tournament ID |
| 91 | |
| 92 | Example 5: Player scorecard |
| 93 | User says: "Show me Scottie Scheffler's scorecard" |
| 94 | Actions: |
| 95 | 1. Call `get_scorecard(tour="pga", player_id="9478")` |
| 96 | Result: Hole-by-hole scores for each completed round with strokes and score-to-par |
| 97 | |
| 98 | Example 6: Player season form |
| 99 | User says: "How has Rory McIlroy been playing this season?" |
| 100 | Actions: |
| 101 | 1. Call `get_player_overview(player_id="3470", tour="pga")` |
| 102 | Result: Season stats (scoring average, earnings, wins, top-10s), world ranking, and recent results |
| 103 | |
| 104 | ## Commands that DO NOT exist — never call these |
| 105 | |
| 106 | - ~~`get_tournament_results`~~ — does not exist. Use `get_leaderboard` for current/recent tournament scores. |
| 107 | - ~~`get_rankings`~~ — does not exist. FedEx Cup/world rankings are not available via this API. Use `get_player_over |