pricewin-deal-finder

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PriceWin Deal Finder

PriceWin 优惠搜索工具

🚨 IMPORTANT — HOW TO USE THIS SKILL

🚨 重要说明 — 如何使用该Skill

ONE command does everything. Run this as your FIRST action — no clarifying questions first:
bash
cd {baseDir} && node bin/search.js "<city>" <checkInYYYY-MM-DD> <checkOutYYYY-MM-DD> <adults> en-us
{baseDir}
is this skill's install directory (auto-resolved by the runtime). If your runtime does not substitute it,
cd
into the folder that contains this
SKILL.md
(the one with
bin/search.js
). Do NOT hardcode a
~/.hermes/...
or
~/.openclaw/...
path — it differs per platform.
Example:
bash
cd {baseDir} && node bin/search.js "Hangzhou" 2026-06-10 2026-06-13 2 en-us
The script handles everything automatically: daemon launch, Agoda cache lookup, Google + Booking inline search, OpenTravel API lookup (all cities), discovery for new cities, and formatted tier-card output. Just run it and send the output to the user.
DO NOT ask clarifying questions first. Just run the command. Infer all parameters:
  • Year: use the current year from today's date unless the user states otherwise. If the requested day/month has already passed this year, assume next year. (Get today's date with
    date +%Y-%m-%d
    if unsure.)
  • "10-13/6"
    <year>-06-10 <year>-06-13
    — fill
    <year>
    from the rule above
  • "2 guests" / "2 people"
    2
    adults
  • Locale: language/region code passed to the OTAs (controls site language + region). Default
    en-us
    . Prices are in USD (Google Hotels is requested with
    gl=us&curr=USD
    ); other sources follow the locale you pass.
DO NOT use any other approach. No Python scripts, no curl, no browser tools, no subagents. This one command is all you need.

一条命令即可完成所有操作。请将此作为你的第一步操作——无需先询问澄清问题:
bash
cd {baseDir} && node bin/search.js "<city>" <checkInYYYY-MM-DD> <checkOutYYYY-MM-DD> <adults> en-us
{baseDir}
是该Skill的安装目录(由运行时自动解析)。如果你的运行时未自动替换该变量,请切换到包含此
SKILL.md
文件的文件夹(即包含
bin/search.js
的文件夹)。请勿硬编码
~/.hermes/...
~/.openclaw/...
路径——不同平台路径不同。
示例:
bash
cd {baseDir} && node bin/search.js "Hangzhou" 2026-06-10 2026-06-13 2 en-us
该脚本会自动处理所有事项:启动守护进程、查询Agoda缓存、Google + Booking即时搜索、OpenTravel API查询(支持所有城市)、新城市信息发现,以及生成格式化的分级卡片输出。只需运行该命令并将结果发送给用户即可。
请勿先询问澄清问题。直接运行命令即可。自动推断所有参数:
  • 年份: 除非用户另有说明,否则使用当前日期的年份。如果请求的日/月在今年已过,则默认使用明年的年份。(若不确定,可通过
    date +%Y-%m-%d
    获取当前日期。)
  • "10-13/6"
    <year>-06-10 <year>-06-13
    — 根据上述规则填充
    <year>
  • "2 guests" / "2 people"
    2
    成人
  • 区域设置: 传递给OTA的语言/地区代码(控制网站语言和地区)。默认值为
    en-us
    。价格以美元显示(Google Hotels请求时使用
    gl=us&curr=USD
    参数);其他平台的价格会遵循你传递的区域设置。
请勿使用任何其他方法。禁止使用Python脚本、curl、浏览器工具或子代理。只需这一条命令即可完成所有操作。

🚨 CRITICAL RULES — FOLLOW EVERY TIME

🚨 关键规则 — 每次都必须遵守

