fastf1
63
总安装量
63
周安装量
#6482
全站排名
安装命令
npx skills add https://github.com/machina-sports/sports-skills --skill fastf1
Agent 安装分布
claude-code
51
codex
51
gemini-cli
49
opencode
48
cursor
41
github-copilot
40
Skill 文档
FastF1 â Formula 1 Data
Quick Start
Prefer the CLI â it avoids Python import path issues:
sports-skills f1 get_race_schedule --year=2025
sports-skills f1 get_race_results --year=2025 --event=Monza
Python SDK (alternative):
from sports_skills import f1
schedule = f1.get_race_schedule(year=2025)
results = f1.get_race_results(year=2025, event="Monza")
Choosing the Year
Derive the current year from the system prompt’s date (e.g., currentDate: 2026-02-16 â current year is 2026).
- If the user specifies a year, use it as-is.
- If the user says “latest”, “recent”, “last season”, or doesn’t specify a year: The F1 season runs roughly March-December. If the current month is January or February (i.e., before the new season starts), use
year = current_year - 1since that’s the most recent completed season. From March onward, use the current year â races will have started or be imminent. - Never hardcode a year. Always derive it from the system date.
Workflows
Workflow: Race Weekend Analysis
get_race_schedule --year=<year>â find the event name and dateget_race_results --year=<year> --event=<name>â final classification (positions, times, points)get_lap_data --year=<year> --event=<name> --session_type=Râ lap-by-lap pace analysisget_tire_analysis --year=<year> --event=<name>â strategy breakdown (compounds, stint lengths, degradation)
Workflow: Driver/Team Comparison
get_championship_standings --year=<year>â championship context (points, wins, podiums)get_team_comparison --year=<year> --team1=<t1> --team2=<t2>ORget_teammate_comparison --year=<year> --team=<team>â head-to-head qualifying and race paceget_season_stats --year=<year>â aggregate performance (fastest laps, top speeds)
Workflow: Season Overview
get_race_schedule --year=<year>â full calendar with dates and circuitsget_championship_standings --year=<year>â driver and constructor standingsget_season_stats --year=<year>â season-wide fastest laps, top speeds, points leadersget_driver_info --year=<year>â current grid (driver numbers, teams, nationalities)
Available Commands
get_race_schedule, get_race_results, get_session_data, get_driver_info, get_team_info, get_lap_data, get_pit_stops, get_speed_data, get_championship_standings, get_season_stats, get_team_comparison, get_teammate_comparison, get_tire_analysis.
For return schemas, parameter details, and valid command lists, read the files in the references/ directory.
Examples
User: “Show me the F1 calendar”
- Call
get_race_schedule(year={year}) - Present schedule with event names, dates, and circuits
User: “How did Verstappen do at Monza?”
- Derive the year (if unspecified, use the latest completed season per the rules above)
- Call
get_race_results(year={year}, event="Monza")for final classification - Call
get_lap_data(year={year}, event="Monza", session_type="R", driver="VER")for lap times - Present finishing position, gap to leader, fastest lap, and tire strategy
User: “What were the latest F1 results?” (asked in February 2026)
- Current month is February â season hasn’t started â use
year = 2025 - Call
get_race_schedule(year=2025)to find the last event of that season - Call
get_race_results(year=2025, event=<last_event>)for the final race results - Present the results
Error Handling & Fallbacks
- If event name not found â call
get_race_schedulefirst to find the exact event name. Retry with the correct name. - If session data is empty â the session hasn’t happened yet. FastF1 only returns data for completed sessions.
- If a command returns an error â check the valid commands list in
references/commands.md. Do NOT invent command names. - If
get_race_resultsreturns nofastest_lap_timeâ useget_lap_dataand find the minimumlap_timeacross all drivers instead. - In Jan/Feb, use
year = current_year - 1for the most recent completed season. Do NOT query the current year before March. - Never fabricate lap times, race results, or championship points. If data is unavailable, state so clearly.