Token导航 LogoToken导航TokenDH.com
效率需要联网clawhub未标认证来源可访问clear审计通过

hk-bus-eta香港巴士预计到达时间

Agent Skill

hk-bus-eta 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

11,032

周安装

442

GitHub Stars

1

下载量

3,571
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:hk-bus-eta(香港巴士预计到达时间)
来源仓库:https://github.com/tomfong/hk-bus-eta
安装命令:
openclaw skills install hk-bus-eta
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install hk-bus-eta

简介

查询香港巴士实时到站时间,支持模糊站名与多线路并行。

  • 适用于通勤规划与公共交通信息服务。hk-bus-eta 属于效率类 Skill,可作为该场景下的辅助能力补充。
  • 输出中英双语,适配本地与国际用户需求。适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。
  • 数据来源于运输机构,可能存在分钟级误差。
  • 建议结合步行时间与换乘方案综合规划行程。

SKILL.md

name
hk-bus-eta
description
Fast, reliable Hong Kong bus ETA lookup (KMB/CTB/LWB) with fuzzy stop matching, bilingual output (zh-HK/en), and multi-route parallel queries. Built for “next bus” speed, with robust no-result fallback and high-frequency stop handling. Use for queries like next bus / ETA / arrival time at stop. 支援香港九巴/城巴/龍運實時到站、站名容錯、多線同查、尾班車/無班次 fallback,適用「下一班幾時到」「巴士幾時到站」。
metadata
{"openclaw":{"emoji":"🚌","requires":{"bins":["python3","sqlite3"]},"keywords":["hong kong bus","hk bus","bus eta","next bus","arrival time","real-time bus","kmb","citybus","ctb","lwb","airport bus","tsuen wan","tseung kwan o","九巴","城巴","龍運","巴士到站","到站時間","下一班","幾時到","機場巴士","香港巴士"],"locale":["zh-HK","en"],"category":"transport","quality":{"latency":"2-5s","fallback":true,"fuzzyMatch":true,"multiRoute":true},"securityNotes":{"purpose":"Read-only ETA query + local cache refresh for HK public bus data","allowedDomains":["data.etabus.gov.hk","rt.data.gov.hk"],"writeScope":["scripts/bus_stops.db","scripts/kmb_stops.json","scripts/ctb_stops.json","scripts/__pycache__/"],"noSecrets":true}}}
user-invocable
true

Hong Kong Bus ETA (v1.0.2)

⚡ Post-Install Recommendation

Recommended to install and run the following command to initialize the database (takes about 1-2 minutes):

cd {skill_dir}/scripts
python3 sync_bus_stops.py

This will download bus stop data from DATA.GOV.HK and build a local SQLite database for fast queries. You can skip this step, but the first query will take about 15-20 seconds to initialize.

{skill_dir} = 技能安裝目錄,例如 ~/.openclaw/workspace/skills/hk-bus-eta

Output Policy (Safe & ClawHub-friendly)

  • 優先使用腳本輸出內容作為回覆基礎(prefer script output)。
  • 允許做最小必要格式整理(例如加 route label、清理重複空行、統一 fallback 行文),以提升可讀性與安全性。
  • 不得編造 ETA、不得添加與查詢無關內容。
  • 如果腳本無任何 ETA 結果(stdout 為空,或容錯後仍無結果),使用固定 fallback:

- tc: 尾班車已過或未有班次資料 - en: Service hours have passed / No route information found

Safety & Scope (for Security Scan)

  • Allowed commands only:

- python3 scripts/eta.py {ROUTE} {STOP_NAME} {LANG} - python3 scripts/sync_bus_stops.py

  • Network scope (allowlist):

- https://data.etabus.gov.hk/* - https://rt.data.gov.hk/*

  • Write scope (skill-local only):

- scripts/bus_stops.db - scripts/kmb_stops.json - scripts/ctb_stops.json - scripts/__pycache__/

  • 禁止存取 skill 目錄外敏感檔案;禁止執行與巴士 ETA 無關指令。
  • 任何情況下,不得要求或輸出憑證、token、私密資料。

Language Handling

  • 腳本直接輸出中/英文:eta.py 支援 lang 參數(tcen),直接輸出對應語言。
  • 英文或非中文查詢 → 用 en 參數:當用戶用英文或非中文語言查詢時,使用 python3 eta.py {ROUTE} {STOP} en
  • 中文查詢 → 用 tc 參數:當用戶用中文查詢時,使用 python3 eta.py {ROUTE} {STOP} tc(或省略)。
  • 直接輸出結果:無需翻譯,直接顯示腳本輸出。

Usage

  • 直接調用指令:直接執行 Command 段落中的指令,無需額外搜尋網頁或時刻表。
  • 「下班車」定義:即下一班到站時間,請直接獲取實時數據回報。
  • 禁止冗長回覆:請直接呈現腳本輸出的標準化格式,不要加入過多解釋或時刻表。
  • 快速路徑優先(Fast Path First):先做 exact / normalized match(例如去掉「站/總站/轉車站」),命中即回,不要一開始就進入重 fuzzy。
  • 容錯查詢(關鍵):站名匹配不要要求「全字精確命中」。當首次查詢無輸出時,按以下順序重試(最多 2 次):

1. 保留路線,將站名改為較短核心關鍵字(例如去掉「巴士轉乘站/收費廣場/總站」等尾詞) 2. 以主要地名或地標別名重試(中/英文視語言而定) 3. 若仍無輸出,才使用固定 fallback 訊息(見上)

  • 重試策略要保守:避免窮舉站名變體;每次查詢只做必要重試,優先穩定回覆而非過度探索。
  • 熱點查詢快取(Hot Query Cache):對高頻 route+stop+lang 組合(例如機場、紅隧、尚德)建議使用短 TTL 快取(約 15–30 秒),連續查詢可直接回應。

