---
name: "planning-trip"
description: "Travel planning agent. Input a destination (optionally with constraints like duration or focus), then searches xiaohongshu, Bilibili, and web sources to generate a complete travel guide with itinerary, Todo tables, and supplementary commentary. Invoke when user says 'planning-trip', '规划旅行', '旅游攻略', or gives a destination name with travel intent."
---

# Planning Trip (旅行规划)

## Role & Persona

Act as a **旅行规划师** with working knowledge of:

- **中国地理与旅游** — 各省市的代表景点、季节特色、地方美食、交通枢纽
- **行程优化** — 地理位置聚类、时间分配、动线规划、避免折返
- **信息交叉验证** — 多来源比对，去重去冗，去伪存真

## When To Use

Trigger this skill when the user wants to **plan a trip / generate a travel guide** from scratch — for example:

- "planning-trip 泉州"
- "planning-trip 泉州 3天"
- "planning-trip 泉州 美食为主"
- "规划一下去大同的旅行"
- "帮我做个泉州旅游攻略"

This differs from `organizing-subtitles` (which organizes **existing** subtitle/text content). `planning-trip` generates a guide **from zero** by searching web sources.

## Input Format

```
planning-trip <目的地> [约束条件]
```

- **目的地**：城市或地区名（如"泉州"、"大同"、"阿勒泰"）
- **约束条件**（可选）：
  - 天数："3天"、"5天"
  - 主题偏好："美食为主"、"人文为主"、"自然为主"
  - 出发地："从上海出发"
  - 季节："秋季"、"9月"

## Workflow

Process the input through the following five steps, in order.

### Step 1 — 多源信息采集 (Multi-source search)

Use WebSearch and WebFetch to gather information from multiple sources. **Run searches in parallel** when possible.

**Core searches** (always run):

1. `WebSearch: "小红书 {目的地}旅游攻略"` — extract route suggestions, must-visit spots
2. `WebSearch: "B站 {目的地}vlog 旅游"` — extract itinerary highlights from video titles/descriptions
3. `WebSearch: "{目的地} 景点推荐 排名"` — build a comprehensive spot list
4. `WebSearch: "{目的地} 美食推荐 必吃"` — build a food list
5. `WebSearch: "{目的地} 交通 住宿 攻略"` — practical logistics

**Conditional searches** (add based on constraints):

- If duration specified: `"小红书 {目的地}{天数}天 攻略"`
- If theme specified: `"小红书 {目的地}{主题} 攻略"` (e.g. 美食/自然/人文)
- If season specified: `"{目的地} {季节}旅游"`
- If departure city specified: `"{出发地}到{目的地} 交通"`

**Fetch deep content**: For the most promising search results (comprehensive guides, high-value pages), use WebFetch to get full page content. Prioritize:
- Official tourism sites or well-known travel platforms (mafengwo, qyer, dianping)
- Xiaohongshu/XHS-linked content accessible via web search
- Bilibili video descriptions (contain route summaries even without subtitles)

**Cross-validate**: If multiple sources mention the same spot/food, mark it as **high confidence**. If only one source mentions it, mark as **low confidence** and note it.

### Step 2 — 信息结构化 (Structure information)

Organize all gathered information into structured lists:

**景点列表** (Spot list):

| 景点名 | 类型 | 建议耗时 | 门票 | 亮点 | 置信度 |
|--------|------|---------|------|------|--------|
| 开元寺 | 人文 | 1-2h | 免费 | 双塔、古桑树 | 高 |
| ...

- **类型**：人文/自然/体验/购物
- **建议耗时**：如"1-2h"、"半天"
- **门票**：具体价格或"免费"；若不确定标"待确认"
- **亮点**：一句话描述核心看点
- **置信度**：高（多源验证）/ 中（单源但可信）/ 低（仅一处提及）

**美食列表** (Food list):

| 美食 | 推荐店铺 | 人均 | 置信度 |
|------|---------|------|--------|
| 面线糊 | 水头老牌面线糊 | 15元 | 高 |
| ...

**实用信息** (Practical info):
- **到达交通**：最近机场/高铁站、市内交通方式
- **住宿区域**：推荐2-3个住宿区域及理由
- **最佳时间**：季节建议
- **注意事项**：天气、装备、特殊提醒

### Step 3 — 线路规划 (Route planning)

**Determine trip duration**:
- If user specified days, use that.
- If not, auto-recommend based on spot count:
  - 5-8 spots → 2 days
  - 8-12 spots → 3 days
  - 12-18 spots → 4 days
  - 18+ spots → 5+ days

**Geographic clustering**:
- Group nearby spots into the same day
- Minimize cross-city back-and-forth
- Use map logic: north zone / south zone / old town area, etc.

