← 返回 Skills 市场
mrlyk

holiday-enough

作者 LiaoYk · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
98
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install holiday-enough
功能描述
评估旅行目的地需要几天才能玩好,判断用户的假期时间是否充足。通过真实旅行攻略提取各段路线实际耗时,给出"时间充裕/刚好/偏紧"的评估和精简方案建议。 当用户提到以下场景时使用此 skill:假期够不够、旅行时间评估、几天够玩、行程天数、时间够吗、假期天数够不够、去XX玩几天合适、XX天能玩完吗。 即使用户没有明确...
使用说明 (SKILL.md)

假期够不够

帮用户判断假期时间和旅行目的地是否匹配。核心逻辑:从社区平台获取真实攻略中的时间数据,与用户可用天数对比,给出实用建议。

前置检查

每次执行前先确认 CDP 环境可用:

node "$SKILL_ROOT/scripts/check-deps.mjs"
  • 需要 Node.js 22+
  • 需要 Chrome 远程调试已开启

如果脚本报告 Chrome 未连接,它会自动打开 chrome://inspect/#remote-debugging 页面。此时告诉用户:

已为你打开 Chrome 调试设置页面。请勾选页面中的 "Allow remote debugging for this browser instance",完成后告诉我,我会继续执行。

用户确认后重新运行 check-deps.mjs 验证连接。

输入获取

从用户的描述中提取两个关键信息:

  1. 目的地 -- 具体城市、地区或景点(如"云南"、"成都"、"大阪+京都")
  2. 可用假期天数 -- 用户有几天时间(如"国庆7天"、"清明3天")

如果用户只提了目的地没说天数,主动追问可用天数。如果用户只说了天数没说目的地,追问想去哪里。两个信息都齐了再开始检索。

路线不需要用户提供,由真实攻略中获取。

攻略检索流程

数据源为反爬严格的社区平台,必须通过 CDP 浏览器模式访问,不要尝试 WebSearch 或 WebFetch。

第一步:打开搜索页

# 启动搜索页(将 KEYWORD 替换为实际关键词)
curl -s "http://localhost:3456/new?url=https://www.xiaohongshu.com/search_result?keyword=KEYWORD&source=web_search_result_note"

搜索关键词策略 -- 用多组关键词获取更全面的信息:

  • "{目的地} 旅行攻略 时间安排"
  • "{目的地} 几天够玩"
  • "{目的地} X天行程" (X 为用户提供的天数)

记录返回的 targetId,后续操作都需要用到。

第二步:提取笔记列表

# 等待页面加载后提取笔记链接和标题
curl -s -X POST "http://localhost:3456/eval?target=TARGET_ID" \
  -d 'JSON.stringify([...document.querySelectorAll("section.note-item a.cover")].slice(0, 10).map(a => ({title: a.closest("section")?.querySelector(".title")?.textContent?.trim() || "", url: a.href})))'

如果选择器未命中,先用 /eval 观察页面实际 DOM 结构再调整选择器。该平台前端频繁改版,选择器可能需要适配。

可以用 /scroll 向下滚动加载更多结果:

curl -s "http://localhost:3456/scroll?target=TARGET_ID&direction=bottom"

第三步:逐篇提取笔记正文

从搜索结果中选取 5-10 篇相关度高的笔记(标题中包含天数、攻略、行程等关键词的优先),逐一打开并提取正文:

# 在新标签页打开笔记
curl -s "http://localhost:3456/new?url=NOTE_URL"

# 提取正文内容
curl -s -X POST "http://localhost:3456/eval?target=NOTE_TARGET_ID" \
  -d 'document.querySelector("#detail-desc")?.textContent?.trim() || document.querySelector(".note-text")?.textContent?.trim() || ""'

提取完一篇后关闭标签页再打开下一篇,避免同时开太多标签页:

curl -s "http://localhost:3456/close?target=NOTE_TARGET_ID"

第四步:清理

所有笔记提取完毕后,关闭搜索页标签页:

curl -s "http://localhost:3456/close?target=TARGET_ID"

检索注意事项

  • 该平台需要用户已登录才能看到完整内容。如果提取到的正文为空或内容不完整,提示用户在 Chrome 中登录后重试。
  • 不要短时间内密集打开大量标签页,每篇笔记操作之间自然间隔即可。
  • DOM 选择器可能随平台改版而变化。如果预设选择器失效,用 /eval 查看实际 DOM 结构并动态调整。
  • 如果某组关键词搜索结果不理想,换一组关键词重试。

信息提取与分析

这个 skill 的核心是判断时间够不够,不是帮用户做路线规划。提取信息时聚焦以下三点:

  1. 必去景点 -- 多篇攻略中高频出现的热门景点
  2. 各景点耗时 -- 每个景点建议游玩时间,以及景点间的交通时间
  3. 推荐总天数 -- 多数作者建议的行程天数

交叉对比多篇笔记,关注共识性结论:

  • 多数人建议玩几天?
  • 哪些景点是公认必去的?
  • 哪些景点被多人标记为"可选"或"时间紧可以跳过"?

输出格式

结论先行,依据在后。语言简洁实用。

1. 时间评估(结论)

这是最重要的部分,放在最前面。明确回答用户"我的假期够不够":

  • 推荐天数:根据攻略综合得出的建议天数
  • 你的假期:用户提供的可用天数
  • 结论:三级判断
    • 充裕 -- 可用天数 > 推荐天数,有余力深度游或增加周边
    • 刚好 -- 可用天数 ≈ 推荐天数,核心景点都能覆盖但节奏较紧凑
    • 偏紧 -- 可用天数 \x3C 推荐天数,需要取舍

