/natbag:natbag [departures|arrivals|LY001|delayed|weather <city>|history <airline>]from natbag
This skill should be used when the user asks about "Ben Gurion airport", "TLV flights", "flight status", "departures from Tel Aviv", "arrivals at TLV", "is my flight on time", "flight to Amsterdam", "airport delays", "cancelled flights", "gate info", "terminal 3", "pickup from airport", "weather at destination", "flight delay history", "נתב״ג", "טיסות", "לוח טיסות", "מצב טיסה". Provides live flight data from Ben Gurion Airport (TLV), destination weather via Open-Meteo, and historical delay analysis via local SQLite database. Do NOT use for booking flights, non-TLV airports, or general travel planning.
Ships in natbag. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Live flight data, destination weather, and historical analysis for Ben Gurion Airport (TLV/LLBG). Data from Israel's open data portal (data.gov.il), covering a rolling ~3-day window.
Show step progress to the user as each step runs:
python3 SKILL_DIR/scripts/snapshot.py; it self-guards to once dailyquery_flights.py with appropriate filtersNot all steps run every time. Skip steps that aren't relevant to the query:
Display each step label before running it so the user sees progress.
~/.natbag/flights.db — accumulated via daily snapshotsThe invocation workflow runs snapshot.py before querying, so the refresh works in Claude Code, Codex, Grok, and Cursor. Claude Code and Grok also use the bundled PreToolUse hook to prewarm the same snapshot; the script's once-daily guard makes both paths safe. On first run, it copies the shipped data/db.db (airlines + airports) to ~/.natbag/flights.db, adds the flights table, and fetches live flights. On subsequent runs, it skips if it already ran today or if the user disabled snapshots.
After the first invocation, inform the user: "Natbag initialized. Flight data and IATA reference loaded. Historical data will accumulate automatically on each use. To disable daily snapshots, set daily_snapshot: false in ~/.natbag/config.json."
Replace SKILL_DIR with the resolved path to this skill's directory (where this SKILL.md lives).
Use the composable query_flights.py script for live API queries:
python3 SKILL_DIR/scripts/query_flights.py --departures --date YYYY-MM-DD
python3 SKILL_DIR/scripts/query_flights.py --arrivals --date YYYY-MM-DD --upcoming
python3 SKILL_DIR/scripts/query_flights.py --arrivals --airline LY --date YYYY-MM-DD
python3 SKILL_DIR/scripts/query_flights.py --destination JFK --upcoming
python3 SKILL_DIR/scripts/query_flights.py --flight LY001
python3 SKILL_DIR/scripts/query_flights.py --status DELAYED
python3 SKILL_DIR/scripts/query_flights.py --search "London"
Flags can be combined. All scripts return JSON — Claude handles formatting for the user.
CRITICAL: Always use
--date YYYY-MM-DDwhen counting or listing flights for a specific day. Without it, the API returns a rolling ~3-day window, inflating counts. When--dateis set, the script automatically pages through all API results before filtering, so counts are accurate. ReplaceYYYY-MM-DDwith the actual date (e.g.,2026-04-03).
For raw API access, use curl directly — see references/api.md for filter patterns.
The local DB at ~/.natbag/flights.db includes airlines and airports tables (from data/db.db) for resolving user input:
python3 SKILL_DIR/scripts/query_history.py --airline-lookup "El Al"
python3 SKILL_DIR/scripts/query_history.py --airports London
Then query each relevant code (LHR, LGW, STN, LTN, LCY) or use full-text search --search London.--search 001 to match across all airlines.--search לונדון. Supports partial prefix matching (e.g., --search לונ finds לונדון).--search, or check if the city has multiple airport codes.query_flights.py returns clean JSON with these fields:
| Field | Content |
|---|---|
| flight | Airline code + number (e.g., "LY 1008") |
| airline | Airline full name |
| date | Scheduled date (YYYY-MM-DD) |
| time | Scheduled time (HH:MM) |
| updated_time | Actual/updated time (compare with time to detect delays) |
| direction | "departure" or "arrival" |
| city / city_he | City name (English / Hebrew) |
| country / country_he | Country (English / Hebrew) |
| airport | IATA airport code |
| terminal | Terminal number |
| gate | Gate assignment (null if unassigned) |
| checkin_zone | Check-in zone (null if N/A) |
| status / status_he | Flight status (English / Hebrew) |
Full field reference and curl examples: see references/api.md. For complete output examples: see examples/ (departure board, single flight, historical stats).
After showing flight info, offer weather at the destination. Uses Open-Meteo (free, no key).
Steps:
city field from the flight JSON (e.g., "BERLIN")curl -s 'https://geocoding-api.open-meteo.com/v1/search?name={city}&count=1'latitude and longitude from results[0]curl -s 'https://api.open-meteo.com/v1/forecast?latitude={lat}&longitude={lon}¤t_weather=true'Open-Meteo returns the most populated city match, so "Berlin" → Berlin Germany (not Berlin NH). Tested and correct for all TLV route cities.
Weather codes: 0=Clear, 1-3=Partly cloudy, 45/48=Fog, 51-55=Drizzle, 61-65=Rain, 71-75=Snow, 80-82=Showers, 95=Thunderstorm.
Use the composable query_history.py script for historical queries:
python3 SKILL_DIR/scripts/query_history.py --coverage # data range
python3 SKILL_DIR/scripts/query_history.py --ontime # all airlines
python3 SKILL_DIR/scripts/query_history.py --ontime --airline LY # specific airline
python3 SKILL_DIR/scripts/query_history.py --delays --route JFK # delays by route
python3 SKILL_DIR/scripts/query_history.py --cancellations # cancellation rates
python3 SKILL_DIR/scripts/query_history.py --airports London # multi-airport lookup
python3 SKILL_DIR/scripts/query_history.py --airline-lookup "Wizz" # airline code lookup
Add --days N to change the lookback period (default: 30). All output is JSON.
Track how flights evolve over time — status changes, time updates, gate reassignments:
python3 SKILL_DIR/scripts/query_history.py --flight-history LY001 # all changes for a flight
python3 SKILL_DIR/scripts/query_history.py --delay-patterns # when are delays announced?
python3 SKILL_DIR/scripts/query_history.py --delay-patterns --airline LY # per-airline patterns
python3 SKILL_DIR/scripts/query_history.py --status-transitions # status paths (e.g., DELAYED -> CANCELED)
Change history accumulates from version 1.1.0 onward. Older flights (captured before the upgrade) will not have change records.
Use --flight-history when the user asks about a specific flight's progression. Use --delay-patterns when they ask about how early delays are typically announced. Use --status-transitions when they ask about flights that were delayed then cancelled, or other status paths.
If the database doesn't exist or is empty, inform the user: "Historical data accumulates from install date via daily snapshots. Run python3 SKILL_DIR/scripts/snapshot.py --force to start collecting now."
For custom SQL queries, use sqlite3 ~/.natbag/flights.db directly. The DB also has airlines, airports, and flight_changes tables for JOINs. See references/api.md for query patterns.
Ben Gurion Departures — March 21, 2026
Time Flight Airline To Gate Status
14:10 LY 001 El Al London (LHR) B2-B4 ON TIME
14:30 IZ 1511 Arkia Larnaca (LCA) G11 DELAYED → 15:04
15:00 6H 996 Israir Amsterdam (AMS) — CANCELED
date + timeupdated_time— for null gate/checkin_zone valuesFlight LY 001 — El Al Israel Airlines
Route: Tel Aviv (TLV) → London Heathrow (LHR)
Scheduled: 14:10 | Updated: 14:10
Terminal: 3 | Gate: B2-B4 | Check-in: B
Status: ON TIME
London Weather: 12°C, Partly Cloudy, Wind 15 km/h
El Al to JFK — Last 30 Days (from local DB)
Total: 28 | On time: 19 (68%) | Avg delay: 22 min
Cancellations: 1 (3.6%)
When the user writes in Hebrew, respond in Hebrew and use the Hebrew fields from the JSON:
city_he instead of citycountry_he instead of countrystatus_he instead of statusלוח טיסות נתב"ג — יציאות / הגעותupdated_time instead of timeupdated_time > time, calculate and show delay duration in minutes~/.natbag/config.json by setting daily_snapshot: falseThe scripts/snapshot.py script fetches current flights and stores them in SQLite:
python3 SKILL_DIR/scripts/snapshot.py --force to run manually anytimedaily_snapshot: false in ~/.natbag/config.jsondata/db.db (airlines + airports) to ~/.natbag/flights.dbSTATUS instead of CHRMINE.--date YYYY-MM-DD to filter. Without it, "how many flights today?" will return 3x the real number. This has caused wrong answers repeatedly.filters={"CHRMINE":"delayed"} returns 0 results silently — use "DELAYED". Same for airline codes: "ly" → no results, "LY" → works.curl hangs, retry once. Error: curl: (28) Operation timed out — fix with curl -s --max-time 30.{"success": false, "error": {"__type": "Not Found Error", "message": "לא נמצא: Resource was not found."}}. Fix: verify the resource_id constant hasn't changed.{"success": false, "error": {"filters": ["Cannot parse JSON"], "__type": "Validation Error"}}. Fix: ensure filters value is valid JSON with properly escaped quotes in the URL."total": 0 with "success": true means the filter matched nothing — not an error. Check: is the value uppercase? Is the field name correct? Is the flight within the 3-day window?CHCINT and CHCKZN are often null for flights >24h away or for arrivals. Don't treat null gate as an error.LEARNINGS.md (opens in a new tab)data/db.db (opens in a new tab)examples/departure-board.md (opens in a new tab)examples/historical-stats.md (opens in a new tab)examples/single-flight.md (opens in a new tab)references/api.md (opens in a new tab)scripts/query_flights.py (opens in a new tab)scripts/query_history.py (opens in a new tab)scripts/snapshot.py (opens in a new tab)scripts/ssl_fallback.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub omriariav/omri-marketplace --plugin natbag