Metra Chicago Commuter Rail for Openclaw

A powerful AI agent skill for accessing real-time Chicago Metra arrivals, vehicle tracking, and service alerts via GTFS-RT feeds.

brianleach
v1.0.0
Feb 23, 2026
0
1.3k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install metra

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install metra using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Metra Chicago Commuter Rail?

The Metra skill provides comprehensive access to the Chicago metropolitan area's commuter rail network. By leveraging official GTFS Realtime (GTFS-RT) protobuf feeds and static schedule data, this tool enables developers and AI agents to query live train positions, arrival predictions, and detailed fare information across all 11 Metra lines.

Whether you are building a personal productivity bot or a travel assistant, this integration with Openclaw Skills ensures you have the most accurate transit data at your fingertips. It covers the entire six-county northeastern Illinois region, providing data for major hubs like Union Station and Ogilvie Transportation Center.

Metra Chicago Commuter Rail Use Cases

  • Monitoring real-time train arrivals at specific stations like Union Station or Naperville.
  • Checking for service alerts, delays, or construction notices before heading to the platform.
  • Calculating fares and identifying ticket zones for trips between Chicago and suburban stops.
  • Locating active train positions across lines such as the BNSF, UP-NW, or Metra Electric.
  • Accessing static schedules within Openclaw Skills when real-time GPS data is unavailable.

How Metra Chicago Commuter Rail Works

  1. The skill authenticates with the Metra API using a developer-provided Bearer token.
  2. It fetches GTFS-RT protobuf data for trip updates, vehicle positions, and service alerts from official endpoints.
  3. Static schedule data is cached locally to provide fallback information and station metadata during offline periods.
  4. User queries are parsed to identify specific lines, stations, or directions (inbound vs. outbound).
  5. The skill returns formatted transit intelligence, including 12-hour arrival times, train numbers, and terminal information.

Metra Chicago Commuter Rail Setup

Register for a free API key at the Metra developer portal and configure your environment variables to work with Openclaw Skills.

# Set your API key
export METRA_API_KEY="your_key_here"

# Install dependencies (requires Node.js and protobufjs)
npm install

# Initialize the GTFS static data cache
node scripts/metra.mjs refresh-gtfs

Metra Chicago Commuter Rail Data Schema & Taxonomy

The skill organizes transit data using a local cache for static schedules and real-time streams for dynamic updates. It follows the standard GTFS-RT schema to ensure data integrity.

Data Component Source Type Local Storage Path
GTFS Static ZIP Archive ~/.metra/gtfs/
Trip Updates GTFS-RT Protobuf In-memory (Live)
Service Alerts GTFS-RT Protobuf In-memory (Live)
Vehicle Positions GTFS-RT Protobuf In-memory (Live)

Metra Chicago Commuter Rail Advanced Features

  • Automatic fallback to static schedules if real-time GPS data is interrupted or unavailable at terminals.
  • Multi-line filtering support using specific line codes like UP-N, BNSF, and ME.
  • Geospatial stop discovery using the --near coordinate search feature for location-aware requests.
  • Detailed fare calculation engine based on the February 2024 4-zone system including special pass info.
  • Comprehensive service alert monitoring that distinguishes between active and expired notices within Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*