← 返回 Skills 市场
fuermos

12306 Train Query

作者 fuermos · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
25
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install 12306-train-query
功能描述
查询12306火车票余票信息。当用户询问火车票、查询余票、购买火车票、查火车、火车出行等相关问题时使用此技能。
使用说明 (SKILL.md)

12306火车票查询

功能

  • 查询任意两站之间的火车票余票
  • 支持日期选择
  • 显示车次、出发/到达时间、历时、余票信息

使用方法

运行脚本查询火车票:

node scripts/train_query.js [出发站] [到达站] [日期]

参数说明

参数 说明 示例
出发站 出发城市/车站名 长沙、北京、上海
到达站 到达城市/车站名 北京、深圳、广州
日期 查询日期 (YYYY-MM-DD) 2026-03-16

示例

# 查询明天长沙到北京的火车票
node scripts/train_query.js 长沙 北京 2026-03-16

# 查询今天上海到深圳的火车票
node scripts/train_query.js 上海 深圳 2026-03-15

输出格式

脚本会输出:

  • 车次类型 (G高铁/D动车/Z直达/T特快/K快速)
  • 出发/到达站
  • 发车时间、到达时间、历时
  • 余票信息 (商务座、特等座、一等座、二等座、硬卧、软卧等)
安全使用建议
Review this skill before installing. It appears to be a simple 12306 availability query tool, but the maintainer should fix the disabled HTTPS certificate verification so ticket results cannot be easily tampered with in transit.
功能分析
Type: OpenClaw Skill Name: 12306-train-query Version: 1.0.0 The script `scripts/train_query.js` implements the stated train ticket query functionality but contains security vulnerabilities. Specifically, it disables SSL certificate verification (`rejectUnauthorized: false`) when connecting to the 12306 API and fails to sanitize or URL-encode the user-provided `date` parameter before appending it to a query string. While no evidence of intentional malice or data exfiltration was found, these flaws represent significant security risks.
能力评估
Purpose & Capability
The SKILL.md and code are aligned around querying 12306 train availability and printing station, schedule, and seat information.
Instruction Scope
The documented workflow is a user-directed command with departure station, arrival station, and date arguments; no goal override or hidden agent instruction was found.
Install Mechanism
No install spec, package install, or remote setup script is provided; the included JavaScript file is the reviewed runnable artifact.
Credentials
Network access to 12306 is purpose-aligned, but the implementation disables HTTPS certificate verification for those requests.
Persistence & Privilege
No persistence, credential requirement, local profile access, background worker, or account mutation behavior is shown.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install 12306-train-query
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /12306-train-query 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of 12306-train-query - Query train ticket availability between any two stations on 12306. - Supports specifying departure/arrival stations and date. - Shows train number, departure/arrival times, duration, and seat availability. - Command-line usage with clear parameter examples and output details.
元数据
Slug 12306-train-query
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

12306 Train Query 是什么?

查询12306火车票余票信息。当用户询问火车票、查询余票、购买火车票、查火车、火车出行等相关问题时使用此技能。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 25 次。

如何安装 12306 Train Query?

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

12306 Train Query 是免费的吗?

是的,12306 Train Query 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

12306 Train Query 支持哪些平台?

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

谁开发了 12306 Train Query?

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

💬 留言讨论