This is a wrapper around China Railway's official 12306 API for querying train schedules and ticket availability. You can filter by train type (G/D/Z/T/K), departure windows, travel duration, and seat class, with output in HTML, markdown tables, or JSON. The station lookup is essential because city names are ambiguous (武汉 has four stations, 上海 has four, and querying by city returns trains from any of them). If you're building travel tools for China or need to help users plan high-speed rail trips with transfers, this handles the tedious parts. No API key needed since it hits the public endpoint directly, and station data caches locally for a week.
npx skills add https://github.com/kirorab/12306-skill --skill 12306