Skip to main content
BuildReviewed Oct 19, 2026

Train Tickets

v1.0.01 install

Unsigned, install at your own risk

Unverified

This skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.

Install this skill

No account required. Pick your tool, then copy.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install nanomuse-train-tickets

What this does: Trains in China through the 12306 MCP server: routes, dates, options, connections and stops with no screen; booking only on the user's word, in the 12306 app on their phone, stopping before payment. Use when the user asks about 火车票 / 高铁 / 12306 or a train between two cities.

Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/nanomuse-train-tickets/SKILL.md

Setup guide →
0Save

Instructions

Train tickets (12306)

Two hands, in this order. Searching is done with the 12306__* tools, a community MCP server (12306-mcp) that reads 12306's public timetable and seat counts; no login, no browser, no phone, nothing typed into an app. Booking has no API a personal agent may use; it happens on the phone's screen with phone_task, and only when the user has picked a train and said to book it.

Is the server there?

Look for 12306__get-tickets in your tools (the tools list is the only place it can be: no shell command or script to check). If it is not there, say so in one line, give the user the lines to add to config.toml, and, when a phone is connected, offer the search on the phone's screen instead (the old way, below); otherwise stop:

[[mcp.servers]]
name = "12306"
command = "npx"
args = ["-y", "12306-mcp"]
risk = "safe"
egress = true

Node is needed for npx; the phone's own runtime has it.

What you need

  • From, to, the date, and whether it must be 高铁/动车 (G/D) or any train. The user's habits from recall (preferred stations, morning or evening, seat class, who travels) count as answers. Ask for the rest with one ask_user call.
  • Passengers, seat class and budget only matter for booking; do not ask for them to run a search.

Searching

  1. 12306__get-current-date first whenever the user said 明天 / 后天 / 下周三; the server's date is the one that counts, not yours.
  2. 12306__get-station-code-of-citys with citys = 北京|上海 gives the code that stands for a whole city (every station in it). A specific station (北京南, 上海虹桥): 12306__get-station-code-by-names. All the stations of a city: 12306__get-stations-code-in-city.
  3. 12306__get-tickets with date, fromStation, toStation (names or codes), and the filters that fit: trainFilterFlags (G 高铁/城际, D 动车, GD both, Z/T/K the slow ones, F 复兴号), earliestStartTime / latestStartTime (hours, 0–24), sortFlag (startTime, arriveTime, duration), limitedNum (ask for 5–8, not the whole day). One call; a second only if the first came back empty (widen the hours or drop the flag).
  4. No direct train: 12306__get-interline-tickets with the same arguments, middleStation optional: the first ten connections. Where a train stops and when: 12306__get-train-route-stations with trainCode and departDate.

Then, in your own words, the options that fit, three at most: 车次, 出发站 and time, 到达站 and time, 历时, the seat the user wants with its price and whether there are seats left (剩余 N 张 / 有 / 无). Say which you would take and why (earliest, shortest, cheapest that still has seats). Seat counts move by the minute; say so when the number is small.

Booking

Only when the user has picked a train and said to book it, and only with a phone connected (the system prompt says whether one is). Without a phone, say the train, date and price and that the booking is theirs to make in the app; offer a reminder for when sales open or a calendar entry.

  • phone_task, app = 铁路12306: open the chosen train on the chosen date, pick the seat class and the passengers the user named, and stop on the order confirmation screen; read back the train, date, passengers, seats, total. The goal must say: 停在提交订单页,不要点「提交订单」或任何支付按钮。
  • Show the user that summary and ask whether to place the order. Only with a yes, one more phone_task for 提交订单; Sentinel will ask the user again for that tap; that is expected, not an error. Payment (支付) is the user's: say the order is placed and waiting to be paid in the app, and stop.
  • Never enter a password, a verification code or an ID number; when the app asks for one, stop with what the screen says and let the user do it.

Searching on the screen (fallback)

Only when the server is not configured and a phone is connected. One phone_task, app = 铁路12306, with a goal like:

在 12306 首页把出发地设为「北京」、目的地设为「上海」、日期设为 9月25日,点「查询车票」。在结果页读出按发车时间最早的前 5 班:车次、发车站和发车时间、到达站和到达时间、历时、二等座价格和余票。只查询,不要点任何车次进入下单。