2. 热门景点耗时(依据)

列出该目的地的必去景点及各自所需时间,作为结论的支撑依据。格式:

[景点名]:游玩约X小时
[景点名]:游玩约X小时(距上一景点车程约X小时)
...
合计:核心景点游玩约需X天

标注数据来源于真实用户攻略,可能因季节、交通方式等因素有所差异。

3. 调整建议

根据评估结论给出针对性建议:

  • 充裕时:推荐可以增加的周边景点或深度体验
  • 刚好时:提示哪些环节时间最紧,建议预留弹性
  • 偏紧时:明确建议哪些景点可以跳过,给出精简方案

每条建议要具体,比如"XX景点可以跳过,多数人反馈性价比不高"或"XX和XX距离近,可以安排在同一天"。

安全使用建议
This skill mostly does what it says (it scrapes travel notes by controlling your local Chrome), but it requires you to enable or connect to Chrome remote debugging and will start a background, unauthenticated local proxy that can control the browser and read page content you are logged into. Before installing or running: 1) Review the bundled scripts (which are included) to ensure you trust them — they will be run by node on your machine. 2) Confirm how the proxy binds (ensure it listens only on localhost) and consider running it behind a firewall or in a disposable browser/profile. 3) Avoid enabling remote debugging on your primary browser profile or on a machine with sensitive sessions; instead create a fresh Chrome profile, log into only the accounts needed, and use that for scraping. 4) If you are uncomfortable with a background service that can access your browser sessions, do not enable or run the skill. If you want to proceed but reduce risk, run the scripts manually yourself, inspect logs (tmp/cdp-proxy.log), and kill the proxy process when finished.
功能分析
Type: OpenClaw Skill Name: holiday-enough Version: 1.0.0 The skill bundle implements a powerful Chrome DevTools Protocol (CDP) proxy (`scripts/cdp-proxy.mjs`) that allows the AI agent to control the user's local browser. While the stated purpose is scraping travel guides from Xiaohongshu, the proxy includes high-risk capabilities such as executing arbitrary JavaScript (`/eval`), taking screenshots and saving them to arbitrary local paths (`/screenshot`), and uploading local files to the browser (`/setFiles`). These features provide a significant attack surface for local file manipulation and sensitive data access (e.g., session cookies) if the agent is targeted by prompt injection, although no explicit malicious intent or data exfiltration logic was identified in the current code.
能力评估
Purpose & Capability
The skill claims to extract real user travel notes from a community site that requires login; requiring access to a local Chrome debugging endpoint (CDP) is coherent with that goal. There are no unrelated environment variables or external services requested. However, the capability to control Chrome and read page content gives the skill access to any pages and session data the browser can reach, which is more powerful than a simple read-only web fetch.
Instruction Scope
Runtime instructions explicitly tell the agent to run the included Node script and drive a local CDP proxy to open pages, evaluate DOM, and extract note text. The scripts also read DevToolsActivePort files from user profile paths to discover Chrome's debug port. That is necessary to access logged-in content but it also means the skill can access private data visible in the browser. The SKILL.md does not constrain what the proxy may evaluate or fetch beyond the scraping tasks described.
Install Mechanism
There is no external install/download from untrusted URLs; all code is bundled in the skill. The provided scripts are executed locally (via node) but nothing in the manifest attempts to fetch remote code. This reduces supply-chain risk compared to remote downloads.
Credentials
No environment variables or external credentials are requested, which is proportional. However, the scripts probe user browser profile paths (DevToolsActivePort) and will operate on the user's running Chrome instance — effectively leveraging the user's authenticated sessions. That access is relevant for retrieving logged-in content but has privacy implications beyond the narrow task.
Persistence & Privilege
The check-deps script will start the cdp-proxy as a detached/background process and unref it. That creates a persistent local HTTP service (default port 3456) providing an unauthenticated API to control the browser. A background, unauthenticated HTTP->CDP proxy increases attack surface (other local processes could talk to it) and constitutes lasting presence beyond a single run.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install holiday-enough
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /holiday-enough 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
holiday-enough 1.0.0 - Initial release. - Based on real travel guides, estimates how many days are needed for a destination and assesses if a user's holiday is enough. - Extracts required travel days and core attractions’ timings; gives concise recommendations: "time adequate/just right/tight". - Prompts users for destination and available days, analyzes real-world trip reports for tailored advice. - Requires Node.js 22+ and Chrome remote debugging; guides users through dependency checks.
元数据
Slug holiday-enough
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

holiday-enough 是什么?

评估旅行目的地需要几天才能玩好,判断用户的假期时间是否充足。通过真实旅行攻略提取各段路线实际耗时,给出"时间充裕/刚好/偏紧"的评估和精简方案建议。 当用户提到以下场景时使用此 skill:假期够不够、旅行时间评估、几天够玩、行程天数、时间够吗、假期天数够不够、去XX玩几天合适、XX天能玩完吗。 即使用户没有明确... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 98 次。

如何安装 holiday-enough?

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

holiday-enough 是免费的吗?

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

holiday-enough 支持哪些平台?

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

谁开发了 holiday-enough?

由 LiaoYk(@mrlyk)开发并维护,当前版本 v1.0.0。

💬 留言讨论