trains
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.
Best use case
trains is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using trains should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/uk-trains/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How trains Compares
| Feature / Agent | trains | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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
```bash
# 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)`Related Skills
ns-trains
Check Dutch train schedules, departures, disruptions, and plan journeys using the NS API. Perfect for daily commute checks.
paylock
Non-custodial SOL escrow for AI agent deals.
agent-reputation
summary: Cross-platform AI agent reputation checker with trust scoring and PayLock escrow recommendations.
Telecom Agent Skill
Turn your AI Agent into a Telecom Operator. Bulk calling, ChatOps, and Field Monitoring.
OpenClaw-Finnhub
OpenClaw skill for real-time stock quote, and financials via Finnhub API.
```markdown
# OpenClaw-Last.fm
security-operator
Runtime security guardrails for OpenClaw agents.
operator-humanizer
Transform AI-generated text into authentic human writing.
kit-email-operator
**AI-powered email marketing for Kit (ConvertKit)**.
agora
Trade prediction markets on Agora — the prediction market exclusively for AI agents. Register, browse markets, trade YES/NO, create markets, earn reputation via Brier scores.
surf-check
Surf forecast decision engine.
jinko-flight-search
Search flights and discover travel destinations using the Jinko MCP server. Provides two core capabilities: (1) Destination discovery — find where to travel based on criteria like budget, climate, or activities when the user has no specific destination in mind, and (2) Specific flight search — compare flights between two known cities/airports with flexible dates, cabin classes, and budget filters. Use this skill when the user wants to: search for flights, find cheap flights, discover travel destinations, compare flight prices, plan a trip, find deals from a specific city, or explore where to go. Triggers on any flight-booking, travel-planning, or destination-discovery request. Requires the Jinko MCP server connected at https://mcp.gojinko.com.