Skip to content
Back to search

trip-map-builder

旅行行程规划技能:规划 → 小红书调研 → 交互式地图页面 | Agent Skill for trip planning with 小红书 research and interactive map generation

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/hiyeshu--trip-map-builder/badge.svg)](/listings/hiyeshu--trip-map-builder)

HTML

<a href="/listings/hiyeshu--trip-map-builder"><img src="/api/listings/hiyeshu--trip-map-builder/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

一行命令安装([skills.sh](https://skills.sh) 生态):

npx skills add hiyeshu/trip-map-builder

或者手动 clone 到 skills 目录:

# Cursor
git clone https://github.com/hiyeshu/trip-map-builder.git ~/.cursor/skills/trip-map-builder

# Claude Code
git clone https://github.com/hiyeshu/trip-map-builder.git ~/.claude/skills/trip-map-builder

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 161 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. name: trip-map-builder
  3. description: >
  4. End-to-end trip planning: gather user constraints, build a reference
  5. itinerary, research locations and dining signals via 大众点评 + 小红书, then
  6. generate an interactive mobile-first map page (Leaflet + timeline) and
  7. optionally deploy to Vercel. Use when user asks to plan a trip, create an
  8. itinerary, research restaurants on 大众点评/小红书, build a trip map page, or
  9. says "行程规划", "行程地图", "trip map", "plan my trip", "做个行程". Covers the full
  10. pipeline from scattered inputs (screenshots, wishlists) to a deployable
  11. reference map with navigation links, 小红书 links, payment info, and
  12. reservation buttons.
  13. ---
  14. # Trip Map Builder
  15. Three-phase pipeline: **Plan → Research → Build**.
  16. The output is a **reference itinerary**, not a script the traveler must obey.
  17. During the trip, weather, current location, fatigue, and hunger can override
  18. the original plan.
  19. ## Shared memory
  20. Before planning or building, read `~/.trip-map-builder/MEMORY.md` if it
  21. exists. Use it only for durable traveler context:
  22. - pace preference
  23. - food and drink preferences
  24. - budget habits
  25. - payment and navigation preferences
  26. - previously generated trip outputs
  27. - recurring constraints and unresolved follow-ups
  28. If the file does not exist, continue normally. Do not block on memory setup.
  29. Do not store raw screenshots, passport data, booking codes, full chat logs, or
  30. other sensitive/private material.
  31. After each completed trip plan, research pass, or map build, update
  32. `~/.trip-map-builder/MEMORY.md` with only durable facts:
  33. ```md
  34. # Trip Map Builder Memory
  35. ## Traveler Defaults
  36. - Departure city:
  37. - Pace:
  38. - Food preferences:
  39. - Budget habits:
  40. - Payment preference:
  41. - Navigation preference:
  42. - Language preference:
  43. ## Past Trips
  44. | Trip | Dates | Destination | Output | Notes |
  45. |------|-------|-------------|--------|-------|
  46. ## Reusable Preferences
  47. -
  48. ## Open Threads
  49. -
  50. ```
  51. ## Phase 1: Plan the itinerary
  52. Read `references/trip-planning.md` for the full methodology.
  53. Core sequence:
  54. 1. **Extract hard constraints** — dates, flight times, terminals, hotel location
  55. 2. **Group user's wishlist** — city-easy / needs-reservation / far-suburbs / pass-through
  56. 3. **Cut high-risk items first** — too far, holiday-crowded, weather-dependent. Say what was cut and why.
  57. 4. **Arrange by area** — one main area per day, first day light, last day close to airport
  58. 5. **Fill in meals** — daily-area candidates first, 大众点评 + 小红书 signals second, fame last.
  59. 6. **Add tickets & transport** — only critical ones (museum tickets, airport transfer)
  60. 7. **Write reference doc** — conclusion first, then daily plan, weather-sensitive spots, meal areas, and what was cut
  61. Key principles:
  62. - Not everything the user listed fits. Delete for them.
  63. - One area per day. One reservation-required spot per day max.
  64. - Itineraries should be smooth, not packed.
  65. - The plan gives coordinates for later adjustment; it does not pretend reality will follow the timeline.
  66. - All user-facing questions follow the **4-beat format**: Re-ground → Simplify → Recommend → Options. See `references/trip-planning.md` § 用户交互 for examples and anti-patterns.
  67. ## Phase 2: Research via 大众点评 + 小红书
  68. Read `references/dianping-research.md` for the 大众点评 OpenCLI workflow.
  69. Read `references/xhs-research.md` for the 小红书 OpenCLI + CDP workflow.
  70. For restaurants, use 大众点评 as the main Chinese dining signal for taste,
  71. queue risk, value, and obvious traps. Use 小红书 to supplement atmosphere,
  72. recent experience, photo-worthiness, and soft warnings. Do not bend a whole
  73. day around a famous restaurant unless it is already on the route.
  74. 小红书 core sequence:
  75. 1. Launch Chrome with `--remote-debugging-port=9223`
  76. 2. Connect via OpenCLI's `CDPBridge`
  77. 3. Navigate to `xiaohongshu.com/search_result?keyword=<encoded>` (never simulate input box)
  78. 4. Intercept `POST /api/sns/web/v1/search/notes` response
  79. 5. Pick top 2-3 notes by relevance, open detail pages
  80. 6. Extract via DOM: `#detail-title`, `#detail-desc`, `.author-container .username`
  81. 7. Compress to one decision-useful sentence per store, write back to local `.md`
  82. Filtering rules:
  83. - Keep: specific store name, address, dish, personal experience, repeated keywords
  84. - Drop: generic area roundups, reposts, pure emotion, "氛围很好" x3
  85. - Output: store name + one representative link + 2-3 sentence verdict
  86. ## Phase 3: Build the map page
  87. 1. Copy `assets/template.html` → `index.html`
  88. 2. Fill `HOTEL` object and `DAYS` array with structured data from Phase 1+2
  89. 3. Each location needs: name, lat/lng, type, time, desc; optional: budget, detail, pay, xhs, reserve, gmap
  90. 4. Fill `overviewContent()` with trip summary, payment warnings
  91. 5. Apply design system — default template uses Apple style, but can switch to any style from awesome-design-md
  92. Location types: `food` | `spot` | `drink` | `hotel` | `transport`
  93. Payment chip values: `1` = confirmed yes (green), `0.5` = maybe (orange), omit = not shown
  94. ### Design system (optional)
  95. Default template uses Apple design system (SF Pro, light theme, frosted glass).
  96. To use a different style, grab a `DESIGN.md` from [awesome-design-md](https://github.com/VoltAgent/awesome-design-md):
  97. ```bash
  98. # Browse available design systems
  99. # Apple, Vercel, Linear, Stripe, Notion, Airbnb, Nike, Spotify, etc.
  100. curl -O https://raw.githubusercontent.com/VoltAgent/awesome-design-md/main/design-md/<brand>/DESIGN.md
  101. ```
  102. Then adjust `template.html`'s `:root` CSS variables (colors, fonts, spacing, border-radius) to match the chosen DESIGN.md tokens.
  103. ### Deploy (optional)
  104. ```bash
  105. git init && git add . && git commit -m "trip map"
  106. gh repo create REPO --public --source=. --push
  107. # Import from vercel.com/new — auto-deploys on push
  108. ```
  109. ## Dependencies
  110. | Tool | Purpose | Install |
  111. |------|---------|---------|
  112. | [OpenCLI](https://github.com/jackwener/OpenCLI) | 大众点评 adapter + 小红书调研 | `npm install -g @jackwener/opencli` |
  113. | Chrome/Chromium | 浏览器 + 远程调试 | 已有 |
  114. | [Leaflet.js](https://leafletjs.com) | 地图渲染(CDN 引入,无需安装) | template.html 内置 |
  115. | [gh CLI](https://cli.github.com) | GitHub 仓库创建(可选) | `brew install gh` |
  116. ## Resources
  117. - `references/trip-planning.md` — itinerary planning methodology, input/output templates, selection principles, common pitfalls
  118. - `references/dianping-research.md` — 大众点评 OpenCLI search/shop workflow, dining decision signals, writeback format
  119. - `references/xhs-research.md` — OpenCLI installation, Chrome CDP setup, 小红书 search workflow, API details, filtering criteria
  120. - `assets/template.html` — single-file HTML map template (Leaflet + Apple design system)
  121. - [awesome-design-md](https://github.com/VoltAgent/awesome-design-md) — 60+ brand design systems (Apple, Vercel, Stripe, Linear, etc.) for alternative styling
README.md · README · 124 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Trip Map Builder
  2. 从零散信息到可部署的交互式行程地图页面。
  3. 三阶段流水线:**规划行程 → 大众点评/小红书调研 → 生成地图页面**。
  4. 定位:生成出发前的参考坐标,不是假装旅行会逐小时照做的执行脚本。
  5. ## 共享记忆
  6. 技能会优先读取 `~/.trip-map-builder/MEMORY.md`,复用长期有效的旅行偏好:节奏、餐饮、预算、支付、导航方式、历史行程输出和未解决事项。它不保存原始截图、证件、订单号或完整聊天记录。
  7. ## Demo
  8. **[tokyo-trip-pi.vercel.app](https://tokyo-trip-pi.vercel.app)** — 东京 4 泊 5 日行程地图
  9. 源码:[hiyeshu/tokyo-trip](https://github.com/hiyeshu/tokyo-trip)
  10. ## 这个技能做什么
  11. 给 AI agent 一套完整的旅行规划工作流:
  12. 1. 用户丢过来机票截图、酒店截图、想去的地方
  13. 2. Agent 提取硬约束(日期、航班、酒店位置),按区域分组,主动删掉塞不下的点,并标记天气敏感点
  14. 3. 餐厅按当天区域给候选,用大众点评 + 小红书判断口味、排队、踩雷、氛围和近期体验
  15. 4. 生成单文件 HTML 页面:Leaflet 地图 + 时间轴卡片 + Google Maps 导航 + 小红书链接 + 支付方式标签
  16. 5. 更新共享记忆,只保存下次旅行仍然有用的偏好和输出索引
  17. 6. 推到 GitHub,Vercel 自动部署,手机打开直接用
  18. ## 安装
  19. 一行命令安装([skills.sh](https://skills.sh) 生态):
  20. ```bash
  21. npx skills add hiyeshu/trip-map-builder
  22. ```
  23. 或者手动 clone 到 skills 目录:
  24. ```bash
  25. # Cursor
  26. git clone https://github.com/hiyeshu/trip-map-builder.git ~/.cursor/skills/trip-map-builder
  27. # Claude Code
  28. git clone https://github.com/hiyeshu/trip-map-builder.git ~/.claude/skills/trip-map-builder
  29. ```
  30. ## 触发词
  31. 说这些话会激活技能:
  32. - "做个行程" / "行程规划" / "行程地图"
  33. - "plan my trip" / "trip map" / "build itinerary"
  34. - "帮我查一下小红书上这家店怎么样"
  35. ## 工作流
  36. ### Phase 1:规划行程
  37. 从用户给的碎片信息里抽出硬约束,按区域分组,主动删高风险点。
  38. 核心原则:
  39. - 一天一个主区域
  40. - 不是越满越好,是越顺越好
  41. - 行程是参考坐标,真实执行可以被天气、当前位置、体力和饥饿程度覆盖
  42. - 餐厅是当天区域内的顺路候选,不为名店反向扭曲路线
  43. - 替用户删东西,说清楚删了什么、为什么删
  44. 详见 [`references/trip-planning.md`](references/trip-planning.md)
  45. ### Phase 2:大众点评 + 小红书调研
  46. 餐厅优先看大众点评和小红书:大众点评判断口味、排队、踩雷、值不值得;小红书补氛围、近期体验、拍照和软性提醒。
  47. 小红书可用 OpenCLI 的 CDPBridge 连接 Chrome,直接访问搜索结果页路由,拦截 `search/notes` API,提取前排笔记。
  48. 关键经验:**不要模拟输入框**,直接进 `search_result?keyword=` 路由更稳定。
  49. 两段式流程:先粗筛搜索结果(10-20 条),再精读最相关的 2-3 条详情页。
  50. 详见 [`references/dianping-research.md`](references/dianping-research.md) 和 [`references/xhs-research.md`](references/xhs-research.md)
  51. ### Phase 3:生成地图页面
  52. 基于 [`assets/template.html`](assets/template.html) 模板填入数据,生成单文件 HTML:
  53. - Leaflet.js 交互地图(无需 API key)
  54. - 按天切换的时间轴卡片
  55. - 每个地点:
  56. - 📍 **导航**:Action Sheet 三选——Apple Maps / Google Maps / 🧭 **高德地图 App**(直接 scheme 唤起,不打开网页)
  57. - 📕 **小红书 App**:UA 检测,正常浏览器走 `xhsdiscover://` scheme,微信/抖音等 WebView 内自动降级到 m 站
  58. - 🍜 **大众点评 App**:`food` / `drink` 类型自动启用,可用 `dianping: false` 关闭,或 `dianpingKeyword` 自定义搜索词
  59. - 📅 预约按钮(可选)
  60. - 支付方式标签(信用卡 / 支付宝 / 交通卡 / 现金)
  61. - 默认 Apple 设计系统,可通过 [awesome-design-md](https://github.com/VoltAgent/awesome-design-md) 切换风格
  62. ## 依赖
  63. | 工具 | 用途 | 安装 |
  64. |------|------|------|
  65. | [OpenCLI](https://github.com/jackwener/OpenCLI) | 大众点评 adapter + 小红书调研 | `npm install -g @jackwener/opencli` |
  66. | Chrome / Chromium | 浏览器 + 远程调试 | — |
  67. | [Leaflet.js](https://leafletjs.com) | 地图渲染 | CDN 引入,无需安装 |
  68. | [gh CLI](https://cli.github.com) | GitHub 仓库创建(可选) | `brew install gh` |
  69. ## 目录结构
  70. ```
  71. trip-map-builder/
  72. ├── CLAUDE.md # 项目地图,记录目录职责
  73. ├── SKILL.md # 技能入口,三阶段流程
  74. ├── README.md # 本文件
  75. ├── assets/
  76. │ └── template.html # 可复用 HTML 地图模板
  77. └── references/
  78. ├── CLAUDE.md # references 局部地图
  79. ├── trip-planning.md # 行程规划方法论
  80. ├── dianping-research.md # 大众点评调研 + OpenCLI adapter
  81. └── xhs-research.md # 小红书调研 + OpenCLI 安装
  82. ```
  83. ## 许可
  84. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.