| name | airfetch-llm-operator |
| description | Use this skill when the user wants to query flights through the airfetch CLI from an LLM or automation flow. Produces robust command invocations, prefers JSON output for machine consumption, and handles provider selection, limits, and error-aware retries. |
Airfetch LLM Operator
When To Use
Use this skill when a user asks to:
- search flights via CLI
- integrate flight search into an agent/tool pipeline
- get machine-readable flight output for downstream reasoning
- switch between providers (
direct, brightdata, zenrows)
- troubleshoot airfetch command failures
Do not use this skill for UI/browser scraping tasks directly; use airfetch CLI as the interface.
Command Surface
Main commands:
airfetch search (advanced, explicit --leg segments)
airfetch quick (human-friendly shortcut)
airfetch health (provider readiness)
Output modes:
- default: text (human)
- LLM/tooling:
--output json
Workflow
- Validate intent and choose command style:
- simple one-way/round-trip ->
quick
- multi-leg or fine-grained controls ->
search
- Choose provider:
- default
direct
- if blocked/rate-limited, use
brightdata or zenrows
- Prefer bounded payloads for LLMs:
- include
--limit <N> when possible
- For machine pipelines, always use:
- On failure, classify by exit code:
2 validation/input issue
3 provider/network issue
4 parse issue
5 internal issue
Canonical Templates
Quick one-way (LLM JSON)
airfetch quick JFK LAX 2026-04-10 --output json --limit 5
Quick round-trip (LLM JSON)
airfetch quick JFK LAX 2026-04-10 --return 2026-04-17 --output json --limit 5
Advanced multi-leg
airfetch search \
--leg 2026-04-10:JFK:LAX \
--leg 2026-04-14:LAX:SFO \
--leg 2026-04-20:SFO:JFK \
--trip multi-city \
--seat economy \
--adults 1 \
--output json \
--limit 10
Health check before automation runs
airfetch health --output json
Provider Configuration
Direct (default)
No extra variables required.
BrightData
Required:
Optional:
BRIGHT_DATA_API_URL
BRIGHT_DATA_SERP_ZONE
ZenRows
Required:
Optional:
Robustness Rules For LLM Use
- Use ISO date format
YYYY-MM-DD.
- Use IATA codes (
JFK, LAX) in uppercase.
- Add
--limit for predictable token size.
- Prefer
search over quick when user needs airline/stops/passenger detail.
- If provider errors occur, retry with a different provider once.
- Keep
stderr logs separate from stdout JSON in pipeline contexts.
Troubleshooting Map
- Validation errors (
code=2): fix argument format, legs, passenger constraints.
- Provider errors (
code=3): check API keys, proxy, timeout, provider availability.
- Parse errors (
code=4): upstream response shape changed; retry provider then escalate.
- Internal errors (
code=5): rerun with minimal command and collect logs.
Assumptions
airfetch binary is installed and available in PATH.
- Caller can provide required provider credentials when non-direct providers are used.