skills$openclaw/trains
jabbslad6.4kā˜…

by jabbslad

trains – OpenClaw Skill

trains is an OpenClaw Skills integration for coding workflows. Query UK National Rail live departure boards, arrivals, delays, and train services. Use when asked about train times, departures, arrivals, delays, platforms, or "when is the next train" for UK railways. Supports all GB stations via Darwin/Huxley2 API.

6.4k stars5.9k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

nametrains
descriptionQuery UK National Rail live departure boards, arrivals, delays, and train services. Use when asked about train times, departures, arrivals, delays, platforms, or "when is the next train" for UK railways. Supports all GB stations via Darwin/Huxley2 API. OpenClaw Skills integration.
ownerjabbslad
repositoryjabbslad/uk-trains
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @jabbslad/uk-trains
last updatedFeb 7, 2026

Maintainer

jabbslad

jabbslad

Maintains trains in the OpenClaw Skills directory.

View GitHub profile
File Explorer
5 files
.
scripts
trains.py
11.0 KB
trains.sh
7.8 KB
_meta.json
272 B
SKILL.md
2.9 KB
SKILL.md

name: trains description: Query UK National Rail live departure boards, arrivals, delays, and train services. Use when asked about train times, departures, arrivals, delays, platforms, or "when is the next train" for UK railways. Supports all GB stations via Darwin/Huxley2 API.

UK Trains

Query National Rail Darwin API for live train departures and arrivals.

Setup

Requires free Darwin API token:

  1. Register at https://realtime.nationalrail.co.uk/OpenLDBWSRegistration/
  2. Set NATIONAL_RAIL_TOKEN in environment (or configure in skills.entries.uk-trains.apiKey)

Commands

# Departures
./scripts/trains.py departures PAD
./scripts/trains.py departures PAD to OXF --rows 5

# Arrivals  
./scripts/trains.py arrivals MAN
./scripts/trains.py arrivals MAN from EUS

# Station search
./scripts/trains.py search paddington
./scripts/trains.py search kings

Station Codes

Use 3-letter CRS codes:

  • PAD = London Paddington
  • EUS = London Euston
  • KGX = London Kings Cross
  • VIC = London Victoria
  • WAT = London Waterloo
  • MAN = Manchester Piccadilly
  • BHM = Birmingham New Street
  • EDB = Edinburgh Waverley
  • GLC = Glasgow Central
  • BRI = Bristol Temple Meads
  • LDS = Leeds
  • LIV = Liverpool Lime Street
  • RDG = Reading
  • OXF = Oxford
  • CBG = Cambridge

Response Format

JSON with:

  • locationName, crs - Station info
  • messages[] - Service alerts
  • trainServices[] - List of trains:
    • std/sta - Scheduled departure/arrival time
    • etd/eta - Expected time ("On time", "Delayed", or actual time)
    • platform - Platform number
    • operator - Train operating company
    • destination[].name - Final destination
    • isCancelled, cancelReason, delayReason - Disruption info

Message Template

Use this compact format for WhatsApp/chat responses:

šŸš‚ {Origin} → {Destination}

*{dep} → {arr}* ā”‚šŸ“{platform} │ 🚃 {coaches}
{status}

*{dep} → {arr}* ā”‚šŸ“{platform} │ 🚃 {coaches}
{status}

Elements

  • Header: šŸš‚ emoji + origin → destination
  • Time: Bold, departure → arrival times
  • Platform: šŸ“ + number (or "TBC" if unknown)
  • Coaches: 🚃 + space + number
  • Status:
    • āœ… On time
    • āš ļø Delayed (exp {time})
    • āŒ Cancelled — {reason}
    • šŸ”„ Starts here

Example

šŸš‚ Hemel Hempstead → Euston

*20:18 → 20:55* ā”‚šŸ“4 │ 🚃 4
āœ… On time

*20:55 → 21:30* ā”‚šŸ“4 │ 🚃 12
āœ… On time

*21:11 → 21:41* ā”‚šŸ“4 │ 🚃 8
āœ… On time

Getting Arrival Times

To show arrival times, make two API calls:

  1. departures {origin} to {dest} — get departure times + service IDs
  2. arrivals {dest} from {origin} — get arrival times

Match services by the numeric prefix in serviceID (e.g., 4748110HEMLHMP_ matches 4748110EUSTON__).

Notes

  • Separate each service with a blank line
  • Omit coaches if formation data unavailable
  • For delays, show expected time: āš ļø Delayed (exp 20:35)
README.md

No README available.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

FAQ

How do I install trains?

Run openclaw add @jabbslad/uk-trains in your terminal. This installs trains into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/jabbslad/uk-trains. Review commits and README documentation before installing.