SuperAPI AI Directory

hotel-core

General & other

View repository

Updated 10-16 09:52

About this skill

RollingGo Hotel Search and Booking Skill

Installation

If the local environment does not have the rgh command installed, you can install it in one of the following three ways:

Method 1: Install via npm (recommended) If Node.js and npm are available in the environment, run:

npm install -g @rollinggo/hotel@latest

Method 2: Install via Python automation script (no Node.js environment required) If Python is available in the environment, you can directly run the automated installation script we provide in the Skill directory. It will automatically detect your operating system and download the latest version of the rgh standalone binary program locally to the bin folder:

python scripts/install.py

Method 3: Manually download the standalone executable file (no Node/Python environment required) If neither npm nor Python is available in the environment, please download the corresponding single-file program from the following Release page (Windows: rgh-win.exe / rgh-windows.exe, Mac: rgh-macos, Linux: rgh-linux): https://github.com/RollingGo-AI/oauth-hotel-cli/releases/latest

After downloading, rename it to rgh(on Windows, rgh.exe), grant execute permission, and place it in the system environment variable PATH or the Skill directory's bin folder.

⚠️ Automatic upgrade interception principle: The CLI tool has built-in version detection. When you are executing any rgh command, if the console output contains 📦 有新版本可用! or 运行以下命令更新 prompt,you must immediately pause the current operation, first use one of the above three methods to upgrade the tool to the latest version, and after the upgrade succeeds, re-execute the command that was just interrupted. This can avoid booking failures caused by an expired server-side interface.


⚠️ Output specifications:

  1. It is strictly prohibited to show any technical details to users, including but not limited to: tool names (such as search-hotels、hotel-detail), JSON field names (such as hotelId、ratePlanId、referenceNo), command-line content, and technical parameters.
  2. Only show information users care about: hotel name, star rating, price, distance, core facilities, tags, and booking link.
  3. Results must be displayed in a formatted way, with each hotel occupying its own card, key information separated by line breaks, and no piling up on one line.
  4. Price description: The prices in search results are reference display prices. The actual order price is subject to price confirmation. When displaying, note "reference price".
  5. Login authorization: Users cannot see terminal output when conversing through the Agent. After executing rgh login , you must extract the authorization link from the output and reply to the user with it. Do not display the QR code text.

When to Use

This Skill should be triggered whenever the user has any intent related to hotel accommodation, including but not limited to the following scenarios:

Search and discovery:

  • Find hotels by location: "Help me find hotels near Sanlitun in Beijing", "What good hotels are there in Sanya", "Accommodation recommendations near West Lake"
  • Filter by conditions: "five-star hotels", "hotels with a pool", "accommodation with breakfast included", "family-friendly hotels", "pet-friendly hotels"
  • Filter by budget: "hotels under 500 yuan", "affordable accommodation", "luxury hotel recommendations"
  • Filter by brand: "Hilton", "Marriott", "Atour", "JI Hotel"

Search and Compare:

  • Check room rates: "How much is a hotel in Hangzhou per night", "What is the price of this hotel"
  • View room types: "What room types are available", "Do you have a king room", "Family room recommendations"
  • Compare accommodation: "Help me compare these two hotels", "Which one is more cost-effective"
  • Learn about facilities: "Is there a pool", "How far is it from the subway station", "Is parking convenient"

Booking and Orders:

  • Book a hotel: "Help me book this hotel", "I want to place an order", "Book a room"
  • Check orders: "My orders", "The hotel I booked before", "Order status"

Trigger Word Coverage: find a hotel, book a hotel, search for hotels, hotel recommendations, hotel search, nearby hotels, five-star hotels, homestays, resorts, check room rates, view room types, check in, where to stay, accommodation, business trip accommodation, travel accommodation, family-friendly hotels, hotels with a pool, hotels with breakfast included, business hotels, couples hotels, hot spring hotels, sea-view rooms, river-view rooms.

When NOT to Use

  • The user asks about non-accommodation travel needs such as flights, train tickets, car rentals, attraction tickets, etc.
  • The user is just chatting about travel destinations without a clear accommodation intent
  • The user has clearly stated "no need to book", "just asking"

Safety Gating

⚠️ Hotel booking is areal consumption operation:

  1. Mandatory two-step confirmation: first display room types and prices, and only after the user clearly selects a room type and confirms proceed with price locking and order placement.
  2. Information completeness: before placing an order, the guest name and email must be confirmed (the phone number will be obtained by default through OAuth, no need to have the user fill in parameters).
  3. Price confirmation validity:referenceNo valid for about 15-30 minutes; if expired, price confirmation must be called again.

Workflow

