
12306
Query China Railway 12306 for train schedules, remaining tickets, and station lookups within China.
- skills.sh installs
- 645
- GitHub stars
- 12
- last updated
- Jul 14, 2026
What it does
- Covers train schedule and remaining-ticket queries via
scripts/query.mjs, plus city-to-station lookups viascripts/stations.mjs - Supports filters for train type, departure and arrival time windows, maximum duration, bookable-only trains, and seat class
- Warns that city-name queries can match several stations, so it recommends listing exact stations before querying transfers
- Designed for AI assistants answering train ticket questions in English or Chinese, using the official 12306 API with no key
Install
$ npx -y skills add kirorab/12306-skill --skill 12306 -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
12306 Train Query
Query train schedules and remaining tickets from China Railway 12306.
Query Tickets
node {baseDir}/scripts/query.mjs <from> <to> [options]
- HTML mode (default): writes file, prints path to stdout
- Markdown mode (
-f md): prints table to stdout
Examples
# All trains from Beijing to Shanghai (defaults to today)
node {baseDir}/scripts/query.mjs 北京 上海
# Markdown table output (to stdout, good for chat)
node {baseDir}/scripts/query.mjs 北京 上海 -t G -f md
# Morning departures, 2h max, with second class available
node {baseDir}/scripts/query.mjs 上海 杭州 -t G --depart 06:00-12:00 --max-duration 1h --seat ze
# Only bookable trains arriving before 6pm
node {baseDir}/scripts/query.mjs 深圳 长沙 --available --arrive -18:00
# Custom output path
node {baseDir}/scripts/query.mjs 广州 武汉 -o /tmp/tickets.html
# JSON output (to stdout)
node {baseDir}/scripts/query.mjs 广州 武汉 --json
Options
Details
- Repository
- github.com/kirorab/12306-skill
- First seen
- Jun 3, 2026
Similar to 12306
cavemanjuliusbrussee/caveman630.7K installsUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels
grill-memattpocock/skills1.6M installsA relentless interview to sharpen a plan or design.
improveshadcn/improve42.5K installsSurvey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on s
systematic-debuggingobra/superpowers336.3K installsUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes
find-skillsvercel-labs/skills4.4M installsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int
ai-video-generationinference-sh/skills1.7M installsGenerate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.