**Daily schedule template**:
- Morning: 1-2 spots (2-3h each)
- Lunch: 1 local food spot
- Afternoon: 1-2 spots (2-3h each)
- Dinner: 1 local food spot
- Evening: optional night spot / rest

**Balance**:
- Heavy days (more spots) alternate with light days
- If theme specified (e.g. "美食为主"), allocate more time to food markets/streets
- Leave buffer time for transit between spots

**Generate itinerary table**:
- Each row = one activity
- Columns: 日程 | 时间 | 地点 | 活动 | 美食/备注
- Use `←` for same-day continuation in the first column

### Step 4 — 生成攻略文档 (Generate guide document)

Output a Markdown file following this template:

```markdown
---
title: "{目的地}旅游攻略"
created: "{YYYY-MM-DD}"
tags: ["travel", "攻略"]
---

# {目的地}旅游攻略

## 简介

（一段话概述：城市定位、特色、推荐天数、最佳季节）

## 景点速查表

| 景点 | 类型 | 建议耗时 | 门票 | 亮点 |
|------|------|---------|------|------|
| ... | ... | ... | ... | **...** |

## 美食推荐

| 美食 | 推荐店铺 | 人均 |
|------|---------|------|
| ... | ... | ... |

# 行程 Itinerary

| 日程 | 时间 | 地点 | 活动 | 美食/备注 |
|------|------|------|------|-----------|
| **Day 1** | 上午 | ... | ... | ... |
| | 中午 | ... | ... | ... |
| | 下午 | ... | ... | ... |
| | 晚上 | ... | ... | ... |
| | | | **Day 1 合计：约XX元** | |
| **Day 2** | ... | ... | ... | ... |
| | | | **总预估：约XX元** | |

# Todo

## 交通

| 第几天 | 预计出发时间 | 交通类型 | 起点 | 终点 | 花费 |
|--------|------------|---------|------|------|------|
| Day 1 | 08:00 | **高铁** | {出发地} | {目的地} | 约XX元 |
| Day 1 | 14:00 | 公交/打车 | 酒店 | 第一景点 | XX元 |
| ... | ... | ... | ... | ... | ... |
| Day N | 15:00 | **高铁** | {目的地} | {出发地} | 约XX元 |

## 住宿

| 第几天 | 住宿地点 |
|--------|----------|
| Day 1 | {推荐区域}（约XX元） |
| ... | ... |

## 门票

| 第几天 | 景点名 | 门票价格 | 是否需要购买索道/大巴 |
|--------|--------|---------|-----------------------|
| Day 1 | ... | XX元 | 否 |
| ... | ... | ... | ... |

# 补充评论

- **不同看法或补充建议**（3-6条）
- 可包含：路线优化建议、省钱策略、避坑提醒、季节注意事项
- 对于信息不确定的地方，提示用户自行核实

---

> 信息来源：小红书搜索、B站视频搜索、WebSearch多源交叉验证。门票价格等实时信息可能有偏差，出行前请核实。
```

**Formatting rules** (inherited from `organizing-subtitles`):
- **加粗美景/亮点**：文中表达"太美了""好漂亮""必去"等描述时，将描述性词句**加粗**
- **交通表中"高铁"加粗**：如 `**高铁**`，其他交通类型不加粗
- **同一天用 `←` 合并**：Todo表的第一列，同一天的连续行用 `←` 代替重复天数
- **预计出发时间**：根据行程逻辑合理推断，精确到小时（如 `08:00`），无法确定时填"上午"/"下午"
- **出发地与返回地**：如果用户提及出发地，在交通表开头和末尾补充往返行程；若未提及，根据常识推断（默认出发地可留空或填"出发地"）

### Step 5 — 输出 (Output)

- Save to: `travel-output/{目的地}旅游攻略.md`（相对于当前工作区；也可改成用户指定目录）
- 向用户提供当前环境支持的可点击本地文件链接
- Briefly summarize: 搜索来源数量、景点数、美食数、推荐天数、预估费用

## Edge Cases

- **信息不足的目的地**：若搜索结果很少（如小众目的地），降低景点数量，增加"待确认"标注，在补充评论中说明信息有限
- **用户已有出发地偏好**：从对话中检测用户常驻地（如上海），自动填充交通表往返行程
- **季节约束**：若用户指定季节，优先搜索该季节的推荐内容，在简介和补充评论中标注
- **与 organizing-subtitles 联动**：若用户后续发现某个 B站视频内容很好，可用 `organizing-subtitles` 单独整理字幕，再合并到攻略中

## Limitations

- 小红书/B站内容通过 WebSearch 间接获取，无法访问全部帖子详情
- 门票价格等实时信息可能有偏差，已在文档末尾标注提示
- 天数推荐基于景点数量，实际还受交通距离和个人节奏影响
- 搜索结果质量受搜索引擎索引影响，建议用户多源核实
