Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
车票查询AI助手 — 余票查询、经停站查询、中转换乘方案。支持车次类型筛选、时间窗口、排序、多种输出格式(text/json/csv)。纯命令行单次调用模式。 12306 Train Ticket Query — remaining tickets, route stops, transfer plans. Su...
车票查询AI助手 — 余票查询、经停站查询、中转换乘方案。支持车次类型筛选、时间窗口、排序、多种输出格式(text/json/csv)。纯命令行单次调用模式。 12306 Train Ticket Query — remaining tickets, route stops, transfer plans. Su...
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
3-in-1 China 12306 query: tickets + route stops + transfer plans, zero login. 三合一 12306 查询:余票 + 经停站 + 中转换乘,零登录。 调用 trainclaw.py 一条命令完成查询。无需登录、无需API Key、无需额外配置——仅依赖 Python + requests,开箱即用。支持车次类型筛选、时间窗口、排序,text/json/csv 多格式输出。 One command via trainclaw.py. No login, no API key, no extra config — just Python + requests, ready to go. Filter by train type, time window, sort by duration. Output: text / json / csv.
用户提到火车票、高铁票、动车票、车次查询、余票、经停站、中转换乘、12306等关键词时触发。 Trigger when user mentions train tickets, bullet train, remaining tickets, route stops, transfer, 12306, China rail, etc.
"查一下明天北京到上海的高铁票" → 余票查询 "Any bullet trains from Beijing to Shanghai tomorrow?" → Ticket query "G1033 经停哪些站?" → 经停站查询 "What stops does G1033 make?" → Route stops "从深圳到拉萨怎么中转?" → 中转查询 "How to get from Shenzhen to Lhasa by train?" → Transfer plan "南京到上海的动车,上午出发,按时长排序" → 带筛选的余票查询 "EMU trains Nanjing to Shanghai, morning only, sort by duration" → Filtered query
用户说:"查明天北京到上海的高铁" ↓ 提取参数:出发=北京,到达=上海,日期=明天,类型=G ↓ 执行命令: python trainclaw.py query -f 北京 -t 上海 -d 2026-03-04 --type G ↓ 返回余票信息(text 格式,直接展示给用户)
查询两站之间的余票信息,支持筛选和排序。 # 基础查询 python trainclaw.py query -f 北京 -t 上海 # 完整参数 python trainclaw.py query -f 北京 -t 上海 -d 2026-03-04 \ --type G --earliest 8 --latest 18 --sort duration -n 10 -o text
查询某车次的所有经停站信息。 python trainclaw.py route -c G1033 -d 2026-03-04 python trainclaw.py route -c G1 -d 2026-03-04 -o json
查询需要换乘的中转方案。 # 自动推荐中转站 python trainclaw.py transfer -f 深圳 -t 拉萨 -n 5 # 指定中转站 python trainclaw.py transfer -f 深圳 -t 拉萨 -m 西安 -d 2026-03-04
参数说明默认值-d, --date查询日期 (yyyy-MM-dd)今天-o, --format输出格式: text / json / csvtext
参数说明默认值-f, --from出发站(站名/城市名/三字母代码)必填-t, --to到达站(站名/城市名/三字母代码)必填--type车次类型筛选(见下表)不筛选--earliest最早出发小时 (0-24)0--latest最晚出发小时 (0-24)24--sort排序: startTime / arriveTime / duration不排序--reverse倒序排列否-n, --limit最大结果数query: 不限, transfer: 10
代码含义G高铁/城际(G/C 开头)D动车Z直达特快T特快K快速O其他(非 GDZTK)F复兴号S智能动车组 可组合使用,如 --type GD 表示高铁+动车。
支持三种输入格式,自动识别: 精确站名: 北京南、上海虹桥、南京南 → 直接匹配 城市名: 北京、上海、南京 → 匹配该城市代表站 三字母代码: BJP、SHH、NJH → 直接使用
车次 | 出发站→到达站 | 出发→到达 | 历时 | 席位信息 | 标签 G25 | 北京南→上海虹桥 | 17:00→21:18 | 04:18 | 商务座:1张/2318.0元, 一等座:有票/1060.0元 | 复兴号
完整 JSON 数组,包含所有字段。
标准 CSV,含表头行。
主程序: trainclaw.py 配置文件: config.py 缓存目录: cache/(车站数据自动缓存 7 天)
日期限制: 仅支持查询今天及未来 15 天内的车票 网络依赖: 首次运行需下载车站数据(~3000 站),之后使用本地缓存 错误输出: 错误信息输出到 stderr,数据输出到 stdout,支持管道操作 中转限制: 中转查询结果取决于 12306 的推荐,非所有组合都有结果 依赖: 仅需 Python 3.8+ 和 requests 库
用户: "明天北京到上海有什么高铁?" → python trainclaw.py query -f 北京 -t 上海 -d {明天日期} --type G
用户: "上午 8 点到 12 点从南京到杭州的动车" → python trainclaw.py query -f 南京 -t 杭州 --type D --earliest 8 --latest 12
用户: "G1033 都停哪些站?" → python trainclaw.py route -c G1033 -d {今天日期}
用户: "从北京怎么坐火车去成都?" → python trainclaw.py transfer -f 北京 -t 成都 -n 5
公益技能,免费开源。 / Community-driven, open-source, free for everyone. Email: nuaa02@gmail.com 小红书 / Xiaohongshu: @深度连接 GitHub: AI4MSE/TrainClaw
Agent frameworks, memory systems, reasoning layers, and model-native orchestration.
Largest current source with strong distribution and engagement signals.