$npx -y skills add machina-sports/sports-skills --skill fastf1Formula 1 data — race schedules, results, lap timing, driver and team info. Powered by the FastF1 library. Covers F1 sessions, qualifying, practice, race results, sector times, tire strategy. Use when: user asks about F1 race results, qualifying, lap times, driver stats, team inf
| 1 | # FastF1 — Formula 1 Data |
| 2 | |
| 3 | Before writing queries, consult `references/api-reference.md` for endpoints, ID conventions, and data shapes. |
| 4 | |
| 5 | ## Quick Start |
| 6 | |
| 7 | Prefer the CLI — it avoids Python import path issues: |
| 8 | ```bash |
| 9 | sports-skills f1 get_race_schedule --year=2025 |
| 10 | sports-skills f1 get_race_results --year=2025 --event=Monza |
| 11 | ``` |
| 12 | |
| 13 | Python SDK (alternative): |
| 14 | ```python |
| 15 | from sports_skills import f1 |
| 16 | |
| 17 | schedule = f1.get_race_schedule(year=2025) |
| 18 | results = f1.get_race_results(year=2025, event="Monza") |
| 19 | ``` |
| 20 | |
| 21 | ## CRITICAL: Before Any Query |
| 22 | |
| 23 | CRITICAL: Before calling any data endpoint, verify: |
| 24 | - Year is derived from the system prompt's `currentDate` — never hardcoded. |
| 25 | - In January or February, use `year = current_year - 1` (pre-season; the new F1 season has not started yet). |
| 26 | |
| 27 | ## Choosing the Year |
| 28 | |
| 29 | Derive the current year from the system prompt's date (e.g., `currentDate: 2026-02-16` → current year is 2026). |
| 30 | |
| 31 | - **If the user specifies a year**, use it as-is. |
| 32 | - **If the user says "latest", "recent", "last season", or doesn't specify**: The F1 season runs roughly March–December. If the current month is January or February, use `year = current_year - 1`. From March onward, use the current year. |
| 33 | |
| 34 | ## Workflows |
| 35 | |
| 36 | ### Race Weekend Analysis |
| 37 | 1. `get_race_schedule --year=<year>` — find the event name and date |
| 38 | 2. `get_race_results --year=<year> --event=<name>` — final classification (positions, times, points) |
| 39 | 3. `get_lap_data --year=<year> --event=<name> --session_type=R` — lap-by-lap pace analysis |
| 40 | 4. `get_tire_analysis --year=<year> --event=<name>` — strategy breakdown (compounds, stint lengths, degradation) |
| 41 | |
| 42 | ### Driver/Team Comparison |
| 43 | 1. `get_championship_standings --year=<year>` — championship context (points, wins, podiums) |
| 44 | 2. `get_team_comparison --year=<year> --team1=<t1> --team2=<t2>` OR `get_driver_comparison --year=<year> --driver1=<d1> --driver2=<d2>` |
| 45 | 3. `get_season_stats --year=<year>` — aggregate performance (fastest laps, top speeds) |
| 46 | |
| 47 | ### Season Overview |
| 48 | 1. `get_race_schedule --year=<year>` — full calendar with dates and circuits |
| 49 | 2. `get_championship_standings --year=<year>` — driver and constructor standings |
| 50 | 3. `get_season_stats --year=<year>` — season-wide fastest laps, top speeds, points leaders |
| 51 | 4. `get_driver_info --year=<year>` — current grid (driver numbers, teams, nationalities) |
| 52 | |
| 53 | ## Commands |
| 54 | |
| 55 | | Command | Description | |
| 56 | |---|---| |
| 57 | | `get_race_schedule` | Full season calendar with dates and circuits | |
| 58 | | `get_race_results` | Final race classification (positions, times, points) | |
| 59 | | `get_session_data` | Raw session info (Q, FP1, FP2, FP3, R) | |
| 60 | | `get_driver_info` | Driver details from the grid | |
| 61 | | `get_team_info` | Team info with driver lineup | |
| 62 | | `get_lap_data` | Lap-by-lap timing with sectors and tire data | |
| 63 | | `get_pit_stops` | Pit stop durations and team averages | |
| 64 | | `get_speed_data` | Speed trap and intermediate speed data | |
| 65 | | `get_championship_standings` | Driver and constructor championship standings | |
| 66 | | `get_season_stats` | Aggregate season performance | |
| 67 | | `get_team_comparison` | Team head-to-head: qualifying, race pace, sectors | |
| 68 | | `get_driver_comparison` | Driver head-to-head: qualifying H2H, race H2H, pace delta | |
| 69 | | `get_tire_analysis` | Tire strategy, stint lengths, degradation rates | |
| 70 | |
| 71 | See `references/api-reference.md` for full parameter lists and return shapes. |
| 72 | |
| 73 | ## Examples |
| 74 | |
| 75 | Example 1: F1 calendar |
| 76 | User says: "Show me the F1 calendar" |
| 77 | Actions: |
| 78 | 1. Derive year from `currentDate` |
| 79 | 2. Call `get_race_schedule(year=<derived_year>)` |
| 80 | Result: Full calendar with event names, dates, and circuits |
| 81 | |
| 82 | Example 2: Driver race performance |
| 83 | User says: "How did Verstappen do at Monza?" |
| 84 | Actions: |
| 85 | 1. Derive year from `currentDate` (or from context) |
| 86 | 2. Call `get_race_results(year=<year>, event="Monza")` for final classification |
| 87 | 3. Call `get_lap_data(year=<year>, event="Monza", session_type="R", driver="VER")` for lap times |
| 88 | Result: Finishing position, gap to leader, fastest lap, and tire strategy |
| 89 | |
| 90 | Example 3: Latest results queried in pre-season |
| 91 | User says: "What were the latest F1 results?" (asked in February 2026) |
| 92 | Actions: |
| 93 | 1. Current month is February → season not yet started → use `year = 2025` |
| 94 | 2. Call `get_race_schedule(year=2025)` to find the last event of that season |
| 95 | 3. Call `get_race_results(year=2025, event= |