← 返回 Skills 市场
stevenho1394

KMB and LWB Bus Arrivals

作者 Steven Ho · GitHub ↗ · v1.1.7 · MIT-0
cross-platform ✓ 安全检测通过
343
总下载
0
收藏
0
当前安装
9
版本数
在 OpenClaw 中安装
/install kmb-bus-arrival
功能描述
Get real-time KMB bus arrival times by route, direction, and stop using the official API for accurate next bus ETAs.
使用说明 (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
安全使用建议
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).
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install kmb-bus-arrival
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /kmb-bus-arrival 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug kmb-bus-arrival
版本 1.1.7
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 9
常见问题

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. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 343 次。

如何安装 KMB and LWB Bus Arrivals?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install kmb-bus-arrival」即可一键安装,无需额外配置。

KMB and LWB Bus Arrivals 是免费的吗?

是的,KMB and LWB Bus Arrivals 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

KMB and LWB Bus Arrivals 支持哪些平台?

KMB and LWB Bus Arrivals 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 KMB and LWB Bus Arrivals?

由 Steven Ho(@stevenho1394)开发并维护,当前版本 v1.1.7。

💬 留言讨论