Rules for the operator you can put in context: the left station is 出发, the right one 到达, the swap icon sits between them; the date is picked on a calendar page; 筛选 / 只看高铁 narrow the list; the results list scrolls. Prices on the list page are the lowest class ("¥xxx 起"); say so.

With the other hands

  • 12306 + 高德: the route to the station at that hour (the amap skill) and the train make one plan: leave home at 07:10, G1 at 08:00.
  • 12306 + 飞书 / 腾讯会议: the train that fits a meeting's time; the chosen 车次 and times go to the colleague or the group through lark-cli, once the user approves the text.
  • 12306 + the calendar and reminders: an event for the departure (station, 车次, seat), a reminder to pay within the app's time limit after 提交订单.

Finish

  • Reply with the trains or the order in a few lines: train, date, times, price, state (查询 / 已提交待支付). Save nothing unless asked; if the user wants it kept, trips/<route>-<date>.md in the workspace.
  • remember the stations and times the user keeps choosing, so the next search needs no question.
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →

More from nanoMuse

View source →
meeting-prepPrepare for a meeting (who is in it, what was last said with them, what the user owes them and wants from them) as a one-page brief. Use when the user asks to prepare for or get ready for a meeting, a call or a visit; a trigger can run it before every meeting with a client.2 installsfeishuThe user's 飞书 / Lark through its command-line tool (lark-cli): agenda, people and groups, reading and sending messages, events, tasks, documents, with no app open. Use when the user mentions 飞书, Lark, a 群, a 日程 or a 飞书文档, or wants a colleague told something.1 installsamapPlaces, routes, travel times, distances and weather in China through the 高德地图 (Amap) MCP server. Use when the user asks how far, how long, how to get somewhere (car, transit, bike, foot), what is near a place, or about the weather in a Chinese city.0 installsphone-messagesRead and answer messages in the chat apps on the user's phone (微信 and the like) through the screen: catch up, draft a reply in the user's voice, send only text they confirmed. Use when the user asks what someone said on WeChat or wants a chat answered.0 installskuaidi100Where a parcel is, when it will arrive and what a shipment would cost, through the 快递100 MCP server: any Chinese courier (顺丰, 京东, 中通, 圆通, 韵达, 邮政 and more) from a tracking number. Use when the user asks 快递到哪了, 什么时候到, 查一下单号, or how much it costs to send something.0 installsweekly-reviewLook back at the past week and set up the next one: calendar, mail, goals and files in one page, with a short plan. Use when the user asks for a weekly review, a week in review, "how did my week go" or to plan next week.0 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.656 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.561 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.373 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.269 installsfounder-consumerThe consumer panel. Spins up a swarm of buyer sub-agents (default 100, --quick for 20) trained on the user's target customer, each with a different income, age, buying behaviour and objection, shows every one the same pitch, and runs the business through 100 buyer scenarios to see who buys, who doesn't, and why. Tallies the answers into buy rates by segment, the reasons people pass in their own words, what would flip a no, and price answers for founder-pricing. Use when the user says "would people buy this", "test it on customers", "run the consumer panel", "simulate buyers", "who is my customer", or "validate demand".194 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.186 installs

Frequently asked questions about train-tickets

What does the train-tickets skill do?

Trains in China through the 12306 MCP server: routes, dates, options, connections and stops with no screen; booking only on the user's word, in the 12306 app on their phone, stopping before payment. Use when the user asks about 火车票 / 高铁 / 12306 or a train between two cities. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the train-tickets skill?

Run `npx @skills-hub-ai/cli install nanomuse-train-tickets` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/nanomuse-train-tickets/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does train-tickets work with?

train-tickets runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the train-tickets skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use train-tickets after installing it?

In Claude Code, type `/nanomuse-train-tickets` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the train-tickets skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/nanomuse-train-tickets)](https://skills-hub.ai/skills/nanomuse-train-tickets)
HTML
<a href="https://skills-hub.ai/skills/nanomuse-train-tickets"><img src="https://skills-hub.ai/api/badges/skill/nanomuse-train-tickets" alt="Install on Skills Hub"></a>

More options in the badge docs.