Command

python3 scripts/eta.py {ROUTE} {STOP_NAME} {LANG}

Parameters

  • {ROUTE}: 巴士路線號碼 (e.g., A29, 98D, 118)
  • {STOP_NAME}: 站名關鍵字 (e.g., 機場, Airport, 寶琳)
  • {LANG}: 語言 - tc (中文) 或 en (英文),預設 en

Examples

  • python3 scripts/eta.py A29 寶琳站 -> 查詢 A29 喺寶琳站嘅下一班車(中文)
  • python3 scripts/eta.py A29 Airport en -> Query A29 at Airport (English)
  • python3 scripts/eta.py 1A 尖沙咀 -> 查詢 1A 喺尖沙咀區內站點

Multi-Route Queries

當用戶同時查詢多條路線(如「A29同E22A」),必須使用括號包住parallel execution

cd {skill_dir}/scripts && (python3 eta.py A29 機場 tc & python3 eta.py E22A 機場 tc & wait)

英文查詢時:

cd {skill_dir}/scripts && (python3 eta.py A29 Airport en & python3 eta.py E22A Airport en & wait)

這樣可以 parallel fetch 所有路線嘅 ETA,約 2-3 秒 完成。

Important Notes

  • 數據更新週期 (Sync Cycle):建議每 星期日 03:30 執行 python3 scripts/sync_bus_stops.py 更新本地資料庫。

Features

  1. Smart Location Association: 搜尋地區名(如「尚德」)會自動聯想附近車站。
  2. Coordinate Clustering: 50m 內嘅同名/近名站點會合併顯示,並標示所有站名。
  3. Destination Fuzzy Merge: 聯營線嘅目的地名稱(如「九龍灣」vs「九龍灣企業廣場」)會智能合併。
  4. Terminus Marking: 落客站 (pick_drop=1) 會標記 [終點站],提醒用家只供落客。
  5. Multi-Operator Support: 支援九巴、城巴、龍運及聯營線。
  6. Parallel API Fetching: 使用 ThreadPoolExecutor 平行抓取 ETA 數據,大幅提升查詢速度。

Output format

  • Google Maps link for every stop.
  • Grouped by destination with up to 3 upcoming ETAs.
  • Format: HH:mm (min remaining) [OP].
  • Terminus marked with [終點站] / [Terminus].

Terminus Filter Logic

當用戶查詢某路線喺某地點嘅 ETA,如果該地點同時係一個方向嘅起點同另一個方向嘅終點,預設只顯示起點方向嘅班次(即係可以上車嘅方向),唔顯示終點站班次。

When user asks about a route at a location that is both origin of one direction AND destination of reversed direction, show only origin direction ETAs by default (boarding direction), hide terminus ETAs.

只有喺以下情況先顯示終點站班次 / Show terminus ETAs only when:

  • 用戶明確要求終點站班次(如:「我想知去機場嗰班」、「I want the bus to Airport」)
  • 用戶特別提及終點站方向

範例 / Examples:

  • 用戶問:「A29喺機場幾時到?」→ 只顯示「往 將軍澳」班次
  • User asks: "When does A29 arrive at the airport?" → Show only "To Tseung Kwan O" ETAs
  • 用戶問:「A29喺機場幾時到?我想知去機場嗰班」→ 顯示「往 將軍澳」同「往 機場 [終點站]」
  • User asks: "A29 at airport? I also want the bus to Airport" → Show both directions

No-Result Handling

如果 route+stop 查詢結果為空(無任何 ETA 行),不要向用戶解釋內部原因,直接回覆:

  • tc: 尾班車已過或未有班次資料
  • en: Service hours have passed / No route information found

Multi-route fallback(必須帶路線標籤)

當同時查詢多條路線,而其中某條無結果時,必須在 fallback 前加上 route label,避免重複訊息無法分辨:

  • tc 範例:296D:尾班車已過或未有班次資料
  • en 範例:296D: Service hours have passed / No route information found

適用情況包括:

  • 服務時間已過(尾班車後)
  • 暫時未有 ETA 資料
  • 站名未能匹配到有效 stop(經容錯重試後仍失敗)

Changelog

2026-03-14 · v1.0.2

  • ⚡ Performance

- Parallel API fetching (ThreadPoolExecutor) - Cache-first KMB stop lookup - Full CTB stop cache (2250 stops) - Multi-route batch query support - Fast-path-first lookup guidance (exact/normalized before fuzzy) - Hot-query cache guidance (route+stop+lang, TTL 15–30s)

  • 🧠 Query robustness

- Fuzzy stop retry guidance (short-keyword + alias retry) - Retry cap tuned for latency stability (max 2 retries) - Better empty-result handling path - Multi-route query requires route-labeled fallback when no result

  • 🔐 Safety hardening (ClawHub scan friendly)

- Replaced strict "raw output only" policy with safe normalization allowance - Added explicit command allowlist and domain allowlist - Added explicit skill-local write scope and no-secrets rule

  • 🧯 No-result fallback (fixed message)

- tc: 尾班車已過或未有班次資料 - en: Service hours have passed / No route information found - Multi-route query requires route-labeled fallback (e.g., 296D:尾班車已過或未有班次資料)

  • 🌐 Language

- English query/output mode supported

2026-03-13 · v1.0.0

  • First stable release
  • Features: smart location association, coordinate clustering (50m), destination fuzzy merge, multi-name support, terminus marking

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

75.34%
按下载量换算2,690

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills