简介
本地查询Translink SEQ公交GTFS静态与实时数据,支持时刻表、站点/线路关联、车辆追踪及告警排查,适合公交数据开发者与运维人员
原始描述
Query, troubleshoot, and explain Translink SEQ GTFS static + realtime data using local translink_* commands or plugin slash commands. Use for schedule lookup...
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
中文使用说明 来自收录源
核心功能
Translink CLI Skill 是一套面向昆士兰东南部(SEQ)公共交通数据的命令行查询工具,封装了GTFS静态数据(时刻表、站点、线路、行程)与实时数据(车辆位置、服务告警)的本地化访问能力。用户可通过translink_*命令或插件斜杠命令,执行多表关联查询、模糊搜索、分页过滤及模式自省等操作。
显著优点
- 离线可用:静态数据缓存至本地(~/.openclaw/cache/translink/),24小时TTL,支持定时刷新
- 灵活查询:统一参数契约(--where/--contains/--in/--page等)适用于所有命令,降低学习成本
- 实时扩展:支持嵌套JSON展开(--expand)、原始数据保留(--raw)及时间格式切换
- 模式自适应:表头驱动 schema,自动适配新增字段,schema-generated.md 提供权威字段参考
- 防并发冲突:刷新锁机制避免并发提取竞态
潜在局限
- 地域受限:仅覆盖Translink SEQ服务区域,非通用GTFS工具
- 前置依赖:需手动安装github.com/alanburchill/translink-cli-scripts并确保PATH可用
- 缓存延迟:24小时TTL可能导致数据非实时,紧急场景需手动触发--refresh
- 无可视化:纯CLI输出,复杂空间数据(shapes)需外部工具渲染
- 社区维护:非官方Translink项目,更新频率与长期维护依赖个人开发者
适合人群
- 公交数据分析师与Transit技术开发者
- 运维人员排查服务告警与实时车辆偏离
- 研究人员验证GTFS schema变更与数据质量
常规风险
| 风险类型 | 说明 |
|---|---|
| 数据时效性 | 缓存机制导致静态数据最多滞后24小时,实时数据依赖上游API稳定性 |
| 误操作覆盖 | 并发刷新虽加锁,但手动--refresh可能中断依赖缓存的其他查询 |
| 隐私合规 | 实时车辆位置属公开数据,但聚合分析需遵守Translink使用条款 |
| 供应链安全 | CLI脚本来自第三方GitHub仓库,建议审查代码后安装 |
| 字段漂移 | 自动适配新增字段可能导致下游脚本因列序变化而失效 |
技能正文
name: translink-cli description: Query, troubleshoot, and explain Translink SEQ GTFS static + realtime data using local translink_* commands or plugin slash commands. Use for schedule lookups, stop/route/trip joins, vehicle/trip realtime checks, alerts, schema drift review, PK/FK reasoning, and paginated filtering.
Translink CLI Skill
Use when working with Translink data in this environment.
Prerequisite
This skill requires the Translink CLI scripts to be installed and available in PATH.
- CLI repo:
https://github.com/alanburchill/traslink-cli-scripts - Expected commands:
translink_*(or equivalent wrappers that expose the same command names)
If the CLI is not installed, stop and ask the user to install it first.
Command surfaces
- Shell CLI:
translink_* - Plugin slash commands:
/translink_*and/translink <command> [args...]
Core workflow
- Refresh or validate cache/schema with
translink_schedule_refreshwhen freshness is uncertain. - Query with shared parameters (
--where,--contains,--in,--page,--per-page, etc.). - On strict field errors, use fuzzy suggestions in the JSON error payload to auto-correct.
- Use PK/FK references for joins across routes/trips/stops/stop_times/calendar/shapes.
- For authoritative current schema, read generated schema docs first.
Shared parameter contract
All commands support:
--where field=value(repeatable)--contains field=text(repeatable)--in field=v1,v2,...(repeatable)--fields a,b,c--sort field--order asc|desc--page N--per-page N(default 20)--format table|json|csv--count-only
Realtime extras:
--expand(include nested JSON fields)--raw(include full raw entity JSON)--time epoch|iso
Schedule extras:
--refresh--schema
Runtime behavior
- Static cache:
~/.openclaw/cache/translink/ - TTL: 24h
- Daily refresh cron (example): 5:00 AM local time (
translink:schedule-refresh) - Refresh lock prevents concurrent extract races.
- Schema is header-driven and auto-adapts to added columns.
Read these references as needed
references/commands.md— command/param/error contractreferences/usage.md— examplesreferences/relationships.md— PK/FK joinsreferences/schema-generated.md— auto-generated live schema (authoritative)references/column-meanings.md— GTFS field semantics
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。