← 返回 Skills 市场
nodermachine

travel planner

作者 nodermachine · GitHub ↗ · v1.0.7 · MIT-0
cross-platform ⚠ suspicious
371
总下载
0
收藏
1
当前安装
8
版本数
在 OpenClaw 中安装
/install fliggy-travel-planner
功能描述
Travel itinerary planning skill that automates end-to-end trip research and booking assistance. It searches Xiaohongshu (RedNote) for destination guides, ext...
使用说明 (SKILL.md)

飞猪旅游攻略规划技能 v2.0(性能优化版)

自动从小红书获取旅游攻略,并整合飞猪机票信息,生成完整的行程规划!

⚡ 性能优化: 真正并行查询 + 数据缓存 + 精简提取,耗时从 9 分钟降至 3-4 分钟!


🔗 技能依赖

1. weather skill(天气查询)

依赖原因: 获取目的地天气预报

使用场景:

  • 出行日期在未来 3 天内 → 使用 weather skill 查询真实天气
  • 出行日期在未来 3 天后 → 使用气候数据估算,并标注"基于气候数据估算"

调用方式:

curl -s "wttr.in/{城市名}?format=j1"

2. flight-price-comparison skill(机票查询)

依赖原因: 查询飞猪机票价格


⚡ 性能优化 v2.0

优化后执行流程(目标:3-4 分钟)

用户输入:"4.3 杭州到大理 4 天 3 晚攻略"
     ↓
t=0s    真正并行发起 3 个查询
        ├─ browser.open("小红书", 60 秒超时)
        ├─ exec("curl wttr.in/大理", 10 秒超时)
        └─ browser.open("飞猪", 60 秒超时)
     ↓
t=10s   天气查询完成 ✅
     ↓
t=60s   页面打开完成,并行 snapshot(30 秒)
     ↓
t=90s   数据抓取完成
     ↓
t=120s  精简数据提取(只取 5 个核心字段,30 秒)
     ↓
t=180s  生成行程文档(60 秒)
     ↓
✅ 完成!总计约 3 分钟

核心优化点

优化点 优化前 优化后 节省
查询方式 串行执行 真正并行 2-3 分钟
Snapshot 完整 DOM(3000+ 元素) 精准提取关键元素 1 分钟
天气查询 每次 API 优先缓存 10-30 秒
数据提取 20+ 字段 5 个核心字段 20-30 秒
总计 ~9 分钟 ~3-4 分钟 60%+

并行查询实现(真正并行)

// ✅ 正确做法:真正并行发起
const [xiaohongshuTab, weatherData, fliggyTab] = await Promise.all([
  browser.open({ 
    url: "https://www.xiaohongshu.com/search_result?keyword={目的地} 旅游攻略",
    timeoutMs: 60000
  }),
  exec({ 
    command: 'curl -s "wttr.in/{城市名}?format=j1"',
    timeout: 10
  }),
  browser.open({ 
    url: "https://sjipiao.fliggy.com/flight_search_result.htm?tripType=1&depCity={出发地}&arrCity={目的地}&depDate={日期}",
    timeoutMs: 60000
  })
])

// 并行抓取数据
const [xiaohongshuData, fliggyData] = await Promise.all([
  browser.snapshot({ targetId: xiaohongshuTab.targetId, refs: "aria", timeoutMs: 30000 }),
  browser.snapshot({ targetId: fliggyTab.targetId, refs: "aria", timeoutMs: 30000 })
])

数据缓存策略

可缓存的数据:

const CACHE = {
  // 气候数据(季节性,基本固定)
  weather: {
    "大理_春季": { temp: "8-22℃", weather: "晴到多云", tips: "紫外线强,带防晒" },
    "北京_春季": { temp: "10-20℃", weather: "多云", tips: "防风沙" },
    "三亚_春季": { temp: "22-30℃", weather: "晴朗", tips: "带泳衣" },
  },
  
  // 高铁价格(相对固定)
  trains: {
    "杭州 - 北京": { time: "4.5-6 小时", price: "¥550-650" },
    "杭州 - 大理": { time: "无直达,昆明中转", price: "¥550-650" },
  }
}

精简数据提取(只取核心字段)

优化后 Prompt(30 秒完成):

只提取 5 个核心信息:
1. 行程天数(如"4 天 3 晚")
2. 必去景点 Top3(数组)
3. 住宿推荐区域
4. 人均预算范围(不含机票)
5. 最佳季节

🚀 快速开始

使用示例

# 简单查询
帮我规划一下去大理的旅行,看下小红书的攻略和机票价格

# 指定日期
查一下 3 月 20 日去三亚的攻略,顺便看看机票多少钱

