UK Trains for Openclaw

A high-performance utility for querying UK National Rail live departure boards, arrivals, and service disruptions via the Darwin API.

jabbslad
v1.0.0
Jan 26, 2026
2
2.7k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install uk-trains

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 uk-trains 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 UK Trains?

The UK Trains skill is a specialized integration designed to fetch live rail data across the Great Britain rail network. By leveraging the Darwin/Huxley2 API, this Openclaw Skills component allows developers and AI agents to retrieve precise, up-to-the-minute information on train movements, platform assignments, and service statuses. It bridges the gap between raw transport data and actionable intelligence for travel planning.

Built for speed and accuracy, the skill translates complex National Rail data into structured formats suitable for both CLI environments and automated chat interfaces. Whether you are building a personal travel assistant or a notification bot, this skill provides the essential connectivity to the UK's core rail infrastructure.

UK Trains Use Cases

  • Checking live departures and platform numbers for specific stations like PAD or MAN.
  • Querying the next available train between two specific locations with destination filtering.
  • Monitoring arrival times and service delays for inbound commuters.
  • Searching for 3-letter CRS station codes using partial station names.
  • Generating compact, emoji-rich travel updates for mobile messaging platforms like WhatsApp.

How UK Trains Works

  1. The user provides a command specifying departures, arrivals, or a station search.
  2. The skill identifies the 3-letter CRS code for the target station (e.g., EUS for London Euston).
  3. An authenticated request is sent to the National Rail Darwin API using the configured access token.
  4. The API returns real-time journey data, including scheduled vs. expected times and cancellation reasons.
  5. The skill processes this data and outputs a clean JSON response or a formatted message template.

UK Trains Setup

To use this Openclaw Skills integration, follow these steps:

  1. Register for a free Darwin API token at: https://realtime.nationalrail.co.uk/OpenLDBWSRegistration/
  2. Set your environment variable:
export NATIONAL_RAIL_TOKEN='your_token_here'
  1. Alternatively, configure the key in your configuration file under skills.entries.uk-trains.apiKey.
  2. Run a test search to verify connectivity:
./scripts/trains.py search paddington

UK Trains Data Schema & Taxonomy

The skill returns structured JSON data with the following primary schema:

Field Description
locationName Full name of the station being queried.
crs The 3-letter Station Code.
trainServices A list of service objects containing std (scheduled time), etd (estimated time), and platform.
operator The Train Operating Company (TOC) managing the service.
isCancelled Boolean indicating if the service has been removed from the schedule.
delayReason Textual description of why a service is running late.

UK Trains Advanced Features

  • Multi-call matching: Automatically calculates arrival times at destinations by matching service IDs between departure and arrival boards.
  • Compact Message Templating: Includes a built-in UI template for WhatsApp/chat responses using mobile-friendly emojis and bold formatting.
  • Intelligent CRS Lookup: Allows users to find the correct station codes using natural language search queries.
  • Service Disruption Alerts: Extracts specific cancelReason and delayReason metadata for high-quality user notifications.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*