machina-sports/sports-skills

fastf1

Formula 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 info, the F1 calendar, or Formula 1 data. Don't use when: user asks about other motorsports (MotoGP, NASCAR, IndyCar, WEC, Formula E). Don't use for F1 betting odds or predictions — use kalshi or polymarket instead. Don't …

First seen Feb 16, 2026

Installation

$ npx skills add machina-sports/sports-skills --skill fastf1

Also in this package

Other skills from machina-sports/sports-skills · top by installs.

npx skills add machina-sports/sports-skills

Browse all from machina-sports/sports-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 215
License LICENSE
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version0.1.0
LicenseMIT
CompatibilityRequires Python 3.10+ (install with: pip install sports-skills)
More metadata
author
machina-sports
version
0.1.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 6,537 B
  • docs SUMMARY.md 569 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 393 installs

SKILL.md

FastF1 — Formula 1 Data

Before writing queries, consult references/api-reference.md for endpoints, ID conventions, and data shapes.

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")

CRITICAL: Before Any Query

CRITICAL: Before calling any data endpoint, verify:

  • Year is derived from the system prompt's currentDate — never hardcoded.
  • In January or February, use year = current_year - 1 (pre-season; the new F1 season has not started yet).

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: 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.

Workflows

Race Weekend Analysis

  1. getraceschedule --year=<year> — find the event name and date
  2. getraceresults --year=<year> --event=<name> — final classification (positions, times, points)
  3. getlapdata --year=<year> --event=<name> --session_type=R — lap-by-lap pace analysis
  4. gettireanalysis --year=<year> --event=<name> — strategy breakdown (compounds, stint lengths, degradation)

Driver/Team Comparison

  1. getchampionshipstandings --year=<year> — championship context (points, wins, podiums)
  2. getteamcomparison --year=<year> --team1=<t1> --team2=<t2> OR getdrivercomparison --year=<year> --driver1=<d1> --driver2=<d2>
  3. getseasonstats --year=<year> — aggregate performance (fastest laps, top speeds)

Season Overview

  1. getraceschedule --year=<year> — full calendar with dates and circuits
  2. getchampionshipstandings --year=<year> — driver and constructor standings
  3. getseasonstats --year=<year> — season-wide fastest laps, top speeds, points leaders
  4. getdriverinfo --year=<year> — current grid (driver numbers, teams, nationalities)

Commands

Command Description
getraceschedule Full season calendar with dates and circuits
getraceresults Final race classification (positions, times, points)
getsessiondata Raw session info (Q, FP1, FP2, FP3, R)
getdriverinfo Driver details from the grid
getteaminfo Team info with driver lineup
getlapdata Lap-by-lap timing with sectors and tire data
getpitstops Pit stop durations and team averages
getspeeddata Speed trap and intermediate speed data
getchampionshipstandings Driver and constructor championship standings
getseasonstats Aggregate season performance
getteamcomparison Team head-to-head: qualifying, race pace, sectors
getdrivercomparison Driver head-to-head: qualifying H2H, race H2H, pace delta
gettireanalysis Tire strategy, stint lengths, degradation rates

See references/api-reference.md for full parameter lists and return shapes.

Examples

Example 1: F1 calendar User says: "Show me the F1 calendar" Actions:

  1. Derive year from currentDate
  2. Call getraceschedule(year=<derived_year>)

Result: Full calendar with event names, dates, and circuits

Example 2: Driver race performance User says: "How did Verstappen do at Monza?" Actions:

  1. Derive year from currentDate (or from context)
  2. Call getraceresults(year=<year>, event="Monza") for final classification
  3. Call getlapdata(year=<year>, event="Monza", session_type="R", driver="VER") for lap times

Result: Finishing position, gap to leader, fastest lap, and tire strategy

Example 3: Latest results queried in pre-season User says: "What were the latest F1 results?" (asked in February 2026) Actions:

  1. Current month is February → season not yet started → use year = 2025
  2. Call getraceschedule(year=2025) to find the last event of that season
  3. Call getraceresults(year=2025, event=<last_event>) for the final race results

Result: Results of the final 2025 race

Commands that DO NOT exist — never call these

  • getqualifying / getpractice — does not exist. Use getsessiondata with sessiontype="Q" for qualifying or sessiontype="FP1"/"FP2"/"FP3" for practice.
  • getstandings — does not exist. Use getchampionship_standings instead.
  • getresults — does not exist. Use getrace_results instead.
  • getcalendar — does not exist. Use getrace_schedule instead.

If a command is not listed in the Commands table above, it does not exist.

Troubleshooting

Error: Event name not found Cause: Event name spelling does not match FastF1's internal naming Solution: Call getraceschedule(year=<year>) first to get the exact event names, then retry with the correct name

Error: Session data is empty Cause: The session has not happened yet Solution: FastF1 only returns data for completed sessions. Check getraceschedule for when the session is scheduled

Error: getraceresults returns no fastestlaptime Cause: Some races do not include fastest lap data in the results endpoint Solution: Use getlapdata(sessiontype="R") and find the minimum laptime across all drivers

Error: Querying the current year in January or February returns no data Cause: The new F1 season has not started yet Solution: Use year = current_year - 1 for any pre-March query; do not query the current year before March