← Back to Skills Marketplace
stevenho1394

KMB and LWB Bus Arrivals

by Steven Ho · GitHub ↗ · v1.1.7 · MIT-0
cross-platform ✓ Security Clean
343
Downloads
0
Stars
0
Active Installs
9
Versions
Install in OpenClaw
/install kmb-bus-arrival
Description
Get real-time KMB bus arrival times by route, direction, and stop using the official API for accurate next bus ETAs.
README (SKILL.md)

name: kmb-bus-arrival description: Retrieve real-time KMB bus arrival information. getNextArrivals returns plain text; other tools return JSON. version: 1.1.7 author: Steven Ho repository: https://github.com/StevenHo1394/kmb-bus-arrival tools:

  • name: getRouteDirection description: List available travel directions for a KMB route. Returns JSON. command: python3 kmb_bus.py getRouteDirection {route} inputSchema: type: object required: [route] properties: route: type: string output: format: json

  • name: getRouteInfo description: Get the list of stops for a route with sequence numbers. Returns JSON. command: python3 kmb_bus.py getRouteInfo {route} {direction} inputSchema: type: object required: [route, direction] properties: route: type: string direction: type: string enum: ["outbound", "inbound"] output: format: json

  • name: getBusStopID description: Find bus stop ID(s) by name (Chinese or English). Returns JSON. command: python3 kmb_bus.py getBusStopID {name} inputSchema: type: object required: [name] properties: name: type: string output: format: json

  • name: getNextArrivals description: Get the next bus arrival times for a specific route/direction/stop. Returns plain text. command: python3 kmb_bus.py getNextArrivals {route} {direction} {stopId} inputSchema: type: object required: [route, direction, stopId] properties: route: type: string direction: type: string enum: ["outbound", "inbound", "auto"] stopId: type: string output: format: text

Implementation:

  • getNextArrivals output:

    *Route (To Destination)*
    
    Stop: *Human Readable Stop Name*
    
    Next arrivals:
    - HH:MM HKT
    - HH:MM HKT
    

    If direction="auto" and the stop is served in both directions, multiple blocks are printed.

  • Auto-direction: direction="auto" tries both inbound and outbound; reports whichever has the stop. If both, both are shown.

  • Alternate stop ID fallback: If the given stop ID is not found on the route, the skill searches the route's stop list for a stop whose Chinese or English name matches the intended location and uses that stop's ID instead.

  • All tools except getNextArrivals return JSON.

  • Errors: getNextArrivals prints human-readable messages; other tools return JSON with an error field.

version: 1.1.7 changes:

  • Full removal of caching — all API calls are fresh
  • Plain-text errors for getNextArrivals; JSON errors for other tools
  • Auto-direction and alternate stop ID fallback retained
  • Docs aligned with code