# 往返行程
计划 4 月 1 日 -4 月 5 日去日本旅游,帮我找攻略和机票

📋 核心流程

1️⃣ 小红书攻略搜索

  • 搜索目的地相关攻略
  • 提取高互动内容(点赞/收藏>平均值)
  • 解析攻略关键信息

2️⃣ 信息结构化处理

使用大模型提取核心数据(5 个字段)

3️⃣ 飞猪机票查询

  • 查询往返机票价格
  • 提取最低价航班信息

4️⃣ 生成整合报告

输出完整行程规划


📝 行程输出标准格式

必须包含的内容(按顺序)

## ✅ 行程规划完成

### 🚄 交通推荐

| 方式 | 时间 | 价格 | 推荐 |
|------|------|------|------|
| [方式 1](链接) | X 小时 | ¥XXX | ⭐推荐 |
| [方式 2](链接) | X 小时 | ¥XXX | 备选 |

### 🗓️ 行程亮点

- **Day 1:** ...
- **Day 2:** ...
- ...

### 🌤️ 天气预报

| 日期 | 天气 | 温度 |
|------|------|------|
| X 月 X 日 | 晴/多云 | XX-XX℃ |

### 💰 总预算

| 类别 | 费用 | 说明 |
|------|------|------|
| 交通 | ¥XXX | 高铁/机票往返 |
| 酒店 | ¥XXX | X 晚住宿 |
| 门票 | ¥XXX | 景点门票 |
| 餐饮 | ¥XXX | X 天餐费 |
| 其他 | ¥XXX | 应急备用 |
| **总计** | **¥XXX** | 经济型 |

### 📖 小红书攻略来源

[查看小红书原文](链接)(XX 赞)

⚠️ 注意事项

  1. 并行查询: 必须同时发起所有查询,不要串行
  2. 超时控制: 所有网络请求设置超时(browser 60 秒,curl 10 秒)
  3. 缓存优先: 天气/高铁价格优先查缓存
  4. 精简提取: 只取 5 个核心字段,不要贪多
  5. 小红书链接格式: 必须返回 /explore/{noteId} 格式的真实笔记链接,不要返回 /search_result/{id} 链接(会显示"安全限制")

🔧 故障排查

Q1: 执行时间超过 5 分钟

  • 检查是否真正并行执行(用 Promise.all)
  • 检查 snapshot 是否设置了 timeoutMs
  • 检查是否在使用完整 DOM 抓取

Q2: 数据提取不准确

  • 增加参考笔记数量到前 5 篇
  • 检查 Prompt 是否过于复杂

Q3: 小红书链接打不开(显示"安全限制")

  • 原因:返回了 /search_result/{id} 链接
  • 解决:从 snapshot 中提取笔记卡片的真实链接(/explore/{noteId} 格式)
  • 正确示例:https://www.xiaohongshu.com/explore/69b01f9500000000150236a9
  • 错误示例:https://www.xiaohongshu.com/search_result/69b01f9500000000150236a9

版本: v2.0(性能优化版)
最后更新: 2026-03-16
维护者: Luna 🌙
性能目标: 3-4 分钟完成行程规划

