⚠️ Output Specifications:
- It is strictly prohibited to show users any technical details, including but not limited to: tool names (such as
search-hotels、hotel-detail), JSON field names (such ashotelId、ratePlanId、referenceNo), command-line content, and technical parameters.- Only show information users care about: hotel name, star rating, price, distance, core facilities, tags, and booking link.
- Results must be displayed in a formatted way, with each hotel occupying its own card, key information separated by line breaks, and piling everything into one line is prohibited.
- Price explanation: the prices in search results are reference display prices, the actual order price is subject to price confirmation, and "reference price" should be noted when displaying.
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 within 500 yuan", "affordable accommodation", "luxury hotel recommendations"
- Filter by brand: "Hilton", "Marriott", "Atour", "JI Hotel"
Query and Comparison:
- Check room prices: "How much is a hotel in Hangzhou per night", "What is the price of this hotel"
- View room types: "What room types are available", "Is there 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"
- Query orders: "My orders", "The hotel I booked before", "Order status"
Trigger Word Coverage: find a hotel, book a hotel, search hotels, hotel recommendations, hotel query, nearby hotels, five-star hotels, homestays, resorts, check room prices, view room types, check in, where to stay, accommodation, business travel 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 flight tickets, train tickets, car rentals, and attraction tickets
- The user is just chatting about travel destinations without a clear accommodation intent
- The user has clearly stated "no need to book" or "just asking"
Security Gating
⚠️ Hotel booking is areal consumption operation:
- Mandatory two-step confirmation: first display room types and prices, and only after the user clearly selects a room type and confirms should price locking and order placement proceed.
- Information completeness:Before placing an order, you must confirm the guest name and email address (the phone number will be obtained by default via OAuth, and the user does not need to fill in any parameters).
- Price confirmation validity period:
referenceNoThe validity period is about 15-30 minutes; once expired, price confirmation must be called again.
Workflow
Step 0: Login authorization check(execute on first use or when the Token is invalid)
-
Execute
rgh whoamito check login status:- Output
✅ 已登录→ go directly to Step 1 - Output
❌ 未登录→ executergh login, and complete authorization as prompted
- Output
-
Authorization process:
- The terminal will display the authorization link and automatically open the browser
- After the user completes authorization in the browser, the terminal automatically obtains the Token
- After successful authorization, 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; ask again only when key information is missing:
| Information | Required | Default value |
|---|---|---|
| Destination (city/attraction/address) | ✅ Required | None, need to ask |
| 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 needs (tags) | Optional | None |
Destination is the only information that must be confirmed. When other information is missing, use the default values and 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", "breakfast included", "family-friendly", "pets"), first execute:
rgh hotel-tags
Find the exact tag name from the returned results, then use it for searching. Common mappings:
| User wording | Tag type | Common tag name |
|---|---|---|
| with pool, has swimming pool | preferredTags | Outdoor pool / Indoor heated pool |
| breakfast included, 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, and convert the user's needs 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 |
| Attractions/Landmarks (The Bund, West Lake, Disneyland) | 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 one would you like to know the detailed room types and prices for?"
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)
- Call
rgh price-confirmto lock the price (getreferenceNo). Note that the parameters are--roomsand--adults:
rgh price-confirm \
--hotel-id <hotelId> \
--rate-plan-id <ratePlanId> \
--rooms <房间数> \
--check-in-date <入住日期> \
--check-out-date <离店日期> \
--adults <成人数>
- After collecting contact information (name in pinyin, email), call
rgh bookto create the order:
rgh book \
--reference-no "<上一步获取的referenceNo>" \
--first-name "<拼音/英文名>" \
--last-name "<拼音/英文姓>" \
--email "<邮箱>"
- Extract from the result
alipayUrlor other payment links and return them to the user.
Order success display template:
🎉 预订成功!
确认号:**{orderNo}**
酒店:{酒店名}
房型:{房型名}
入住:{入住日期} | 离店:{离店日期}
总价:¥{价格}
💳 请在30分钟内完成支付:{支付链接}
Step 6: Query orders(when the user asks)
rgh orders
When displaying the order list, please clearly extract:hotel name, check-in and check-out dates, order status, total price, and if the status is pending payment, attach the link to continue payment.
Fallback strategy when results are unsatisfactory
Retry by relaxing conditions in the following order:
- Remove the
--star-ratingsrestriction - Expand the search scope: add
--distance-in-meter 10000 - Change
--required-tagto--preferred-tag - Increase the number of results:
--size 10 - Remove all tag restrictions, keep only the location and dates
Key rules
- Location and type must match: "Shanghai The Bund" matches
景点, not城市; "Beijing" matches城市 - Prices are reference prices: the 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 displayed to the user and are only used for internal calls
- Compare multiple hotels: when the user wants to compare, you can display cards for multiple hotels at the same time, highlighting the differences (price/distance/facilities)
Detailed reference documentation
- references/cli-params.md — Complete parameter specification for CLI commands