nz-trains

Query live Wellington Metlink train arrivals, delays, positions, and alerts via CLI.

24|6|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/thecolab-ai/.skills --skill nz-trains
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nz-trains
Source: https://github.com/thecolab-ai/.skills/tree/main/skills/nz-trains
Command: npx skills add https://github.com/thecolab-ai/.skills --skill nz-trains

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill turns Wellington Metlink train GTFS and GTFS-RT data into agent-friendly, structured results, so you can answer questions about next arrivals, live vehicle positions, and service alerts without manual browsing or reverse engineering.

Core Features & Use Cases

  • Next arrivals & station lookup: Query next train arrivals for a Wellington-area stop (including station parent stops) with structured timing and delay info.
  • Operational status: Fetch current line delays (late/cancelled), live vehicle positions (lat/lon), and active service alerts with translated text.
  • Line-focused summaries: Produce a quick snapshot of all Wellington train lines with counts for vehicles, delays, cancellations, and alerts.

Quick Start

Ask for the next Wellington train arrivals at a stop by running the nz-trains CLI command: python3 skills/nz-trains/scripts/cli.py arrivals WELL --json.

Frequently Asked Questions about nz-trains

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get live Wellington train arrivals and delays using GTFS-RT?

You can retrieve live Wellington train arrivals and delays by executing the nz-trains CLI, which wraps Metlink GTFS-RT endpoints into structured JSON output. Run the script with a station code like WELL to get real-time timing and delay data for your specified stop.

Do I need an API key to fetch Metlink GTFS real-time data?

Yes, fetching Metlink GTFS real-time data requires the METLINK_API_KEY environment variable to be set. The Skill performs read-only HTTP GET requests to the Metlink Open Data API using this key to authenticate and return train arrivals, alerts, and vehicle positions.

Can I get machine-readable JSON for Wellington train data to use in agent workflows?

Yes, the CLI supports machine-readable JSON output designed for agent chaining and automated workflows. Adding the JSON flag to your station or line query returns structured Wellington Metlink train data including arrivals, delays, and vehicle positions for downstream processing.

What's the best way to check Metlink service alerts and cancellations for Wellington train lines?

The best way to check Metlink service alerts and cancellations is using the CLI line-focused summary feature. It aggregates current counts for delays, cancellations, and active alerts across all Wellington train lines, returning translated alert text in structured JSON format.

Does the GTFS wrapper support queries for specific Wellington train lines like Kapiti and Hutt Valley?

Yes, the GTFS wrapper supports station and line scoped queries for Johnsonville, Kapiti, Hutt Valley, Melling, and Wairarapa lines. You can filter next arrivals, live vehicle positions, and service alerts to a specific train route scope using the CLI.