home / skills / openclaw / skills / aviationstack-flight-tracker

aviationstack-flight-tracker skill

/skills/copey02/aviationstack-flight-tracker

This skill tracks flights in real time and presents status, gates, delays, and live position in a clear, Flighty-style view for quick updates.

npx playbooks add skill openclaw/skills --skill aviationstack-flight-tracker

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
2.8 KB
---
name: flight-tracker
version: 1.0.0
description: Track flights in real-time with detailed status, gate info, delays, and live position. Use when user asks to track a flight, check flight status, look up flight information by flight number (e.g., "track AA100", "what's the status of United 2402", "check my flight BA123"), or wants to display flight data in a formatted view similar to Flighty app.
---

# Flight Tracker

Track any flight worldwide using AviationStack API and display in a clean, Flighty-style format.

## Quick Start

Track a flight by its IATA code:

```bash
scripts/track_flight.py AA100
scripts/track_flight.py UA2402
scripts/track_flight.py BA123
```

## First-Time Setup

Before using this skill, you need an API key (one-time setup):

1. **Get a free API key** at https://aviationstack.com/signup/free (100 requests/month)
2. **Set environment variable:**
   ```bash
   export AVIATIONSTACK_API_KEY='your-key-here'
   ```
3. **Install dependencies:**
   ```bash
   pip3 install requests
   ```

For detailed setup instructions, see [api-setup.md](references/api-setup.md).

## Output Format

The skill displays flight information in a clean, readable format with:

- âœˆī¸ Airline and flight number
- đŸ›Šī¸ Aircraft type and registration
- đŸ›Ģ Departure airport, terminal, gate, times
- đŸ›Ŧ Arrival airport, terminal, gate, times
- 📊 Flight status with visual indicators
- âąī¸ Delay calculations (if applicable)
- 🌐 Live position, altitude, speed (when airborne)

Status indicators:
- đŸŸĸ Active/Airborne/En-route
- ✅ Landed/Arrived
- 🟡 Scheduled
- 🟠 Delayed
- 🔴 Cancelled

## Advanced Usage

**Get raw JSON data:**
```bash
scripts/track_flight.py AA100 --json
```

**Check help:**
```bash
scripts/track_flight.py --help
```

## Workflow

When a user asks to track a flight:

1. Extract the flight number from the request
2. Run the tracking script with the flight number
3. Present the formatted output to the user
4. If data is needed for further processing, use `--json` flag

## Flight Number Formats

Accept IATA flight codes:
- AA100 (American Airlines)
- UA2402 (United)
- BA123 (British Airways)
- DL456 (Delta)

The script automatically converts to uppercase and handles the lookup.

## Error Handling

The script handles common errors:
- Missing API key → Shows setup instructions
- Flight not found → Suggests verification
- API errors → Displays error message
- Rate limit exceeded → Indicates limit reached

## API Limits

Free tier: 100 requests/month. Track usage to stay within limits. For heavy usage, consider upgrading or alternative APIs (see references/api-setup.md).

## Notes

- Uses AviationStack free tier (no HTTPS on free plan)
- Real-time data updated frequently
- Historical flight data available
- Worldwide coverage (250+ countries, 13,000+ airlines)

Overview

This skill tracks flights in real time and presents a clean, Flighty-style status view including gate info, delays, and live position. It uses AviationStack to fetch flight status, aircraft details, departure/arrival times, and position data. The output is formatted for quick reading or as raw JSON for downstream processing.

How this skill works

The skill accepts an IATA flight code (e.g., AA100, UA2402, BA123), normalizes the input, and queries the AviationStack API for the latest status and telemetry. It parses response fields for airline, aircraft, terminals, gates, scheduled/actual times, delay calculations, and live position when available. Results are shown with visual status indicators and can be emitted as structured JSON with a --json flag.

When to use it

  • User asks to track or monitor a specific flight by number
  • Check current status before leaving for the airport
  • Display flight details in a dashboard or messaging app
  • Verify gate, terminal, or estimated arrival time
  • Troubleshoot discrepancies between airline info and live position

Best practices

  • Provide the full IATA flight code (airline + number) for fastest lookup
  • Set and verify your AVIATIONSTACK_API_KEY environment variable before use
  • Use the --json option when integrating output into other tools or dashboards
  • Track request usage to avoid hitting the free-tier 100 requests/month limit
  • Fallback to airline/web sources if the API returns rate-limit or HTTPS restrictions

Example use cases

  • Quickly check "track AA100" to see if a flight is airborne, delayed, or landed
  • Show gate and terminal details before pickup or drop-off
  • Embed --json output into a bot that notifies users of status changes
  • Use live position, altitude, and speed to visualize a flight on a map
  • Run scheduled checks to alert on delays or cancellations for a set of flights

FAQ

What flight number formats are accepted?

IATA flight codes like AA100, UA2402, BA123. The skill uppercases and normalizes input automatically.

What happens if the API key is missing or rate-limited?

The skill displays setup instructions when the API key is missing and shows an explicit message if the API rate limit or other errors occur; consider upgrading the API plan for heavier use.

Can I get raw JSON for automation?

Yes. Use the --json flag to return the raw API response for integration into dashboards or other tools.