Usage Guidance
This package appears coherent and limited to fetching KMB data from the official data.etabus.gov.hk API. Before installing, confirm you trust the included code (kmb_bus.py) and the publisher since the registry metadata lacks a homepage; review the rest of the script (the file was truncated in the provided bundle summary) to be certain there are no unexpected network calls or file operations. Also ensure your environment allows outbound HTTPS to data.etabus.gov.hk and be aware this version intentionally removes caching (it will make fresh API calls each invocation).
Capability Analysis
Type: OpenClaw Skill Name: kmb-bus-arrival Version: 1.1.7 The kmb-bus-arrival skill is a legitimate tool for retrieving real-time bus information from the official Hong Kong Data Hub API (data.etabus.gov.hk). The implementation in kmb_bus.py uses standard Python libraries, includes strict regex-based input validation for routes and stop IDs, and lacks any indicators of malicious intent, such as data exfiltration, unauthorized execution, or prompt injection.
Capability Assessment
Purpose & Capability
Name/description (KMB bus arrivals) match what the code and SKILL.md do: they call the official Hong Kong Data Hub endpoints to list routes, stops, and ETAs. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
Runtime instructions simply invoke the bundled Python script with explicit arguments. The script only performs network calls to data.etabus.gov.hk and does not read credentials, arbitrary files, or send data to other endpoints. Error handling and timeouts are present.
Install Mechanism
No install spec — instruction-only skill with a pure-Python script (standard library). Nothing is downloaded or extracted at install time.
Credentials
No environment variables or secrets are required. The network access requested (the official KMB data API host) is proportional to the stated purpose.
Persistence & Privilege
always is false and the skill does not request system-wide configuration changes or persistent credentials. It does not modify other skills or agent settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install kmb-bus-arrival
  3. After installation, invoke the skill by name or use /kmb-bus-arrival
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.7
- Full removal of caching — all API calls are fresh - Plain-text errors for getNextArrivals; JSON errors for other tools - Auto-direction and alternate stop ID fallback retained - Documentation aligned with current code behavior
v1.1.6
- Updated tool input parameters: getRouteInfo and getNextArrivals now accept only "outbound", "inbound", or "auto" for direction. - Removed markdown-style formatting details from the description and documentation. - Simplified and clarified tool and implementation descriptions. - Documentation for all tools and error handling improved for clarity. - Minor text and structure adjustments for better consistency.
v1.1.5
Version 1.1.5 — All caching removed and code simplified - Removed all data caching; every API call now fetches fresh information. - getNextArrivals and error handling updated for consistent, plain-text messages. - Documentation and tool descriptions revised to align with new no-caching behavior. - No additional dependencies required; still uses Python standard library only.
v1.1.4
- Clarified tool outputs: getNextArrivals now always returns plain text formatted for direct messaging; other tools return JSON. - Caching for all API responses standardized to 30 minutes for stop lists and route data. - getNextArrivals tool description and output updated: always outputs human-readable text, never raw stop IDs or JSON. - Documentation improved and implementation notes updated to match actual tool behavior and error handling.
v1.1.3
v1.1.3 summary: Improves output clarity, error handling, and security. - Fixed mismatches between actual output and documentation. - getNextArrivals now always returns human-friendly plain text (never JSON, never raw stop IDs) for direct messaging. - Removed direction labels from outputs for simplicity and clarity. - All errors now return plain text messages. - Improved security hardening for safer handling of inputs and outputs.
v1.1.2
**Plain text output and usability improvements:** - Outputs (e.g. bus arrival times) are now presented in plain text, suitable for direct messaging. - Never exposes raw stop IDs to users; shows only stop names. - Now supports flexible/shorter stop ID formats. - Implementation is pure Python (no external dependencies required). - Previous 16-character strict stop ID validation removed.
v1.1.1
**v1.1.1 is a security-focused update with improved caching and stop ID validation.** - Added security hardening measures to the skill. - Adjusted cache time-to-live: stop list is now cached for 30 minutes. - Enabled fast 3-retry logic for API requests, each completing in ≤5 seconds. - Enforced strict stop ID validation, allowing only IDs up to 16 characters. - Added openclaw.plugin.json for plugin compatibility.
v1.1.0
-Security fixes from previous version (v1.0.0) - Removed unused file kmb_bus.sh from the skill. - No changes to skill functionality, usage, or API commands. - Version updated to 1.1.0 for housekeeping and cleanup.
v1.0.0
Initial release of kmb-bus-arrival skill: - Provides real-time KMB bus arrival times using the official Data Hub API. - Includes tools to list route directions, get stop sequences for a route, search bus stop IDs by name, and fetch next bus arrivals for a stop. - Handles both English and Chinese stop names. - Robust error handling and local caching to minimize API calls.
Metadata
Slug kmb-bus-arrival
Version 1.1.7
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 9
Frequently Asked Questions

What is KMB and LWB Bus Arrivals?

Get real-time KMB bus arrival times by route, direction, and stop using the official API for accurate next bus ETAs. It is an AI Agent Skill for Claude Code / OpenClaw, with 343 downloads so far.

How do I install KMB and LWB Bus Arrivals?

Run "/install kmb-bus-arrival" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is KMB and LWB Bus Arrivals free?

Yes, KMB and LWB Bus Arrivals is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does KMB and LWB Bus Arrivals support?

KMB and LWB Bus Arrivals is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created KMB and LWB Bus Arrivals?

It is built and maintained by Steven Ho (@stevenho1394); the current version is v1.1.7.

💬 Comments