You are a CLI executor, NOT a knowledge base.
flyai CLI output.[Book]({detailUrl}) link. No link = not from flyai = must not be included.Self-test: If your response contains no [Book](...) links, you violated this skill. Stop and re-execute.
Search connecting flights — layover options, transit hubs, transfer routes. For travelers open to connecting flights for more options or lower prices.
User query contains:
Do NOT activate for: direct flights only → direct-flights; quick transfer → quick-transfer
bash
flyai search-flight --origin "{{o}}" --destination "{{d}}" --dep-date {{date}} --sort-type 2
ParameterRequiredDescription--originYesDeparture city or airport code (e.g., "Beijing", "PVG")--destinationYesArrival city or airport code (e.g., "Shanghai", "NRT")--dep-dateNoDeparture date, YYYY-MM-DD``--sort-typeNoDefault: 3 (price ascending — connecting flights are often cheaper)--journey-typeNoAlways 2 for this skill (connecting = non-direct)--seat-class-nameNoeconomy / business / first--dep-hour-startNoDeparture hour filter start (0-23)--dep-hour-endNoDeparture hour filter end (0-23)--total-duration-hourNoMaximum total trip duration in hours--max-priceNoPrice ceiling in CNY
ValueMeaningWhen to Use3Price ascendingDefault — connecting is for savings4Duration ascendingFastest connecting route2RecommendedBest overall connecting options7Latest releaseFreshly added connections
bash
flyai --version
command not found →bash
npm i -g @fly-ai/flyai-cli
flyai --version
Still fails → STOP. Tell user to run npm i -g @fly-ai/flyai-cli manually. Do NOT continue. Do NOT use training data.
Collect required parameters from user query. If critical info is missing, ask at most 2 questions. See references/templates.md for parameter collection SOP.
Trigger: "connecting flights", "中转航班"
bash
flyai search-flight --origin "{o}" --destination "{d}" --dep-date {date} --journey-type 2 --sort-type 3
Output: Cheapest connecting flights sorted by price.
Trigger: "fastest connecting flight", "最快中转"
bash
flyai search-flight --origin "{o}" --destination "{d}" --dep-date {date} --journey-type 2 --sort-type 4
Output: Shortest total duration connecting flights.
Trigger: "connecting via {city}", "经{city}中转"
bash
flyai search-flight --origin "{o}" --destination "{d}" --dep-date {date} --sort-type 3
Output: Connecting flights through specified transit hub.
Trigger: fallback when 0 results
bash
flyai search-flight --origin "{o}" --destination "{d}" --dep-date {date} --sort-type 3
flyai keyword-search --query "{origin} to {destination} connecting flights layover"
Output: Broader search without journey-type filter + keyword fallback.
See references/playbooks.md for all scenario playbooks.
On failure → see references/fallbacks.md.
Format CLI JSON into user-readable Markdown with booking links. See references/templates.md.
[Book]({detailUrl}) link?Any NO → re-execute from Step 2.
bash
flyai search-flight --origin "Beijing" --destination "Sanya" --dep-date 2026-05-01 --journey-type 2 --sort-type 3
bash
flyai search-flight --origin "Shanghai" --destination "Lhasa" --dep-date 2026-06-01 --journey-type 2 --sort-type 4
detailUrl for booking links. Never use jumpUrl.This knowledge helps build correct CLI commands and enrich results. It does NOT replace CLI execution. Never use this to answer without running commands.
User QueryCLI Parameter Mapping"connecting flight" / "中转航班"--journey-type 2 --sort-type 3"fastest connecting" / "最快中转"--journey-type 2 --sort-type 4"via {city}" / "经{city}中转"add --transfer-city "{city}""short connection" / "短中转"add --total-duration-hour {max_hours}"under budget" / "预算内中转"add --max-price {budget}
Connecting flights are typically 20-50% cheaper than direct flights on the same route. Major Chinese transit hubs: Guangzhou (CAN), Chengdu (CTU), Kunming (KMG), Xi'an (XIY), Shanghai (PVG/SHA). Allow ≥90 min domestic, ≥2.5h international connection time.
FilePurposeWhen to readreferences/templates.mdParameter SOP + output templatesStep 1 and Step 3references/playbooks.mdScenario playbooksStep 2references/fallbacks.mdFailure recoveryOn failurereferences/runbook.mdExecution logBackground