low-cost-random-loop-flight-search
Installation
SKILL.md
Random-loop flight search
Goal: find multi-leg loops from the user's accepted departure airports back to their accepted return airports with the best distance per unit of base currency (or their stated objective), and show useful runners-up, with dates, airports, flight numbers, prices and key restrictions.
- Run
python -B <skill-directory>/scripts/resolve_harness.py. Keep the returned paths. Readworkflow_refonce; it is the full reference. You do not need the Request Schema or implementation files. If this Skill was installed on its own, the resolver downloads the matching framework release from github.com/flyblock/flight-search-harness into~/.flight-search-harnesson first use (it says so on stderr); tell the user once. - Write a fresh Request from the template and the user's words, then
start. Do not open old Runs.journey_shape: random_loop;departure_airports,return_airports,first_departure_window. Add only what the user set:min_legs/max_legs;maximum_total_duration_minutes(first departure to final arrival, e.g. 2880 for "all flights within 48 hours");quality_gate: {minimum_complete_loop_efficiency_km_per_base_currency_unit}(e.g. 5 for "at least 5 km per CNY") andmaximum_leg_price_in_base_currency; connection buffers, maximum waits, earliest local departure,airport_transit. The code checks these itself; do not restate them asadditional_requirements.- A loose area ("airports around Frankfurt") becomes an explicit airport list you choose from external route sources; say which airports you included.
- Departure and return airport sets are hard endpoints; intermediate destinations are open and borders do not limit them.
- Search and
recordevery priced leg as its own quote as you go (workflow §2), including legs you will not use yet; the feedback ranks legs by km per currency and shows how far a loop is from the user's efficiency gate. Readclockfor each observation'scaptured_at. - Propose promising next destinations and return connections from external route and fare sources. When you have a complete loop,
combineits saved Offers with a reason. Challenge the best loop with new intermediates, structures and dates (workflow §3). deliver, then answer as in workflow §6.
Loop specifics:
- Efficiency = distance / price in base currency. Record distance (
distance_km) with its source; missing distance or FX means unknown efficiency. - A joint fare covering several legs counts once; never rank a loop by one cheap leg.
- Disclose separate-ticket and transit risks; unknown transit permission stays unknown.