← Back to Skills Marketplace
25
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install 12306-train-query
Description
查询12306火车票余票信息。当用户询问火车票、查询余票、购买火车票、查火车、火车出行等相关问题时使用此技能。
README (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快速)
- 出发/到达站
- 发车时间、到达时间、历时
- 余票信息 (商务座、特等座、一等座、二等座、硬卧、软卧等)
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install 12306-train-query - After installation, invoke the skill by name or use
/12306-train-query - Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Frequently Asked Questions
What is 12306 Train Query?
查询12306火车票余票信息。当用户询问火车票、查询余票、购买火车票、查火车、火车出行等相关问题时使用此技能。 It is an AI Agent Skill for Claude Code / OpenClaw, with 25 downloads so far.
How do I install 12306 Train Query?
Run "/install 12306-train-query" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is 12306 Train Query free?
Yes, 12306 Train Query is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does 12306 Train Query support?
12306 Train Query is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created 12306 Train Query?
It is built and maintained by fuermos (@fuermos); the current version is v1.0.0.
More Skills