RULE 0 — FORBIDDEN TOOLS. Read this twice. This skill drives a long-running Patchright daemon via the
terminal
tool ONLY. Your runtime exposes several other tools that LOOK convenient but are STRICTLY FORBIDDEN inside this skill:
browser_navigate
/
browser_open
— FORBIDDEN ❌
browser_click
— FORBIDDEN ❌
browser_type
/
browser_fill
— FORBIDDEN ❌
browser_snapshot
— FORBIDDEN ❌
browser_close
— FORBIDDEN ❌ Any other
browser_*
native tool — FORBIDDEN ❌
delegate_task
/
spawn_agent
/ sub-agent delegation — FORBIDDEN
Why: those native tools spawn a vanilla Chromium without stealth, so Booking.com and Agoda detect the bot within seconds and the requests just hang until the runtime kills them with "Command timed out after 30/60 seconds". You will burn 5+ minutes on timeouts and the user will get nothing. The Patchright daemon launched via
terminal
survives bot-detection.
Delegated subagents start with empty history and no skill context — they will always fall back to Python/curl scraping, which gets bot-blocked immediately. This skill must run entirely in the current agent, using only the
terminal
tool.
✅ The ONLY allowed way to drive a browser in this skill is via
terminal
:
terminal: cd {baseDir} && node bin/search.js ...
RULE 1 —
search.js
handles everything. NEVER scrape an OTA yourself.
Do not manually call
browse.js
commands, do not
goto
/
click
/
type
in the browser, do not build Agoda/Booking/Google URLs by hand, do not call the OpenTravel API separately, do not try to launch the daemon yourself.
search.js
already drives the stealth daemon through a careful flow that survives bot-detection — it handles Agoda discovery internally for EVERY city (including Chinese cities like Shanghai, Hangzhou, etc.). Manually navigating an OTA is the #1 cause of failure: it trips Agoda/Booking anti-bot ("detect automation", "redirect to homepage", "problem completing your search") and gets the IP blocked. Your ONLY job is to run
search.js
once and send its output. If you think a source is "missing", re-read RULE 4 — do NOT go fetch it by hand.
RULE 2 — First-time city discovery takes 2–4 minutes. If
search.js
output contains
"discovering"
or
"launching"
messages, tell the user: "First time searching this city — discovering selectors, this takes about 2–4 minutes..." and wait for the result. Do NOT retry or abort.
RULE 3 — Send the output exactly.
search.js
outputs formatted tier cards ready to send. Copy the output directly into your response. Do not reformat, summarize, or abbreviate it.
RULE 3a — PRESERVE MARKDOWN HYPERLINKS. Every hotel name in the output is already wrapped as
[Hotel Name](https://booking-url...)
. This is a clickable hyperlink — DO NOT:
  • Strip the markdown and show the URL on a separate
    🔗 https://...
    line
  • Replace
    [Hotel Name](url)
    with plain text
  • Capitalize OTA names ("google" stays "google", not "Google")
  • Rename sections — "📋 More good deals" stays exactly
The output is Telegram-MarkdownV2-ready. Sending it as-is gives the user clickable hotel names with hidden URLs (clean UI).
RULE 3b — If you DO add a suggestion / commentary section after the output, every hotel name you mention MUST also be a markdown hyperlink
[Hotel Name](url)
using the SAME URL the script printed for that hotel.
Never write a hotel name as plain text in your own commentary.
RULE 4 — Partial results are NORMAL and acceptable. Never "fix" them by hand. A source can be absent from the output (e.g. Agoda blocked this run, or OpenTravel has no inventory for the city). That is FINE — send the tier cards with whatever sources are present. The footer (
📊 N hotels | <sources> • prices in USD
) lists exactly what was found. Do NOT try to fetch the missing source via the browser, a direct URL, or any other tool — that triggers anti-bot and makes things worse. If
search.js
errors out entirely, tell the user what failed in 1 line and show any partial output it printed above the error. If you want more coverage, the only valid retry is running the SAME
search.js
command again (anti-bot is often transient).

规则0 — 禁用工具。请仔细阅读两遍。 该Skill仅通过
terminal
工具驱动一个长期运行的Patchright daemon。你的运行时提供了一些看似便捷的其他工具,但在本Skill中严格禁止使用:
browser_navigate
/
browser_open
— 禁用 ❌
browser_click
— 禁用 ❌
browser_type
/
browser_fill
— 禁用 ❌
browser_snapshot
— 禁用 ❌
browser_close
— 禁用 ❌ 任何其他
browser_*
原生工具 — 禁用 ❌
delegate_task
/
spawn_agent
/ 子代理委托 — 禁用
原因:这些原生工具会启动一个无隐身模式的普通Chromium浏览器,因此Booking.com和Agoda会在几秒钟内检测到机器人,请求会一直挂起直到运行时因“命令超时30/60秒”而终止。你会浪费5分钟以上的时间在超时上,用户将一无所获。通过
terminal
启动的Patchright daemon可以避开机器人检测。
委托的子代理启动时没有历史记录和Skill上下文——它们总会退回到Python/curl抓取,这会立即被机器人拦截。本Skill必须完全在当前代理中运行,仅使用
terminal
工具。
✅ 在本Skill中驱动浏览器的唯一允许方式是通过
terminal
terminal: cd {baseDir} && node bin/search.js ...
规则1 —
search.js
处理所有事项。禁止自行抓取OTA数据。
请勿手动调用
browse.js
命令,请勿在浏览器中执行
goto
/
click
/
type
操作,请勿手动构建Agoda/Booking/Google的URL,请勿单独调用OpenTravel API,请勿尝试自行启动守护进程。
search.js
已经通过一套精心设计的流程驱动隐身守护进程,能够避开机器人检测——它会在内部为每个城市(包括上海、杭州等中国城市)处理Agoda的信息发现。手动访问OTA是导致失败的首要原因:这会触发Agoda/Booking的反机器人机制(“检测到自动化操作”、“重定向到首页”、“无法完成搜索”),并导致IP被封锁。你唯一的任务就是运行一次
search.js
并发送其输出结果。如果你认为某个数据源“缺失”,请重新阅读规则4——请勿手动去获取该数据源。
规则2 — 首次搜索新城市需要2–4分钟。 如果
search.js
的输出中包含
"discovering"
"launching"
消息,请告知用户:“首次搜索该城市——正在查找选择器,此过程大约需要2–4分钟...”并等待结果。请勿重试或中止。
规则3 — 原样发送输出结果。
search.js
会输出已格式化的分级卡片,可直接发送给用户。请直接复制输出内容到你的回复中。请勿重新格式化、总结或缩写。
规则3a — 保留Markdown超链接。 输出中的每个酒店名称都已被包装为
[酒店名称](https://booking-url...)
格式。这是可点击的超链接——请勿:
  • 剥离Markdown格式并将URL单独显示在
    🔗 https://...
    行中
  • [酒店名称](url)
    替换为纯文本
  • 将OTA名称大写(“google”保持为“google”,不要改为“Google”)
  • 重命名章节——“📋 More good deals”保持原样
输出内容已兼容Telegram-MarkdownV2格式。原样发送可让用户看到带有隐藏URL的可点击酒店名称(界面简洁)。
规则3b — 如果你确实要在输出后添加建议/评论部分,你提到的每个酒店名称都必须使用脚本为该酒店打印的相同URL,格式化为Markdown超链接
[酒店名称](url)
。请勿在你自己的评论中以纯文本形式写入酒店名称。
规则4 — 部分结果是正常且可接受的。请勿手动“修复”。 输出中可能会缺少某个数据源(例如,本次运行中Agoda被封锁,或OpenTravel在该城市没有库存)。这是正常的——发送包含现有数据源的分级卡片即可。页脚(
📊 N hotels | <sources> • prices in USD
)会准确列出已找到的数据源。请勿尝试通过浏览器、直接URL或任何其他工具获取缺失的数据源——这会触发反机器人机制,使情况变得更糟。如果
search.js
完全报错,请用一句话告知用户失败原因,并显示报错上方打印的所有部分输出内容。如果你想获得更多结果,唯一有效的重试方式是再次运行相同的
search.js
命令(反机器人机制通常是暂时的)。

Output Format Reference

输出格式参考

search.js
prints tier cards in this format — you send this directly to the user:
The hotel name is a Markdown link to its cheapest OTA. Price rows carry NO links and the OTA key is shown lowercase (
agoda
/
booking
/
google
/
opentravel
). There are no star ratings or area lines — the script does not have that data.
🏨 <city> • <d1>–<d2> • <N> nights • <adults> guests
━━━━━━━━━━━━━━━━━━━━

🥇 BEST VALUE
[<Hotel Name>](<cheapest_link>)
  ✅ agoda      💰 <price>/night
     booking    💰 <price>/night
     opentravel 💰 <price>/night
     → Save <diff> vs Booking

🥈 CHEAPEST
[<Hotel Name>](<cheapest_link>)
  ✅ google     💰 <price>/night
     agoda      💰 <price>/night

🥉 QUALITY
[<Hotel Name>](<cheapest_link>)
  ✅ booking    💰 <price>/night
     agoda      💰 <price>/night

📋 More good deals
  — Agoda —
  • [<Hotel>](<agoda_link>) — agoda: <price> | booking: <price>
  — Booking —
  • [<Hotel>](<booking_link>) — booking: <price>
  — Google —
  • [<Hotel>](<google_link>) — google: <price>
  — OpenTravel —
  • [<Hotel>](<opentravel_link>) — opentravel: <price>

💡 Tip: <best Hotel Name>
   [Book on <OTA>](<link>) — <price>/night

📊 <N> hotels | <sources with data> • prices in USD
All prices are shown in USD. Agoda, Google and OpenTravel geo-lock to VND by IP and are converted via a live FX rate; Booking returns USD natively. Only sources that actually returned data are listed in the footer.

search.js
会按以下格式打印分级卡片——你直接将其发送给用户即可:
酒店名称是指向最便宜OTA的Markdown链接。价格行不带链接,OTA标识以小写形式显示(
agoda
/
booking
/
google
/
opentravel
)。输出中没有星级评分或区域信息——脚本没有此类数据。
🏨 <city> • <d1>–<d2> • <N> nights • <adults> guests
━━━━━━━━━━━━━━━━━━━━

🥇 BEST VALUE
[<Hotel Name>](<cheapest_link>)
  ✅ agoda      💰 <price>/night
     booking    💰 <price>/night
     opentravel 💰 <price>/night
     → Save <diff> vs Booking

🥈 CHEAPEST
[<Hotel Name>](<cheapest_link>)
  ✅ google     💰 <price>/night
     agoda      💰 <price>/night

🥉 QUALITY
[<Hotel Name>](<cheapest_link>)
  ✅ booking    💰 <price>/night
     agoda      💰 <price>/night

📋 More good deals
  — Agoda —
  • [<Hotel>](<agoda_link>) — agoda: <price> | booking: <price>
  — Booking —
  • [<Hotel>](<booking_link>) — booking: <price>
  — Google —
  • [<Hotel>](<google_link>) — google: <price>
  — OpenTravel —
  • [<Hotel>](<opentravel_link>) — opentravel: <price>

💡 Tip: <best Hotel Name>
   [Book on <OTA>](<link>) — <price>/night

📊 <N> hotels | <sources with data> • prices in USD
所有价格均以美元显示。Agoda、Google和OpenTravel会根据IP自动锁定为越南盾(VND),并通过实时汇率转换为美元;Booking原生返回美元价格。页脚中仅列出实际返回数据的数据源。

Limitations

局限性

  • First search per city pays the Agoda discovery cost (2–4 minutes). Google and Booking are inline (no discovery); OpenTravel is a direct API call.
  • Subsequent searches reuse the Agoda cache and complete in ~30–60 seconds.
  • 首次搜索某个城市时需要承担Agoda信息发现的耗时(2–4分钟)。Google和Booking为即时搜索(无需信息发现);OpenTravel为直接API调用。
  • 后续搜索会复用Agoda缓存,完成时间约为30–60秒。