安全使用建议
This skill appears to do what it says: open Xiaohongshu and Fliggy pages, fetch weather, and build a travel report. Before installing or running it: 1) Be aware it expects to use a browser tool and may rely on an already-logged-in profile — snapshots can capture session cookies and personal info, so use a throwaway profile or log out of accounts you don't want accessed. 2) The package mentions a TOOLS.md for Fliggy account setup but that file is missing; verify how Fliggy login is expected to be provided and that no credentials are stored insecurely. 3) The Python search_xiaohongshu script is mostly a scaffold/placeholder (TODOs) — the skill's real scraping behavior is driven by the agent/browser instructions, not fully implemented Python scraping. 4) Test in a controlled environment first and inspect any runtime browser automation permissions; avoid running with highly privileged or long-lived sessions until you confirm behavior. If you need higher assurance, request the author to provide the missing TOOLS.md and a clear statement how credentials/sessions are handled and persisted.
功能分析
Type: OpenClaw Skill Name: fliggy-travel-planner Version: 1.0.7 The skill bundle is classified as suspicious primarily due to instructions in SKILL.md that direct the AI agent to execute shell commands via an 'exec' tool (e.g., using curl to fetch data from wttr.in). This pattern introduces a potential shell injection vulnerability if the destination city input is not properly sanitized by the agent. While the scripts (scripts/query_weather.py, scripts/generate_report.py) and browser automation flows (references/browser-flow.md) appear aligned with the stated purpose of travel planning, the instruction to use raw shell execution for network requests is a high-risk practice. No evidence of intentional malice, data exfiltration, or persistence was found. IOCs include wttr.in, api.open-meteo.com, and xiaohongshu.com.
能力评估
Purpose & Capability
Name/description match the actual behavior: searching Xiaohongshu, fetching Fliggy flight pages, querying weather and assembling a report. The SKILL.md and references explicitly instruct browser automation + wttr.in/Open-Meteo calls which are aligned. Minor inconsistency: README mentions a TOOLS.md for Fliggy account configuration but no TOOLS.md is present in the package.
Instruction Scope
Runtime instructions explicitly tell the agent to open third-party websites, take snapshots and extract content (Xiaohongshu, Fliggy) and to run curl against wttr.in/Open-Meteo. Those actions are in-scope for a travel planner. Caveat: instructions assume use of a browser tool with active login sessions; snapshots and page extractions could include user account/session data if a logged-in browser profile is used.
Install Mechanism
No install spec — instruction-only skill with bundled scripts. Nothing is downloaded from external arbitrary URLs and no package-install steps are present, which reduces install-time risk.
Credentials
The skill declares no required env vars or credentials, which matches the documentation that relies on interactive browser login/QR scan. However, it implicitly needs a browser session that may contain logged-in cookies (Fliggy/Xiaohongshu). The code/docs reference login persistence and TOOLS.md-based Fliggy config (missing), so operational credential handling is left to the host — review how the agent's browser tool stores sessions.
Persistence & Privilege
always:false and no modifications to other skills or global agent config are requested. The skill can be invoked autonomously (platform default), but that is not combined with other high-risk indicators here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install fliggy-travel-planner
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /fliggy-travel-planner 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.7
No changes detected in this version. - No file or documentation updates compared to the previous release. - Functionality remains unchanged.
v1.0.6
- Updated description to emphasize internationalization and travel use cases for a broader audience. - Clarified that the skill automates end-to-end trip research, including Xiaohongshu guide extraction, flight searches, weather forecasts, and trip reports. - No changes to core functionalities or behavior. - No file or code changes detected in this version.
v1.0.5
fliggy-travel-planner v1.0.5 - No file changes detected in this version. - Documentation, core features, and performance optimizations remain unchanged. - All workflows and usage scenarios are consistent with previous releases.
v1.0.4
- 性能大幅优化:升级为真正并行查询 + 数据缓存 + 精简提取,整体耗时由约9分钟降至3-4分钟。 - 精简数据提取:只保留5个核心字段(天数、景点Top3、住宿区域、预算、季节),大幅加快处理速度。 - 明确并行处理规范:所有主要查询步骤(小红书、飞猪、天气)同时进行,减少等待时间。 - 链接规范增强:强制返回真实小红书笔记链接,避免因链接格式问题导致内容无法访问。 - 明确超时与缓存策略:所有网络请求加超时时间,天气/高铁数据优先走缓存,提升整体响应效率。 - 故障排查流程优化,增加常见错误的针对性解决办法。
v1.0.3
No changes detected in this version. - No file changes were found between this version and the previous one. - Functionality, usage, and documentation remain unchanged.
v1.0.2
No changes detected in this version. No update required to the changelog.
v1.0.1
- 文档调整:移除文件《使用指南.md》。 - 功能与流程无更改,仅精简项目文件。 - 用户指南、核心用法与功能保持一致。
v1.0.0
fliggy-travel-planner v1.0.0 – 官方发布 - 新增自动化行程规划功能:根据小红书旅游攻略及飞猪机票价格,生成完整旅行计划。 - 集成天气实时查询与气候数据估算,根据出行日期灵活选择。 - 并行优化,支持多渠道(攻略/天气/交通)同时查询,显著提升响应速度。 - 完整行程报告模板,涵盖攻略、最低价机票链接、天气、交通方式对比与详细预算。 - 标准化输出格式,严格按顺序展示行程亮点、天气、交通与预算,便于查阅与定制。 - 支持多目的地/出发地对比、特价监控及新高赞攻略追踪。
元数据
Slug fliggy-travel-planner
版本 1.0.7
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 8
常见问题

travel planner 是什么?

Travel itinerary planning skill that automates end-to-end trip research and booking assistance. It searches Xiaohongshu (RedNote) for destination guides, ext... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 371 次。

如何安装 travel planner?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install fliggy-travel-planner」即可一键安装,无需额外配置。

travel planner 是免费的吗?

是的,travel planner 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

travel planner 支持哪些平台?

travel planner 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 travel planner?

由 nodermachine(@nodermachine)开发并维护,当前版本 v1.0.7。

💬 留言讨论