Step 0: Login authorization check(execute on first use or when the Token is invalid)

  1. Execute rgh whoami to check login status:

    • Output ✅ 已登录 → go directly to Step 1
    • Output ❌ 未登录 → execute rgh login, enter the authorization process
  2. Authorization process (⚠️ Important: when the user is conversing through the Agent, they cannot see the terminal, so the authorization information must be replied to the user):

    After executing rgh login , the terminal will output a QR code and an authorization link.The Agent must:

    • Extract the authorization link from the CLI output (https://rollinggo.store/s/xxx format)
    • Reply to the user with the link in a clickable form
    • Tell the user: "Please click the link to complete authorization, and let me know once authorization is successful"

    Reply template:

    请点击以下链接完成授权:
    [点击授权](https://rollinggo.store/s/xxx)
    
    授权成功后请告诉我,我将继续为您预订。
    

    If the platform supports images, a QR code image can also be generated and sent, making it convenient for mobile users to scan the code.

    After the user confirms that authorization is successful, the CLI will automatically obtain the Token and proceed to Step 1.

Step 1: Information collection(silent judgment, do not interrupt the user)

Extract the following information from the conversation; use what can be inferred directly, and ask again only if key information is missing:

Information Required or not Default value
Destination (city/attraction/address) ✅ Required None, needs follow-up
Check-in date Recommended Tomorrow
Number of nights Recommended 1 night
Number of adults Optional 2 people
Star rating preference Optional No limit
Budget cap Optional No limit
Special requirements (tags) Optional None

Destination is the only information that must be confirmed. When other information is missing, use default values; do not ask one by one.

Step 2: Get the tag dictionary(execute as needed)

When the user mentions a specific facility or feature (such as "with pool", "includes breakfast", "family-friendly", "pets"), first execute:

rgh hotel-tags

Find the exact tag name from the returned results, then use it for the search. Common correspondences:

User wording Tag type Common tag name
with pool, has swimming pool preferredTags Outdoor pool / Indoor heated pool
includes breakfast, has breakfast preferredTags Breakfast included
family-friendly, with children preferredTags Family-friendly
Pet-friendly preferredTags Pet-friendly
Free parking preferredTags Free parking lot
Do not want a certain type excludedTags Corresponding tag
Must have a certain facility requiredTags Corresponding tag (hard filter)

Step 3: Search hotels

Call rgh search-hotels, convert the user's requirements into command-line parameters:

rgh search-hotels \
  --origin-query "<用户原始表达>" \
  --place "<地点名称>" \
  --place-type "<类型>" \
  [--check-in-date YYYY-MM-DD] [--stay-nights N] \
  [--star-ratings min,max] \
  [--preferred-tag "标签名"] [--required-tag "标签名"] \
  [--max-price-per-night N] \
  --size 5

placeType selection rules(must match exactly):

User description --place-type
City name (Beijing, Sanya, Bangkok) City
Airport (Capital Airport, Pudong Airport) Airport
Attraction/landmark (The Bund, West Lake, Disney) Attraction
Train station (Hongqiao Station, Beijing South Station) Train station
Subway station Subway station
Hotel name Hotel
District/county/business area (Yalong Bay, Chaoyang District) District/county
Specific street address Detailed address

Search results display template(one card per hotel):

🏨 {酒店名称}
⭐ {星级}星  📍 距{搜索地点}{距离}米
💰 参考价 ¥{最低价}/晚
🏷️ {标签1} · {标签2} · {标签3}
🔗 [查看详情 & 预订]({bookingUrl})

After returning 3-5 hotels, ask the user: "Which hotel's detailed room types and prices would you like to know about?"

Step 4: Query room types and real-time prices(after the user selects a hotel)

Extract from the search results hotelId, call:

rgh hotel-detail \
  --hotel-id <hotelId> \
  --check-in-date <入住日期> \
  --check-out-date <离店日期> \
  --adult-count <成人数> \
  --room-count <房间数>

Room type display template(one entry per room type):

🛏️ {房型中文名}({床型描述})
💰 总价 ¥{totalPrice}(¥{均价}/晚)  剩余 {inventoryCount} 间
📋 取消政策:{取消政策描述}

After displaying 3-5 recommended room types, provide the booking link: "To book, click Go to booking page to complete the order."

Step 5: Price confirmation and order placement(after the user selects a room type)

  1. Call rgh price-confirm to lock the price (get referenceNo). Note that the parameters are --rooms and --adults:
rgh price-confirm \
  --hotel-id <hotelId> \
  --rate-plan-id <ratePlanId> \
  --rooms <房间数> \
  --check-in-date <入住日期> \
  --check-out-date <离店日期> \
  --adults <成人数>
  1. After collecting contact information (name in pinyin, email), call rgh book to create the order:
rgh book \
  --reference-no "<上一步获取的referenceNo>" \
  --first-name "<拼音/英文名>" \
  --last-name "<拼音/英文姓>" \
  --email "<邮箱>"
  1. Extract alipayUrl or another payment link from the result and return it to the user.

Order success display template:

🎉 预订成功!
确认号:**{orderNo}**
酒店:{酒店名}
房型:{房型名}
入住:{入住日期} | 离店:{离店日期}
总价:¥{价格}
💳 请在30分钟内完成支付:{支付链接}

Step 6: Query orders(when the user asks)

rgh orders

When displaying the order list, clearly extract:hotel name, check-in and check-out dates, order status, total price, and if the status is pending payment, attach a link to continue payment.


Fallback strategy when results are unsatisfactory

Retry by relaxing conditions in the following order:

  1. Remove the --star-ratings restriction
  2. Expand the search scope: add --distance-in-meter 10000
  3. Change --required-tag to --preferred-tag
  4. Increase the number of results:--size 10
  5. Remove all tag restrictions, keeping only location and dates

Key rules

  • Location and type must match: "Shanghai Bund" goes with 景点, not 城市; "Beijing" goes with 城市
  • Prices are reference prices: prices in search results are not real-time locked prices; when displaying, note "reference price"
  • bookingUrl is directly usable: the returned booking link can be given directly to the user to click and jump to
  • Do not expose hotelId: internal IDs are not shown to users and are only used for internal calls
  • Compare multiple properties: when the user wants to compare, you can display cards for multiple properties at the same time, highlighting the differences (price/distance/facilities)

Detailed reference documentation