imprint-google-flights-live-audit
Skill24 starsChanged 34 days agoMITView on GitHub
Audit and repair generated Google Flights Imprint tools. Use when validating Google Flights search, calendar, booking, airline/bag filters, one-way, round-trip, multi-city, or open-jaw behavior; when investigating `selection_token` or `selected_flights` producer-consumer contracts; or when live audit results are slow, bot-sensitive, under-tested, or incorrectly waived as infrastructure.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- commitSkill
- debug-teachSkill
- imprint-example-refresh-releaseSkill
- imprint-reteach-auditSkill
- imprint-teach-deepdiveSkill
- pr-review-convergenceSkill
- prSkill
- releaseSkill
- commitSkill
- debug-teachSkill
- imprint-auth-compile-logSkill
- imprint-reteach-auditSkill
- imprint-teach-deepdiveSkill
- prSkill
- releaseSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this for generated tools under ~/.imprint/google-flights, especially when search and booking need to prove one-way, round-trip, and …
- Distinctive: line 13
Start from the actual generated tool files, not assumptions:
- Distinctive: line 21
Check these contracts explicitly:
- Very specific: line 35
Call search_flights with trip_type=multi_city and an ordered itinerary like BOM,SFO,2026-09-07;BOS,BOM,2026-10-12.
- Very specific: line 43
Use exact user-requested dates, airports, and carriers.
- Distinctive: line 65
Keep fixes in generated artifacts tight and contract-driven:
- Distinctive: line 68
stop grouping when a later segment returns to the route group origin.
- Very specific: line 70
use structured parsing for selected_flights.
- Distinctive: line 71
keep wording generic: producer-sourced values, selected route groups, booking state.
- Distinctive: line 73
After manual edits, run focused live tests and a full audit:
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Google Flights Live Audit
Use this for generated tools under ~/.imprint/google-flights, especially when search
and booking need to prove one-way, round-trip, and multi-city behavior end to end.
Core Checks
Start from the actual generated tool files, not assumptions:
find ~/.imprint/google-flights -maxdepth 2 -type f | sort
bun test ~/.imprint/google-flights/search_flights/integration.test.ts
bun test ~/.imprint/google-flights/get_flight_booking_options/integration.test.tsCheck these contracts explicitly:
search_flightsemitsselection_tokenandselected_flights.- staged
search_flightsaccepts bothselection_tokenand priorselected_flights. get_flight_booking_optionsreceives the complete orderedselected_flightsarray.- one-way uses a single selected route group.
- round-trip and multi-city group connecting segments into logical route legs.
- open-jaw stays
trip_type=multi_city; do not rewrite it as round trip. - airline filters and bag filters alter the rendered Google request, not only result parsing.
Live Flow
For multi-city/open-jaw, verify the real staged flow:
- Call
search_flightswithtrip_type=multi_cityand an ordered itinerary likeBOM,SFO,2026-09-07;BOS,BOM,2026-10-12. - Pick a first-leg result and call
search_flightsagain with that result'sselection_tokenandselected_flights. - Pass the staged result's complete
selected_flightsarray toget_flight_booking_options. - Confirm booking options include all selected route legs, not just the first leg.
Use exact user-requested dates, airports, and carriers. If the user asks about an
Emirates/Qatar/etc. option, test that carrier with airlines=<code> instead of relying
on the default sorted subset.
Backend Timing
Google Flights usually needs cdp-replay for stateful booking/search flows. Treat cold
CDP startup separately from warm calls:
- first same-site CDP call can cost tens of seconds;
- subsequent pooled calls should be cheap, often a few seconds or less;
- audit budgets should not under-test parameters just because the first call was expensive.
Refresh backend preferences after material tool fixes:
bun run src/cli.ts probe-backends google-flights --tool search_flights --param trip_type=multi_city --param itinerary='SFO,LAX,2026-09-01;LAX,JFK,2026-09-04'
bun run src/cli.ts probe-backends google-flights --tool get_flight_booking_options --param selected_flights='<complete selected_flights JSON>'Manual Repair Rules
Keep fixes in generated artifacts tight and contract-driven:
- group connecting segments by origin/destination continuity and same/next-day dates;
- stop grouping when a later segment returns to the route group origin;
- mint booking state through staged shopping calls before
GetBookingResults; - use structured parsing for
selected_flights; avoid string slicing; - keep wording generic: producer-sourced values, selected route groups, booking state.
After manual edits, run focused live tests and a full audit:
bun test ~/.imprint/google-flights/search_flights/integration.test.ts
bun test ~/.imprint/google-flights/get_flight_booking_options/integration.test.ts
bun run src/cli.ts audit google-flights --provider codex-cli --timeout 45m --out ~/.imprint/google-flights/.audit-report.jsonReport concrete counts from the audit: graded units, invocations, parameters, broken, no-op, infra, bad params, and untestable. Do not summarize "works" without these numbers.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

