Traffic Query
Overview
Use this skill to gather and summarize domestic China flight and train information.
Prioritize getting a complete, verifiable list over giving a fast but fuzzy answer.
Prefer Browser Relay for already-open result pages; use public pages only when necessary.
Core workflow
- 1. Extract the search constraints.
- Choose the best source.
- Collect raw results.
- Normalize into a clean list.
- Summarize the best options and any caveats.
1) Extract constraints
Identify and restate internally:
- - mode: flight / train / either
- origin
- destination
- departure date
- one-way / round-trip
- filters: direct only, earliest, cheapest, specific airline/train type, arrival deadline, station/airport preference
If the user omits a critical field, ask only for the missing field.
2) Source priority
Choose sources in this order:
Flights
- 1. User-opened results page via Browser Relay if available
- Airline / airport official pages
- Ctrip / Trip.com / similar OTA results pages
- Flight status/reference sites for schedule confirmation only
Trains
- 1. User-opened 12306 or OTA results page via Browser Relay if available
- 12306 web pages
- Ctrip / Trip.com rail pages
- Other public timetable pages for backup only
3) Retrieval strategy
When Browser Relay is available
Use the connected browser tab first. It is best for:
- - logged-in pages
- dynamic results
- anti-bot heavy pages
- extracting all rows from an already-filtered result page
When only public web is available
Use browser automation or web fetch to reach a public results page.
If the site is dynamic and does not expose clean results, say so clearly instead of inventing missing rows.
When using Agent Browser / browser automation
- - Prefer result pages with explicit route/date parameters.
- Re-snapshot after each page/state change.
- Be careful with city-level routes versus exact airport/station routes.
- Confirm whether the page is showing BJS vs PKX, SHA vs PVG, etc.
4) Normalize output
Always normalize each result into the same fields where available.
Flights
- - airline
- flight number
- origin airport
- destination airport
- departure time
- arrival time
- duration
- direct / stopover
- price
- cabin if visible
- source
Trains
- - train number
- train type (G/D/C/Z/T/K etc.)
- origin station
- destination station
- departure time
- arrival time
- duration
- seat classes / remaining tickets if visible
- price
- source
If a field is unavailable, leave it blank in notes rather than guessing.
5) Response format
When the user asks for all matching options, provide:
- 1. brief scope line
- full list
- short highlights: earliest / cheapest / best balance
- caveats about source quality or incomplete fields
Recommended compact format for chat:
- - 航司/车次|出发-到达|时长|直飞/经停或车型|价格
Example:
- - 南航 CZxxxx|07:30-10:45|3h15m|直飞|¥980
- 高铁 Gxxxx|08:00-16:32|8h32m|二等座 ¥553
Reliability rules
- - Do not claim results are complete unless the page clearly exposes the full list.
- Distinguish schedule info from bookable price info.
- Say when prices may vary by seat/cabin, region, or login state.
- If only partial data is available, explicitly label it as partial.
- Prefer honesty over false precision.
Fallback guidance
If the user wants a complete real-time list and public scraping is unreliable:
- - ask them to open a filtered result page in browser
- connect via Browser Relay
- extract directly from that page
References
For source-specific notes and caveats, read references/sources.md.
交通查询
概述
使用此技能收集和汇总国内航班和火车信息。优先获取完整、可验证的列表,而非快速给出模糊答案。对于已打开的搜索结果页面,优先使用浏览器中继;仅在必要时使用公共页面。
核心工作流程
- 1. 提取搜索条件
- 选择最佳来源
- 收集原始结果
- 规范化为清晰列表
- 总结最佳选项及注意事项
1) 提取条件
识别并在内部重新表述:
- - 交通方式:航班/火车/均可
- 出发地
- 目的地
- 出发日期
- 单程/往返
- 筛选条件:仅直飞、最早、最便宜、特定航空公司/列车类型、到达时限、车站/机场偏好
如果用户遗漏关键字段,仅询问缺失字段。
2) 来源优先级
按以下顺序选择来源:
航班
- 1. 用户通过浏览器中继打开的搜索结果页面(如有)
- 航空公司/机场官方网站
- 携程/Trip.com/类似OTA搜索结果页面
- 航班状态/参考网站(仅用于时刻确认)
火车
- 1. 用户通过浏览器中继打开的12306或OTA搜索结果页面(如有)
- 12306网页
- 携程/Trip.com铁路页面
- 其他公共时刻表页面(仅作为备用)
3) 检索策略
当浏览器中继可用时
优先使用已连接的浏览器标签页。最适合:
- - 已登录页面
- 动态结果
- 反爬虫机制较强的页面
- 从已筛选的结果页面提取所有行
仅公共网页可用时
使用浏览器自动化或网页抓取访问公共结果页面。如果网站是动态的且未显示清晰结果,应明确说明,而非编造缺失行。
使用代理浏览器/浏览器自动化时
- - 优先选择带有明确路线/日期参数的结果页面
- 每次页面/状态变化后重新截图
- 注意城市级路线与精确机场/车站路线的区别
- 确认页面显示的是BJS还是PKX、SHA还是PVG等
4) 规范化输出
始终将每个结果规范化为相同字段(如可用)。
航班
- - 航空公司
- 航班号
- 出发机场
- 到达机场
- 出发时间
- 到达时间
- 飞行时长
- 直飞/经停
- 价格
- 舱位(如可见)
- 来源
火车
- - 车次
- 列车类型(G/D/C/Z/T/K等)
- 出发站
- 到达站
- 出发时间
- 到达时间
- 运行时长
- 座位等级/余票(如可见)
- 价格
- 来源
如果某字段不可用,在备注中留空,而非猜测。
5) 回复格式
当用户询问所有匹配选项时,提供:
- 1. 简要范围说明
- 完整列表
- 简短亮点:最早/最便宜/最佳平衡
- 关于来源质量或字段不完整的注意事项
推荐的聊天紧凑格式:
- - 航司/车次|出发-到达|时长|直飞/经停或车型|价格
示例:
- - 南航 CZxxxx|07:30-10:45|3h15m|直飞|¥980
- 高铁 Gxxxx|08:00-16:32|8h32m|二等座 ¥553
可靠性规则
- - 除非页面明确显示完整列表,否则不得声称结果完整。
- 区分时刻信息与可预订价格信息。
- 说明价格可能因座位/舱位、地区或登录状态而异。
- 如果仅有部分数据可用,明确标注为部分数据。
- 诚实优于虚假精确。
备用指引
如果用户需要完整的实时列表,而公共抓取不可靠:
- - 请他们在浏览器中打开筛选后的结果页面
- 通过浏览器中继连接
- 直接从该页面提取
参考资料
关于特定来源的说明和注意事项,请阅读 references/sources.md。