🚈 Real-time Hong Kong MTR next-train ETA lookup | 港鐵實時到站時間查詢
Author: Tom FONG (with Usagi - Tom's OpenClaw Agent)
A skill package for OpenClaw and compatible AI agents that provides real-time arrival times for all of the MTR lines in Hong Kong, with fuzzy station matching and bilingual output (zh-HK/en).
| Feature | Description |
|---|---|
| 🚈 Real-time ETA | Live MTR train arrival times from DATA.GOV.HK |
| 🚇 Multi-line | Supports all 10 MTR lines including Airport Express |
| 🎯 Fuzzy Matching | Smart station name matching (e.g., "旺角" matches "Mong Kok") |
| ⚡ Token & Resources Friendly | Lightweight local CSV caching minimizes API calls; concise, data-first output optimized for AI context windows |
| 🌐 Bilingual Output | Traditional Chinese and English support |
clawhub install hk-mtr-next-trainclawhub install https://github.com/tomfong/hk-mtr-next-train-skill --path hk-mtr-next-train --as hk-mtr-next-trainYou are recommended to run the following command once before first use:
python3 {skill_dir}/hk-mtr-next-train/scripts/sync_mtr_stations.pyExample
python3 ~/.openclaw/workspace/skills/hk-mtr-next-train/scripts/sync_mtr_stations.pyWhat this does:
- Downloads MTR stations data from DATA.GOV.HK
- Builds local CSV file (mtr_lines_and_stations.csv) for fast queries
Why is this needed?
- Provides offline station lookup capability
- Enables fuzzy location matching without API calls
- Speeds up subsequent queries significantly
{skill_dir}= skill installation directory, e.g.~/.openclaw/workspace/skills/hk-mtr-next-train
- ✅ Installation instructions
- ✅ Usage examples
- ✅ Feature overview
- ✅ Technical details
- ✅ Changelog
- Technical Reference - Technical architecture and script usage
- SKILL.md - AI agent specification and implementation details
- Scripts Directory - Python scripts source code
This skill is optimized for natural language queries with fuzzy matching capabilities:
Search by:
- Station Names: "Central", "金鐘", "旺角"
- Line Name: "港島線", "東鐵線", "Tuen Ma Line"
Just ask in Cantonese, English, or mixed:
Examples:
- "紅磡站下一班列車?"
- "Next trains at Disneyland Resort?"
- "將軍澳站往康城嘅下一班車?"
The skill supports direct commands for query:
exec python3 {skill_dr}/hk-mtr-next-train/scripts/mtr_eta.py {STATION_NAME} {LINE_NAME(optional)} {LANG(optional)} {TO_STATION(optional)}🚈 會展站的列車班次如下:
東鐵線 🩵
• 1號月台|往羅湖站
19:19(即將到達)、19:23(5分)、19:25(7分)
• 1號月台|往落馬洲站
19:21(3分)
• 2號月台|往金鐘站
19:20(2分)、19:23(5分)、19:25(7分)、19:28(10分)
資料來源:開放數據平台
- Update docs
- Initial release
python3 {skill_dir}/hk-mtr-next-train/scripts/sync_mtr_stations.pyExample
python3 ~/.openclaw/workspace/skills/hk-mtr-next-train/scripts/sync_mtr_stations.py| Requirement | Notes |
|---|---|
| Python 3.x | Main script runtime |
curl |
API calls |
MTR next-train data from APIs of DATA.GOV.HK (開放數據平台)
MIT License - See LICENSE for details.
SIMPLE DEV · SIMPLER WORLD