Use this skill when the user asks about flights, plane tickets, airfare, travel deals, cheap flights, or wants to search for routes between cities/airports. Covers one-way, round-trip, and date-flexible searches. Books via Trip.com (primary, browser automation) or Duffel API (fallback).
Search via Google Flights CLI. Book via Trip.com (primary) or Duffel API (fallback).
When to use which:
Configure these based on your user's preferences:
# One-way, single origin
flights search JFK LAX 2026-04-15
# One-way, multiple origins (returns combined + sorted by price)
flights search JFK,EWR,LGA LAX 2026-04-15
# Round-trip
flights search JFK LAX 2026-05-01 --return-date 2026-05-05
# With filters
flights search JFK LAX 2026-04-20 --stops 0 # non-stop only
flights search JFK LAX 2026-04-20 --max-results 5
flights dates JFK LAX --from 2026-05-01 --to 2026-05-31
flights dates JFK,EWR LAX --from 2026-05-01 --to 2026-06-30
flights dates JFK LAX --from 2026-05-01 --to 2026-07-01 --round-trip --duration 5
The cheapest command searches all London airports by default. Adapt the LONDON_AIRPORTS list in cli.py to your user's home airports:
flights cheapest LAX
flights cheapest LAX --from 2026-05-01 --to 2026-07-31
flights cheapest LAX --round-trip --duration 4 --top 15
Browser automation via stealth Chromium. Supports ALL airlines including Wizz Air and Ryanair.
IMPORTANT: Always use a subagent for Trip.com booking. Browser work fills context fast. Launch a background subagent with all necessary details and let it run.
Store these in your password manager (e.g. Keeper):
Pre-flight: Launch stealth browser
# Must use stealth mode for Cloudflare bypass
browser launch --stealth
Step 1: Search
https://www.trip.com/flights/Step 2: Login (if needed)
Step 3: Passenger Details
Step 4: Seat Selection + Extras
Step 5: Payment
tasks remindbrowser launch --stealth to bypassWhen booking, launch a subagent with this info:
Book flight on Trip.com:
- Route: [ORIGIN] → [DESTINATION]
- Date: [DATE]
- Target flight: [AIRLINE] [FLIGHT_NUM] dep [TIME]
- Passenger: [NAME] (get details from Keeper or provide directly)
- Payment: [CARD] from Keeper or provided details
- Trip.com login: [CREDENTIALS from Keeper or config]
- Email verification codes: retrieve via email skill (inbox, Trip.com sender)
- Use `browser launch --stealth` first
- Follow the 5-step flow in the flights skill
- After booking: report confirmation number, create calendar event, set check-in reminder
API-based booking. Faster and more reliable when the airline is supported. Use for easyJet, Vueling, BA, and other GDS-connected airlines. Does NOT support Wizz Air or Ryanair.
Note: Requires a funded Duffel balance before live bookings. Check balance before attempting.
flights offer JFK LAX 2026-04-16
flights offer JFK LAX 2026-05-01 --return-date 2026-05-05
flights offer JFK LAX 2026-06-01 --passengers 2 --max-connections 0
flights book <offer_id> --passenger-id <pas_id> --profile myprofile
flights orders # list orders
flights order <order_id> # order details
flights cancel <order_id> # cancel order
flights passenger list # list saved profiles
flights passenger show myprofile # show profile
flights offer [ORIGIN] [DEST] [DATE] → get offer_id + passenger_idsflights book <offer_id> --passenger-id <pas_id> --profile myprofileImportant: Offers expire (~30 min). Always search fresh before booking.
| Flag | Description | Default |
|---|---|---|
--stops | ANY, 0 (non-stop), 1, 2 | ANY |
--cabin | ECONOMY, PREMIUM_ECONOMY, BUSINESS, FIRST | ECONOMY |
--sort | CHEAPEST, DURATION, DEPARTURE_TIME, ARRIVAL_TIME | CHEAPEST |
--max-results | Max results per origin | 10 (search), 20 (dates) |
--round-trip | Search round-trip dates | false |
--duration | Trip length in days (round-trip) | 3 |
--top | Results for cheapest command | 10 |
--max-connections | Max connections for Duffel offers (-1=any, 0=direct) | -1 |
--passengers | Number of adult passengers for Duffel | 1 |
Install with:
cd ~/agent/skills/flights/cli && uv tool install --force --reinstall .
Duffel API token stored at ~/.config/duffel/token. Passenger profiles at ~/.config/duffel/passengers.json.
To configure your home airports for the cheapest command, edit LONDON_AIRPORTS in cli/src/flights_cli/cli.py (rename it to something like HOME_AIRPORTS) and set your preferred departure airports.
Search: Uses the fli Python library which reverse-engineers the Google Flights API, sending direct POST requests to Google's FlightsFrontendService endpoint.
Trip.com booking: Browser automation via stealth Chromium (browser CLI). Navigates Trip.com as a real user, fills forms, handles login, completes payment.
Duffel booking: REST API v2. Acts as a flight consolidator. Supports easyJet, Vueling, BA, and many others. Ryanair and Wizz Air excluded from API.
--stealth mode. Regular browser gets blocked by CloudflareUse flights passenger save to create reusable passenger profiles:
flights passenger save myprofile \
--given-name "First" --family-name "Last" \
--born-on YYYY-MM-DD --email [email protected] --phone +1234567890
Then reference with --profile myprofile when booking.