微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🚌

奥斯汀公交实时到站·车辆追踪·服务预警

Capmetro Skill · v1.0.3
效率 安全 S+ 级 作者 brianleach 公开目录收录
1.2k 下载 0 安装 4.3k 收藏 4 浏览

简介

奥斯汀CapMetro公交实时查询助手,提供车辆位置、到站时间、服务预警和路线规划,无需API密钥,数据来自德州开放数据门户。

原始描述

Austin CapMetro transit - real-time vehicle positions, next arrivals, service alerts, route info, and trip planning for buses and rail (MetroRail, MetroRapid...

通过你的 Agent 添加

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/capmetro-skill/
Codex CLI~/.codex/skills/capmetro-skill/
DeepSeek Harness~/.agents/skills/capmetro-skill/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

CapMetro Austin Transit 是一款专为奥斯汀地区设计的公共交通查询技能,通过接入德州开放数据门户(Texas Open Data Portal)的 GTFS-RT 实时数据流,为用户提供全方位的公交出行信息。核心功能包括:

  • 实时车辆追踪:每15秒更新一次车辆位置,支持按路线筛选
  • 到站时间预测:查询指定站点的下一班车到达时间,支持按路线、方向、终点站过滤
  • 服务预警:获取当前生效的路线调整、绕行、延误等官方通知
  • 站点搜索:按名称或地理位置搜索附近站点
  • 路线信息:查看完整路线详情及途经站点
  • GTFS静态数据:下载路线、站点、时刻表等基础数据(建议季度更新)

使用方式灵活,既可直接通过 capmetro.mjs 脚本查询(如 node scripts/capmetro.mjs arrivals --stop-search "downtown" --route 550),也可作为底层服务集成到对话系统中。无需注册或API密钥,开箱即用。

显著优点

  1. 完全免费且开放:所有数据源均为政府开放数据,无使用限制、无速率限制、无API密钥
  2. 数据时效性强:实时数据每15秒刷新,车辆位置接近实时
  3. 多格式支持:同时提供JSON和Protobuf格式,兼顾易用性与性能
  4. 离线缓存机制:GTFS静态数据本地存储,减少重复下载,支持离线查询基础信息
  5. 隐私保护完善:纯只读GET请求,不传输任何用户标识或位置信息
  6. MIT开源许可:可自由修改、分发,适合二次开发

潜在缺点与局限性

  • 地域限制:仅覆盖奥斯汀都会区,对德州其他城市或美国以外用户无价值
  • 数据源单一:完全依赖德州开放数据门户,若官方服务中断则技能失效
  • 无官方技术支持:CapMetro官方不维护此项目,问题需社区解决
  • Protobuf解析依赖:需安装protobufjsNode.js依赖,增加部署复杂度
  • 静态数据需手动更新:GTFS静态数据不会自动刷新,服务变更期可能提供过时信息
  • 无智能路线规划:仅提供单点到站查询,不支持多点最优路径计算(需配合其他工具)

适合人群

  • 奥斯汀居民与通勤者:依赖MetroRapid 801/803、MetroRail Red Line等路线的日常用户
  • 游客访客:需要查询实时公交信息、了解 fares 规则的临时出行者
  • 开发者与集成商:需要奥斯汀公交数据API的本地化处理方案,避免直接调用外部API
  • 无障碍需求用户:希望快速获取服务预警、绕行信息以规划替代路线的人群

常规风险

风险类型 等级 说明
数据准确性 中 实时数据存在15秒延迟,极端情况下(GPS故障、通信中断)车辆位置可能不准确
服务可用性 中 依赖德州政府数据门户稳定性,历史上政府开放数据平台偶有维护停机
隐私泄露 极低 无用户数据传输,但若通过第三方工具查询需注意工具本身的日志策略
误导性信息 低 未及时更新GTFS静态数据可能导致新路线/站点无法识别
依赖安全 低 Node.js和protobufjs依赖需保持更新以避免已知漏洞

技能正文


name: capmetro-skill description: Austin CapMetro transit - real-time vehicle positions, next arrivals, service alerts, route info, and trip planning for buses and rail (MetroRail, MetroRapid, MetroBus). Use when the user asks about Austin public transit, bus schedules, train times, CapMetro alerts, or nearby stops. homepage: "https://github.com/brianleach/capmetro-skill" license: MIT metadata: clawdbot: emoji: "🚌" tags: [transit, austin, capmetro, transportation, bus, train, schedule] requires: bins: ["node", "unzip"] env: [] files: ["scripts/capmetro.mjs", "scripts/gtfs-realtime.proto"] install: - id: npm-deps kind: shell command: "npm install --prefix $SKILL_DIR protobufjs" label: "Install protobufjs Node.js dependency"

CapMetro Austin Transit

Real-time Austin CapMetro transit data - vehicle positions, next arrivals, service alerts, and route information. No API key required.

When to Use

  • User asks about Austin bus or train schedules, arrival times, or delays
  • User asks "when is the next bus/train" or "is the 801 running"
  • User asks about CapMetro service alerts, detours, or disruptions
  • User wants to know where a bus/train currently is
  • User asks about nearby stops or route information
  • User mentions MetroRail (Red Line), MetroRapid (801/803), or any Austin bus route
  • User asks about CapMetro fares, how to ride, or general transit info

Data Sources

All feeds are open access, no API key required, hosted on the Texas Open Data Portal.

GTFS-RT (Real-Time) Feeds - Updated every 15 seconds

Feed Format URL
Vehicle Positions JSON https://data.texas.gov/download/cuc7-ywmd/text%2Fplain
Vehicle Positions Protobuf https://data.texas.gov/download/eiei-9rpf/application%2Foctet-stream
Trip Updates Protobuf https://data.texas.gov/download/rmk2-acnw/application%2Foctet-stream
Service Alerts Protobuf https://data.texas.gov/download/nusn-7fcn/application%2Foctet-stream

GTFS Static Feed - Route/Stop/Schedule data

Feed Format URL
GTFS Static (zip) ZIP https://data.texas.gov/download/r4v4-vz24/application%2Fx-zip-compressed

Implementation

Quick Start: Use the helper scripts

The scripts in this skill's scripts/ directory handle fetching, parsing, and presenting CapMetro data.

Script: scripts/capmetro.mjs

Main entry point. Supports these commands:

# Get current service alerts
node scripts/capmetro.mjs alerts

# Get real-time vehicle positions (optionally filter by route)
node scripts/capmetro.mjs vehicles [--route 801]

# Get next arrivals at a stop (by stop_id)
node scripts/capmetro.mjs arrivals --stop <stop_id>

# Get arrivals by searching stop name (uses best match)
node scripts/capmetro.mjs arrivals --stop-search "lakeline" --route 550

# Get arrivals filtered by direction/headsign
node scripts/capmetro.mjs arrivals --stop-search "downtown" --route 550 --headsign "lakeline"

# Get arrivals filtered by route at a stop
node scripts/capmetro.mjs arrivals --stop <stop_id> --route 801

# Search for stops by name or location
node scripts/capmetro.mjs stops --search "domain" 
node scripts/capmetro.mjs stops --near 30.4,-97.7

# List all routes
node scripts/capmetro.mjs routes

# Get route details including stops
node scripts/capmetro.mjs route-info --route 801

# Download/refresh GTFS static data (run periodically)
node scripts/capmetro.mjs refresh-gtfs

Setup: GTFS Static Data

On first use, run node scripts/capmetro.mjs refresh-gtfs to download and extract the static GTFS data (routes, stops, schedules) to ~/.capmetro/gtfs/. This only needs to be refreshed when CapMetro updates their schedule (typically quarterly or during service changes).

Key Route Reference

Route Name Type
550 MetroRail Red Line Rail (Leander ↔ Downtown)
801 MetroRapid North/South Rapid Bus (Tech Ridge ↔ Southpark Meadows)
803 MetroRapid Burnet/South Lamar Rapid Bus (Domain ↔ Westgate)
1 N Lamar/S Congress Local Bus
7 Duval/Dove Springs Local Bus
10 S 1st/Red River Local Bus
20 Manor Rd/Riverside Local Bus
300 Oltorf/Riverside Crosstown Crosstown Bus
325 Ohlen/Loyola Crosstown Bus
985 Night Owl Late Night Service

Tips for Users

  • Stop IDs can be found on CapMetro stop signs, in the Transit app, or by searching with the stops command
  • MetroRapid 801/803 have the most frequent service (every 10-12 minutes during peak)
  • MetroRail Red Line (550) runs Leander to Downtown Austin with limited frequency
  • Service alerts often contain detour information - check alerts before advising routes
  • Vehicle position data updates every ~15 seconds, so locations are near real-time

Error Handling

  • If a feed returns an error or empty data, inform the user that real-time data may be temporarily unavailable
  • The JSON vehicle positions feed is easier to parse and a good fallback if protobuf parsing fails
  • GTFS static data is required for stop names, route names, and schedule lookups - ensure it's been downloaded

Response Formatting

When presenting transit info to the user:

  • Lead with the most actionable info (next arrival time, active alerts)
  • Include route number AND name (e.g., "Route 801 MetroRapid")
  • Show times in 12-hour format with AM/PM
  • For delays, show both scheduled and estimated times
  • For vehicle positions, describe location relative to landmarks when possible
  • If there are active service alerts for the route the user asked about, always mention them

Fares Reference (as of 2025)

Fare Type Price
Local / MetroRapid $1.25
MetroRail $3.50 (single)
Day Pass $2.50
7-Day Pass $11.25
31-Day Pass $41.25

Payment via Umo app, tap-to-pay, or fare card. Free transfers within 2 hours.

External Endpoints

Endpoint Data Sent Data Received
data.texas.gov/download/cuc7-ywmd/... None (GET only) Vehicle positions (JSON)
data.texas.gov/download/eiei-9rpf/... None (GET only) Vehicle positions (Protobuf)
data.texas.gov/download/rmk2-acnw/... None (GET only) Trip updates (Protobuf)
data.texas.gov/download/nusn-7fcn/... None (GET only) Service alerts (Protobuf)
data.texas.gov/download/r4v4-vz24/... None (GET only) GTFS static data (ZIP)

All endpoints are open-access Texas Open Data Portal URLs. No API key, authentication, or user data is transmitted.

Security & Privacy

  • No credentials required - all data sources are open access, no API keys or tokens
  • No user data transmitted - requests are anonymous GET calls with no query parameters containing user info
  • Local storage only - GTFS static data is cached locally at ~/.capmetro/gtfs/; no data is written elsewhere
  • No telemetry - this skill does not phone home or collect usage data
  • Input handling - stop names and route IDs from user input are used only for local filtering, never interpolated into URLs or shell commands

Trust Statement

This skill only reads publicly available transit data from the Texas Open Data Portal. It does not access, store, or transmit any personal information. All network requests are read-only GET calls to open government data feeds.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

transitaustincapmetrotransportationbustrainschedulereal-timegtfspublic-transport

同类 Skill