China Travel Planner
Plan practical domestic trips in China by combining itinerary design with real-time-ish search from flyai.
This skill is for planning-first travel help. Use it to turn a vague request like “清明去杭州玩两天怎么安排” into a usable plan with destination logic, transport suggestions, hotel area recommendations, attraction picks, and a day-by-day itinerary.
Core workflow
- 1. Clarify the trip frame
- Extract or ask for: departure city, destination, travel dates, duration, traveler type, budget, pace, and priorities.
- Also detect hard constraints such as:
- fixed hotel already booked
- must-visit cities
- every metro line must be ridden at least once
- hotel must be close to a given metro line / station / interchange
- If the user is vague, make reasonable assumptions and label them clearly.
- 2. Pick the planning mode
-
Light plan: quick destination ideas or a rough 1-3 day outline.
-
Standard plan: transport + hotel area + POIs + daily itinerary.
-
Comparison plan: compare 2-3 destinations, hotel zones, or transport options.
-
Booking-oriented plan: prioritize flight/hotel/ticket search and provide booking links.
-
Transit-constrained plan: optimize around metro-line coverage, fixed hotel anchors, or nearby side trips.
- 3. Choose the right data source mix
- Use
flyai fliggy-fast-search for broad natural-language discovery.
- Use
flyai search-flight for flight comparison when flights matter.
- Use
flyai search-hotels for hotel options near a city or POI.
- Use
flyai search-poi for attraction candidates inside the target city.
- Use public metro data when the plan depends on line coverage, station lists, or metro-aware hotel selection.
- 4. Turn results into a China-friendly plan
- Prefer practical advice over generic marketing copy.
- For domestic travel, explicitly cover:
- how to arrive: plane / high-speed rail / city transfer logic
- where to stay: district / landmark / transport convenience
- must-see vs optional POIs
- crowd avoidance / holiday pressure / realistic pacing
- budget bands
- if transit constraints exist: which lines are covered on which days
- 5. Produce a final answer that is actually usable
- Start with the recommendation.
- Then give the itinerary and concrete options.
- Keep it readable; do not dump raw JSON unless the user explicitly wants structured output.
- 6. When the trip may become a web page or reusable artifact, also prepare structured data
- Prefer a stable JSON structure that can populate reusable cards and sections.
- Align with a page-data model such as:
meta,
hero,
stats,
hotels,
metroCoverage,
days,
sideTrips,
attractions,
tips.
- Keep destination-specific wording in data values, not in page/template structure.
Planning heuristics for domestic China trips
Trip type presets
1. Weekend / short break
- - Default to 2D1N or 3D2N.
- Prefer compact cities or one core area.
- Avoid stuffing too many attractions into one day.
- Optimize for low transfer friction.
2. Family trip
- - Prefer fewer hotel changes.
- Reduce aggressive early departures.
- Prioritize stable meal / restroom / stroller / queue conditions when relevant.
- Recommend attractions with mixed-age tolerance.
3. Holiday trip
- - Warn about crowding, traffic, and price spikes.
- Suggest early/late entry windows and alternative districts.
- Offer a mainstream plan plus a crowd-avoidance backup.
4. Budget trip
- - Prioritize rail over flight where reasonable.
- Prefer transport-convenient hotel areas over luxury scenic isolation.
- Separate “must spend” from “optional upgrade”.
5. Relaxed trip
- - Limit major POIs per day.
- Add café / night walk / slow sightseeing blocks.
- Favor one scenic area plus one food/urban area per day.
How to use flyai commands
A. Broad discovery
Use when the user is still fuzzy, such as:
- - “杭州三天怎么玩”
- “五一国内去哪儿适合亲子”
- “苏州周末度假住哪方便”
Command pattern:
CODEBLOCK0
Use broad search first to collect candidate products, local experiences, hotel packages, or bundled travel ideas.
B. Flight comparison
Use when the user is traveling farther or explicitly asks about flights.
Command pattern:
CODEBLOCK1
Prefer sorting by:
- -
3 for lowest price - INLINECODE15 for direct-priority
- INLINECODE16 for shortest duration
For domestic planning, mention whether high-speed rail may be more sensible if flight transfer friction is high.
C. Hotel search
Use when deciding where to stay, especially around scenic areas or transit hubs.
Command pattern:
CODEBLOCK2
Hotel guidance:
- - If the user values convenience, recommend by area first, hotel second.
- Explain why the area works: near metro / scenic area / food street / station.
- When budget is unclear, give 3 price bands if possible.
D. POI search
Use when building the daily route.
Command pattern:
CODEBLOCK3
Group POIs into:
- - must-see
- optional swap-ins
- niche / backup choices
Output rules
- - Always return a curated plan, not raw command output.
- If flyai returns image URLs, place the image line before the booking link.
- If flyai returns booking/detail URLs, include them when helpful.
- Mention that recommendations are based on fly.ai / Fliggy results when using those results.
- In Feishu chats, prefer bullets over markdown tables unless the comparison truly benefits from a table.
Recommended answer structure
Fast recommendation
- - Who this plan is for
- Why this destination / route fits
- Budget feel: economical / moderate / comfortable
Trip snapshot
- - Duration
- Best departure method
- Suggested stay area
- Top highlights
Day-by-day itinerary
For each day include:
- - morning
- lunch suggestion area
- afternoon
- evening
- pacing note / transfer note
Hotel suggestion
- - best area to stay
- 2-3 hotel choices if available
- who each option suits
Transport suggestion
- - plane vs rail judgment if relevant
- arrival/departure advice
- local transport note
Notes
- - booking tips
- crowd avoidance
- weather / season / holiday reminders if obvious from context
Structured output mode for reusable web pages
When the user wants a web page, reusable framework, shareable itinerary page, or future automation, also organize the content into stable sections.
Recommended top-level keys:
- - INLINECODE17
- INLINECODE18
- INLINECODE19
- INLINECODE20
- INLINECODE21
- INLINECODE22
- INLINECODE23
- INLINECODE24
- INLINECODE25
What to produce
Whenever possible, produce two synchronized layers:
- 1. Readable itinerary summary
- Structured trip data
The readable summary should be easy to read in chat.
The structured layer should be easy to feed into travel-page-framework.
Card conventions
Hotel cards
Use fields such as:
- - INLINECODE27
- INLINECODE28
- INLINECODE29
- INLINECODE30
- INLINECODE31
- INLINECODE32
- INLINECODE33
- INLINECODE34
- INLINECODE35
Day cards
Use fields such as:
- - INLINECODE36
- INLINECODE37
- INLINECODE38
- INLINECODE39
- INLINECODE40
- INLINECODE41
- INLINECODE42
- INLINECODE43
- INLINECODE44
- INLINECODE45
Attraction cards
Use fields such as:
- - INLINECODE46
- INLINECODE47
- INLINECODE48
- INLINECODE49
- INLINECODE50
- INLINECODE51
Keep structured card text concise and web-friendly.
Working rule
If the user explicitly wants a web page, page framework, reusable travel card layout, or future rendering, read references/structured-output-mode.md and organize the plan so the text layer and structured layer remain consistent.
Page generation pipeline
Use this when the user wants a shareable web page, standalone HTML itinerary, or asks for a "travel page" / "行程页面". The pipeline turns a travel plan into a static HTML page powered by the travel-page-framework.
Flow
CODEBLOCK4
Step-by-step
- 1. Plan the trip using the normal planning workflow above.
- Generate structured JSON from a natural-language prompt:
CODEBLOCK5
Options:
- -
--with-metro: auto-fetch metro/subway data for the city - INLINECODE55 : auto-search Wikimedia Commons for attraction images
- INLINECODE56 : read prompt from a file instead of CLI arg
- INLINECODE57 /
-o: output path (default: trip-data.json) - INLINECODE60 : pretty-print the JSON
- 3. Review and refine the generated
trip-data.json. The auto-generated skeleton is a starting point — fill in richer descriptions, swap placeholder images, and adjust day-by-day segments as needed. Follow the content guidelines in page-generator/schema/trip-content-guidelines.md.
- 4. Validate the data against the schema:
CODEBLOCK6
- 5. Build the static site:
CODEBLOCK7
This produces dist/index.html + dist/trip-data.json. Preview with:
CODEBLOCK8
- 6. (Optional) Deploy to GitHub Pages:
CODEBLOCK9
Schema and content guidelines
- - JSON schema: INLINECODE65
- Content writing guide: INLINECODE66
- Required top-level keys:
meta, hero, stats, hotels, metroCoverage, days, sideTrips, attractions, INLINECODE75
When to use tpf-generate vs manual JSON
- - tpf-generate: quick scaffolding from a one-liner prompt. Good for getting the structure right fast.
- Manual JSON: when you already have a detailed plan from the chat workflow and want precise control over every field.
In practice, generate the skeleton first, then hand-edit or have the agent refine it.
When information is missing
If critical info is missing, ask at most the smallest set of questions needed. Prioritize:
- 1. 出发地
- 日期 / 天数
- 预算
- 几个人、什么类型(情侣 / 亲子 / 家庭 / 独自)
If the user just wants a quick answer, do not block on questions. State assumptions and give a draft plan.
Scripts
scripts/fetch_subway_data.py
Use this script when the plan depends on metro / subway line coverage or station lists.
Examples:
CODEBLOCK10
Behavior:
- - reads the AMap subway city index
- resolves the city by Chinese name / pinyin / city id
- fetches line + station data
- outputs JSON for downstream planning
Use the result to:
- - count how many lines a city has
- list line names
- see station lists for each line
- support "every line must be ridden once" planning
scripts/metro_hotel_match.py
Use this script to rank hotels by metro convenience.
Examples:
CODEBLOCK11
Behavior:
- - reads subway JSON and hotel JSON
- scores hotels by target station / line mentions plus transit-convenience hints
- returns a ranked list with reasons
scripts/coverage_plan_notes.py
Use this script to generate lightweight notes for line-coverage planning.
Examples:
CODEBLOCK12
Behavior:
- - summarizes each line
- notes whether the hotel anchor lies on that line
- gives rough planning hints for route design
page-generator/scripts/wikimedia_image_search.py
Use this script to find free-license images from Wikimedia Commons for attractions, landmarks, or city scenes. Use it when populating
image fields in structured trip data.
Keyword search:
CODEBLOCK13
Category browse:
CODEBLOCK14
Batch mode (read a JSON file with multiple search specs):
CODEBLOCK15
Batch input format (landmarks.json):
CODEBLOCK16
Options:
- -
--limit / -n: number of results (default: 5) - INLINECODE84 /
-w: thumbnail width in pixels (default: 1200) - INLINECODE86 /
-o: write results to file instead of stdout - INLINECODE88 : pretty-print JSON
Output: JSON array of {title, url, thumbUrl, width, height, license, description}. All images carry free licenses (CC / Public Domain).
References
Read these only when needed:
- -
../flyai/references/fliggy-fast-search.md for broad natural-language search - INLINECODE91 for flight parameters and output fields
- INLINECODE92 for hotel filters and fields
- INLINECODE93 for attraction filters and fields
- INLINECODE94 for metro-line coverage, fixed-hotel anchors, and metro-aware hotel selection
- INLINECODE95 for common domestic trip phrasing and default itinerary patterns
- INLINECODE96 for producing reusable structured trip data alongside readable itinerary text
- INLINECODE97 for reusable travel-page content structure and card-writing conventions
中国旅行规划师
通过将行程设计与来自flyai的实时搜索相结合,规划实用的国内旅行。
此技能专注于规划优先的旅行帮助。用它来将诸如“清明去杭州玩两天怎么安排”这样模糊的请求,转化为包含目的地逻辑、交通建议、酒店区域推荐、景点选择以及逐日行程的可用计划。
核心工作流程
- 1. 明确行程框架
* 提取或询问:出发城市、目的地、旅行日期、时长、旅行者类型、预算、节奏和优先事项。
* 同时检测硬性约束,例如:
* 已预订的固定酒店
* 必游城市
* 必须乘坐至少一次每条地铁线路
* 酒店必须靠近指定的地铁线路/站点/换乘站
* 如果用户表述模糊,做出合理假设并清晰标注。
- 2. 选择规划模式
*
轻量计划:快速的目的地想法或粗略的1-3天大纲。
*
标准计划:交通 + 酒店区域 + 兴趣点 + 每日行程。
*
对比计划:比较2-3个目的地、酒店区域或交通选项。
*
预订导向计划:优先搜索航班/酒店/门票并提供预订链接。
*
交通受限计划:围绕地铁线路覆盖、固定酒店锚点或附近的一日游进行优化。
- 3. 选择合适的数据源组合
* 使用flyai fliggy-fast-search进行广泛的自然语言发现。
* 当航班重要时,使用flyai search-flight进行航班比较。
* 使用flyai search-hotels查找城市或兴趣点附近的酒店选项。
* 使用flyai search-poi查找目标城市内的候选景点。
* 当计划依赖于线路覆盖、站点列表或地铁感知的酒店选择时,使用公共地铁数据。
- 4. 将结果转化为适合中国的计划
* 优先提供实用建议,而非通用营销文案。
* 对于国内旅行,明确涵盖:
* 如何到达:飞机/高铁/城市换乘逻辑
* 住在哪里:区域/地标/交通便利性
* 必游与可选兴趣点
* 避开人群/节假日压力/现实的节奏安排
* 预算范围
* 如果存在交通限制:每天覆盖哪些线路
- 5. 生成真正可用的最终答案
* 从推荐开始。
* 然后给出行程和具体选项。
* 保持可读性;除非用户明确要求结构化输出,否则不要直接输出原始JSON。
- 6. 当行程可能成为网页或可复用产物时,同时准备结构化数据
* 优先采用稳定的JSON结构,以便填充可复用的卡片和章节。
* 与页面数据模型对齐,例如:meta、hero、stats、hotels、metroCoverage、days、sideTrips、attractions、tips。
* 将特定于目的地的措辞保留在数据值中,而不是页面/模板结构中。
国内旅行规划启发式规则
行程类型预设
1. 周末/短假
- * 默认为2天1晚或3天2晚。
- 优先选择紧凑型城市或一个核心区域。
- 避免一天内塞入过多景点。
- 优化以减少换乘麻烦。
2. 家庭旅行
- * 优先减少更换酒店的次数。
- 减少过早的出发安排。
- 在相关情况下,优先考虑稳定的用餐/洗手间/婴儿车/排队条件。
- 推荐适合多年龄段人群的景点。
3. 节假日旅行
- * 提醒注意拥挤、交通和价格上涨。
- 建议提早/延迟入场时间窗口和替代区域。
- 提供主流计划加避开人群的备选计划。
4. 预算旅行
- * 在合理的情况下,优先选择铁路而非航班。
- 优先选择交通便利的酒店区域,而非奢华的风景隔离区。
- 区分“必须花费”和“可选升级”。
5. 休闲旅行
- * 限制每天的主要兴趣点数量。
- 增加咖啡馆/夜间散步/慢节奏观光时段。
- 倾向于每天一个风景区加一个美食/市区。
如何使用flyai命令
A. 广泛发现
当用户仍不明确时使用,例如:
- * “杭州三天怎么玩”
- “五一国内去哪儿适合亲子”
- “苏州周末度假住哪方便”
命令模式:
bash
flyai fliggy-fast-search --query 杭州三日游
首先使用广泛搜索来收集候选产品、当地体验、酒店套餐或打包旅行创意。
B. 航班比较
当用户旅行距离较远或明确询问航班时使用。
命令模式:
bash
flyai search-flight --origin 北京 --destination 杭州 --dep-date 2026-04-04 --sort-type 3
优先按以下方式排序:
对于国内规划,如果航班换乘麻烦较大,需提及高铁可能更合理。
C. 酒店搜索
在决定住宿地点时使用,尤其是在风景区或交通枢纽附近。
命令模式:
bash
flyai search-hotels --dest-name 杭州 --poi-name 西湖 --check-in-date 2026-04-04 --check-out-date 2026-04-06 --sort rate_desc
酒店指导:
- * 如果用户看重便利性,先推荐区域,再推荐酒店。
- 解释该区域为何合适:靠近地铁/风景区/美食街/车站。
- 当预算不明确时,尽可能给出3个价格区间。
D. 兴趣点搜索
在构建每日路线时使用。
命令模式:
bash
flyai search-poi --city-name 杭州 --keyword 西湖
将兴趣点分组为:
输出规则
- * 始终返回精心策划的计划,而非原始命令输出。
- 如果flyai返回图片URL,将图片行放在预订链接之前。
- 如果flyai返回预订/详情URL,在有用时包含它们。
- 在使用fly.ai/飞猪结果时,提及建议基于fly.ai / 飞猪结果。
- 在飞书聊天中,优先使用项目符号而非Markdown表格,除非比较确实需要表格才能清晰展示。
推荐答案结构
快速推荐
- * 此计划适合谁
- 为什么此目的地/路线合适
- 预算感觉:经济 / 适中 / 舒适
行程概览
逐日行程
每天包括:
- * 上午
- 午餐建议区域
- 下午
- 晚上
- 节奏提示 / 换乘提示
酒店建议
- * 最佳住宿区域
- 2-3个酒店选择(如有)
- 每个选项适合谁
交通建议
- * 飞机与铁路的判断(如相关)
- 到达/离开建议
- 当地交通提示
备注
- * 预订提示
- 避开人群
- 天气/季节/节假日提醒(如果上下文明显)
可复用网页的结构化输出模式
当用户想要一个网页、可复用框架、可分享的行程页面或未来自动化时,同时将内容组织成稳定的章节。
推荐的顶层键:
- * meta
- hero
- stats
- hotels
- metroCoverage
- days
- sideTrips
- attractions
- tips
需要生成的内容
尽可能生成两个同步的层:
- 1. 可读的行程摘要
- 结构化的行程数据
可读摘要应易于在聊天中阅读。
结构化层应易于输入到travel-page-framework中。
卡片约定
酒店卡片
使用如下字段:
- * phase
- name
- dateRange
- station
- status
- price
- distanceToMetro
- image
- highlights
每日卡片
使用如下字段:
- * day
- date
- theme
- city
- hotel
- metroLines
- segments.morning
- segments.afternoon
- segments.evening
- note
景点卡片
使用如下字段:
- * name
- city
- type
- image
- description
- bestFor
保持结构化卡片文本简洁且适合网页。
工作规则
如果用户明确想要一个网页、页面框架、可复用的旅行卡片布局或未来渲染,请阅读references/structured