← 返回 Skills 市场
kirorab

12306 Train Query

作者 kirorab · GitHub ↗ · v1.0.2
cross-platform ✓ 安全检测通过
3754
总下载
8
收藏
38
当前安装
3
版本数
在 OpenClaw 中安装
/install 12306
功能描述
Query China Railway 12306 for train schedules, remaining tickets, and station info. Use when user asks about train/高铁/火车 tickets, schedules, or availability...
安全使用建议
Before installing, expect the skill to contact official 12306 websites, send the stations and date you query to those services, cache station metadata locally, and create HTML output files by default. Use a specific output path only when you intend to write there, and review future updates because publisher provenance is limited.
功能分析
Type: OpenClaw Skill Name: 12306 Version: 1.0.2 The skill bundle is a functional tool for querying China Railway 12306 train schedules and ticket availability. The code in `query.mjs` and `stations.mjs` interacts exclusively with official 12306 API endpoints (kyfw.12306.cn and www.12306.cn) and uses standard Node.js built-in modules for file I/O and network requests. There is no evidence of data exfiltration, malicious command execution, or prompt injection attempts in the documentation or scripts.
能力评估
Purpose & Capability
The stated purpose is querying China Railway 12306 schedules, ticket availability, and station information; the scripts implement only that workflow.
Instruction Scope
The skill exposes user-directed Node CLI commands and a documented custom HTML output path, so it can write or overwrite the file path the user provides.
Install Mechanism
Installation is documented through the skills CLI and requires Node; the artifact shows no dependency installer, postinstall hook, or hidden setup, though the publisher is not a trusted @openclaw publisher.
Credentials
Network requests are limited to 12306 domains, with route, station, and travel-date parameters sent to those services; no credentials, environment secrets, broad local files, or unrelated endpoints are used.
Persistence & Privilege
The skill caches public station metadata for 7 days under its data directory and saves HTML query output by default, but shows no background service, privilege escalation, credential persistence, or autonomous execution.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install 12306
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /12306 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
- Added documentation file: README.md - Removed cached station data file: data/stations.json - Updated documentation to include new output format option (`-f, --format <html|md>`) for markdown table output - Clarified usage examples and output modes in the documentation
v1.0.1
# Changelog ## 1.0.1 ### EN - Query train schedules and remaining tickets from China Railway 12306 - Output as a clean HTML page (Apple-style design), saved to file - Station data uses official city mapping from 12306 (field `[7]`), no more regex guessing - Station cache with 7-day TTL, auto-refreshes from 12306 - Train type filter: G/D/Z/T/K, combinable (e.g. `GD`) - Time range filters: `--depart` and `--arrive` (e.g. `08:00-12:00`) - Duration filter: `--max-duration` (e.g. `2h`, `90m`, `1h30m`) - Availability filter: `--available` for bookable trains only - Seat type filter: `--seat` to show trains with specific seat availability (e.g. `ze,zy`) - Duration displayed as human-readable format (`1h30m` instead of `01:30`) - Color-coded train types: G blue, D green, Z purple, T orange, K grey - Color-coded seat availability: green = available, red = sold out, grey = N/A - JSON output mode with `--json` - Custom output path with `-o` ### 中文 - 查询中国铁路 12306 列车时刻表和余票信息 - 输出为简洁的 HTML 页面(Apple 风格设计),保存为文件 - 站点数据使用 12306 官方城市字段(`[7]`),不再用正则猜测城市名 - 站点缓存 7 天有效期,过期自动从 12306 刷新 - 车次类型筛选:G/D/Z/T/K,可组合(如 `GD`) - 时间范围筛选:`--depart` 和 `--arrive`(如 `08:00-12:00`) - 耗时筛选:`--max-duration`(如 `2h`、`90m`、`1h30m`) - 可购票筛选:`--available` 仅显示可购买的车次 - 座位类型筛选:`--seat` 按指定座位有票过滤(如 `ze,zy`) - 耗时显示为易读格式(`1h30m` 而非 `01:30`) - 车次类型颜色区分:G 蓝、D 绿、Z 紫、T 橙、K 灰 - 余票状态颜色区分:绿色有票、红色售罄、灰色不适用 - JSON 输出模式 `--json` - 自定义输出路径 `-o`
v1.0.0
Initial release: query train schedules, remaining tickets, station lookup from China Railway 12306
元数据
Slug 12306
版本 1.0.2
许可证
累计安装 38
当前安装数 38
历史版本数 3
常见问题

12306 Train Query 是什么?

Query China Railway 12306 for train schedules, remaining tickets, and station info. Use when user asks about train/高铁/火车 tickets, schedules, or availability... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 3754 次。

如何安装 12306 Train Query?

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

12306 Train Query 是免费的吗?

是的,12306 Train Query 完全免费(开源免费),可自由下载、安装和使用。

12306 Train Query 支持哪些平台?

12306 Train Query 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 12306 Train Query?

由 kirorab(@kirorab)开发并维护,当前版本 v1.0.2。

💬 留言讨论