google-flight
БесплатноЗапускает вложенные скриптыНе проверенSearch Google Flights for prices via a single deterministic HTTP GET request — no browser, no GUI/CSS rendering, no screenshots. Use this before reaching for…
от htlin222★ 78 звёзд на GitHubОб этом скилле
google-flight
A minimalist alternative to browser automation for one job: get a flight price fast.
Where kimi-webbridge / browser-harness drive a real page (open a tab, wait for
render, click through an autocomplete dropdown, scroll a virtualized calendar,
screenshot to verify), this skill sends one HTTP GET to Google Flights' search
endpoint and parses the JSON payload embedded in the returned HTML. No browser
process, no CSS/layout, no screenshots — just a request and a parse. That makes
it both faster (~1-3s vs 10s+ for a single browser navigate) and
lighter on RAM (no Chromium tab at all).
When to use this vs. a browser tool
| Situation | Use |
|---|---|
| "What's a TPE→MAD round trip cost around these dates?" | this skill |
| Need the exact paired return-flight time, not just a price | this skill for the price, then a browser tool to pin down the return leg (see Limitations) |
| Need to actually book / fill in passenger details / pay | browser tool — this skill is read-only |
The route keeps raising IndexError/TypeError (see below) |
browser tool as fallback |
Usage
uv run scripts/search_flights.py --from TPE --to MAD --depart 2026-10-22 --return 2026-10-31 --currency TWD
uv run reads the PEP 723 header at the top of the script and installs its
pinned dependencies (fast-flights, typing_extensions) into an ephemeral
env on first run — nothing to pip install by hand, nothing to leave
installed afterward. Battery included.
Key flags:
--from/--to— IATA airport codes (e.g.TPE,MAD), validated as 3 letters and case-normalized; must differ from each other--depart YYYY-MM-DD— required, strictly validated (see Lessons #6)--return YYYY-MM-DD— omit for one-way; must not be before--depart--adults— 1-9 (Google Flights' own UI cap), default 1--currency— e.g.TWD,USD(blank lets Google pick); validated against the ~70 codes fast-flights actually supports--max-stops N— filters client-side (the library's own server-side stop filter crashes the parser on some routes, see below — don't pass it upstream); must be >= 0--depart-window "HH:MM-HH:MM"/--arrive-window "HH:MM-HH:MM"— filter the outbound leg's clock-time departure/arrival, e.g.--arrive-window "12:00-18:00"for "must land in the afternoon". Supports windows that cross midnight, e.g."22:00-04:00"for red-eyes.--format json|table—jsonfor another agent/script to consume,tablefor a human to read--limit N— cap results (sorted by price ascending), must be >= 1
On success it exits 0 and prints results. On failure (bad input, no results,
or the upstream parser choking) it prints a JSON {"error": ...} to
stdout/stderr and exits non-zero — check the exit code, don't just check
stdout is non-empty.
Lessons this distills (from manually driving Google Flights in a real browser first)
- Long-haul date math is a trap. A 19-hour TPE→MAD flight departing
Taipei at 00:30 can land in Madrid the same calendar day — Taipei is far
enough ahead of Madrid that the timezone gain outpaces the flight time. If
you want "arrives afternoon on date X", don't assume you need to search
--departone day earlier; search--departon X itself first and check the actualarrivefield the script prints. Verify, don't guess. - Round-trip here means "outbound options + total price", not two paired
legs. Google Flights' own UI is two-step: pick an outbound flight, then
it shows you return options for that specific fare. This script's
--returnflag reproduces step one only — you get a real round-trip total price, but the itinerary printed is the outbound leg; the specific return flight isn't resolved. If you need the actual return time pinned down, treat this script's price as a first-pass estimate and confirm the return leg with a browser tool. - The reverse-engineered parser is fragile, in two different ways —
and one of them was fixable. It decodes an undocumented, unstable
tfsprotobuf param and parses embedded JSON that Google can reshape at any time.- Whole-query failure, root-caused and patched: a sweep of ~20 routes
found
fast_flights.parser.parse_jsdoesprice = k[1][0][1]for every raw itinerary entry with no bounds check — one entry missing price data (common on TPE→LHR, TPE→BNE, TPE→JNB, and intermittently others) crashed the parse for the entire result set, discarding every other good entry along with it. That was a fixable bug in a 15-line loop, not an inherent fragility, so this script monkey-patchesparse_jsat import time (seepatch_resilient_parser()) to skip only the bad entry and keep the rest. Pass rate on the swept routes went from 33/40 to 40/40 after the patch. If a futurefast-flightsrelease changes the parser's internal shape, the patch fails closed (falls back to st
- Whole-query failure, root-caused and patched: a sweep of ~20 routes
found
Установить google-flight в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл google-flight?
Search Google Flights for prices via a single deterministic HTTP GET request — no browser, no GUI/CSS rendering, no screenshots. Use this before reaching for browser automation (kimi-webbridge, browser-harness) whenever the task is "what does this route cost", not "show me the page" or "book this seat".
Как установить скилл google-flight?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл google-flight запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic