npx skills add ...
npx skills add skillhq/flight-search --skill google-flights
Search Google Flights for flight prices and schedules using browser automation. Use when user asks to search flights, find airfare, compare prices, check flight availability, or look up routes. Triggers include "search flights", "find flights", "how much is a flight", "flights from X to Y", "cheapest flight", "flight prices", "airfare", "flight schedule", "nonstop flights", "when should I fly".
npx skills add skillhq/flight-search --skill google-flights
Search Google Flights via agent-browser to find flight prices, schedules, and availability.
--session flights--session econ and --session biz--session flightsDomestic flights default to economy only. Business class on US domestic routes is typically 3-5x the price and rarely worth showing unless asked.
A flight is domestic if both origin and destination are US airports. Common US IATA codes: ATL, BOS, BWI, CLT, DEN, DFW, DTW, EWR, FLL, HNL, IAD, IAH, JFK, LAS, LAX, LGA, MCO, MDW, MIA, MSP, OAK, ORD, PHL, PHX, PDX, SAN, SEA, SFO, SJC, SLC, TPA.
When to show business class:
When to skip business class:
Construct a URL with a natural language ?q= parameter. Loads results directly — 3 commands total.
For domestic flights, run a single session - 2 tool calls total:
Then present results in compact list format (see Output Format section below).
For international flights, run two parallel sessions to show the price delta:
Matching logic: Match flights by airline name and departure time. Not all economy flights have a business equivalent (budget carriers like ZIPAIR, Air Japan don't offer business). Show "-" when no business match exists.
Tip: When an airline appears in business results but not economy (e.g., Philippine Airlines), it may operate business-only pricing on that route. Include it with "-" for economy.
Add +one+way to the URL. For international, run both economy and business in parallel:
If the user specifically asks for business class (not a comparison), run just the business session:
| Feature | URL syntax | Status |
|---|---|---|
| Round trip | +returning+YYYY-MM-DD | Works |
| One way | +one+way | Works |
| Business class | +business+class | Works |
| First class | +first+class | Works |
| N passengers (adults) | +N+passengers | Works |
| Adults + children | +2+adults+1+child | Works |
| IATA codes | BKK, NRT, LAX | Works |
| City names | Bangkok, Tokyo | Works |
| Dates as YYYY-MM-DD | 2026-03-20 | Works (best) |
| Natural dates | March+20 | Works |
| Premium economy | +premium+economy | Fails |
| Multi-city | N/A | Fails |
Each flight appears as a link element with a full description:
Parse economy + business snapshots into the compact list format:
Matching: Pair economy and business results by airline + departure time. Budget carriers without business class show "—". Include "Best"/"Cheapest" labels from Google when present.
After presenting the results table, always offer booking links: "Want booking links for any of these? Just say which one."
When the user picks a flight, extract booking options by clicking the flight's link element in the snapshot. Google Flights shows a panel with booking providers (airlines, OTAs) each with a price and a "Continue" link to the booking site.
The booking panel snapshot will show link elements like:
Extract the provider name, price, and href URL from each link.
flights or econ) alive for booking links. For international comparisons, close --session biz immediately after extracting prices. Close the results session after the user gets booking links or declines.Use for multi-city, premium economy, or when the URL path fails.
If a consent banner appears, click "Accept all" or "Reject all" first.
Cabin class:
Passengers:
"Done" only closes the calendar. You MUST click "Search" separately.
After selecting "Multi-city" trip type, the form shows one row per leg:
Fill each leg's destination + date in order, then click "Search".
Always use compact list format — never markdown tables. Output is typically displayed in chatbot interfaces (Telegram, etc.) where tables render poorly.
| Rule | Why |
|---|---|
| Prefer URL fast path | 2 tool calls (domestic) or 3 (international) vs 15+ interactive |
Chain open+wait with && | Eliminates a round-trip between tool calls |
| Skip business for domestic | US domestic business is 3-5x price, rarely useful unless asked |
Parallel snapshots with & + wait | Both snapshots run concurrently for international |
wait --load networkidle | Smarter than fixed wait 5000 - returns when network settles |
Use fill not type for airports | Clears existing text first |
| Wait 2s after typing airport codes | Autocomplete needs API roundtrip |
| Always CLICK suggestions, never Enter | Enter is unreliable for autocomplete |
| Re-snapshot after every interaction | DOM changes invalidate refs |
| "Done" ≠ Search | Calendar Done only closes picker |
| After presenting results, offer booking links | Users almost always want to book - prompt them |
Keep results session alive; close biz after results | Results session needed for booking clicks; biz only for delta |
Consent popups: Click "Accept all" or "Reject all" in the snapshot.
URL fast path didn't work: Fall back to interactive. Some regions/locales handle ?q= differently.
No results: Verify airports (check combobox labels), dates in the future, or wait longer.
Bot detection / CAPTCHA: Inform user. Do NOT solve CAPTCHAs. Retry after a short wait.
See references/interaction-patterns.md for: