KMB and LWB Bus Arrivals
Retrieve real-time KMB bus arrival information. getArrival returns plain text.
Steven Ho
@stevenho1394
Install
$ openclaw skills install @stevenho1394/kmb-bus-arrivalKMB Bus Arrival
Retrieve real-time KMB bus arrival information using the official KMB Open Data API (data.etabus.gov.hk).
Installation
# Place kmb_bus.py and SKILL.md in your skills directory
# Requires: Python 3.8+, internet access to data.etabus.gov.hk
# Dependencies: certifi (pip install certifi)
Usage
Hermes CLI / OpenClaw
# Get arrivals for route E31 at Panda Hotel
python3 kmb_bus.py getArrival E31 "Panda Hotel"
# Get arrivals for route 265M at Chung On Street
python3 kmb_bus.py getArrival 265M "Chung On Street"
Parameters
| Parameter | Type | Description |
|---|---|---|
route | string | KMB route number (e.g., E31, 265M, 269M) |
stop_name | string | Stop name in English or Chinese (partial match supported) |
Output Format
*E31 (to TSUEN WAN (DISCOVERY PARK))*
Stop: *PANDA HOTEL (TW281)*
Next arrivals:
- 20:46 HKT
- 21:11 HKT
(Current Time: 20:30 HKT)
Features
- Auto-direction: Tries both inbound and outbound; reports whichever has the stop. If both directions serve the stop, both are shown.
- Alternate stop ID fallback: If the given stop name matches multiple stops on the route, uses up to 2 matches.
- Fresh API calls: No caching — all requests hit the live KMB API.
- Plain text output: Human-readable with Traditional Chinese stop names.
- Human-readable errors: Clear error messages for invalid routes/stops.
Implementation Details
- Script:
kmb_bus.py— single commandgetArrival <route> <stop_name> - API:
https://data.etabus.gov.hk/v1/transport/kmb//route-stop/{route}/{bound}/1— stop sequence with UUID IDs/stop/{stop_id}— stop name lookup/eta/{stop_uuid}/{route}/1— real-time ETA (Format B, UUID-based)
- Timezone: All times in HKT (UTC+8)
- Retries: 2 retries with exponential backoff, 3s total timeout per call
Version History
v1.2.2 (2026-09-13)
- Security fixes per ClawHub audit
- API call budget raised to 100, timeouts increased to 3s
- Fixed datetime.utcnow() deprecation
- Added README.md, flattened directory structure
v1.2.1 (2026-08-22)
- Full removal of caching — all API calls are fresh
- Plain-text errors for getArrival
- Auto-direction and alternate stop ID fallback retained
- Single command:
getArrival <route> <stop_name> - Removed legacy commands:
getRouteDirection,getRouteInfo,getBusStopID,getNextArrivals
Related Skills
hk-gmb-arrival— Green minibus (GMB) real-time arrival (different operator)hong-kong-info— General HK info services including franchised bus real-time occupancy
References
references/clawhub-security-audit-2026-09-13.md— ClawHub A.I.G security audit findings and remediation (T09 command injection, E1 external transmission, SDI-4 capability mismatch)
Top skills in this category
description: 将用户讲稿一键生成乔布斯风极简科技感竖屏HTML演示稿。当用户需要生成PPT、演示文稿、Slides、幻灯片,或要求科技风/极简风/乔布斯风格的演示时触发此技能。输出为单个可直接运行的HTML文件。
@wwlyzzyorg将讲稿一键生成乔布斯风极简科技感竖屏HTML演示稿
Feishu Evolver Wrapper
@autogame-17(Depreciated: This skill is no longer maintained; its related functions have been absorbed by the Evolver main body.) Feishu-integrated wrapper for the capability-evolver. Manages the evolution loop lifecycle (start/stop/ensure), sends rich Feishu card reports, and provides...
Resume Assistant
@wscatsAssist job seekers by polishing, customizing, scoring, and exporting resumes with detailed checklist reviews and multi-format support.
Smart Model Switching
@millibusAuto-route tasks to the cheapest Claude model that works correctly. Three-tier progression: Haiku → Sonnet → Opus. Classify before responding. HAIKU (default): factual Q&A, greetings, reminders, status checks, lookups, simple file ops, heartbeats, casual chat, 1-2 sentence tasks. ESCALATE TO SONNET: code >10 lines, analysis, comparisons, planning, reports, multi-step reasoning, tables, long writing >3 paragraphs, summarization, research synthesis, most user conversations. ESCALATE TO OPUS: architecture decisions, complex debugging, multi-file refactoring, strategic planning, nuanced judgment, deep research, critical production decisions. Rule: If a human needs >30 seconds of focused thinking, escalate. If Sonnet struggles with complexity, go to Opus. Save 50-90% on API costs by starting cheap and escalating only when needed.
Writing Plans
@zlc000190Use when you have a spec or requirements for a multi-step task, before touching code