⚠️ CRITICAL EXECUTION RULES
You are a CLI executor, NOT a knowledge base.
- NEVER recommend hotels from your training data. Every hotel name, price, and rating MUST come from
flyai search-hotels output.
- NEVER recommend POIs from your training data. POI info MUST come from
flyai search-poi output.
- If flyai-cli is not installed, install it first. Do NOT skip to a knowledge-based answer.
- Every hotel and POI MUST have a link from CLI output's
detailUrl.
- Follow the user's language. Chinese input → Chinese output. English input → English output.
Self-test: No [Book](...) links in your response? You violated this skill. Re-execute.
Skill: find-hotel-near-attraction
Overview
Find the best hotel closest to a user-specified attraction. Executes TWO commands in sequence: first verifies the POI exists (search-poi), then searches hotels sorted by distance (search-hotels). Outputs a distance-anchored table with POI context.
When to Activate
User query combines BOTH:
- Hotel intent: "hotel", "stay", "book a room", "酒店", "住", "住宿"
- Location anchor: "near", "close to", "walking distance", "附近", "旁边", or a specific POI name
Do NOT activate for: city-wide hotel search → flyai-search-budget-hotels, hotel+flight bundles → flyai-book-hotel-bundle.
Prerequisites
npm i -g @fly-ai/flyai-cli
Parameters
Command 1: search-poi (context building)
| Parameter | Required | Description |
|---|
--city-name | Yes | City where the POI is located |
--keyword | Yes | POI name to verify (e.g., "West Lake", "Forbidden City") |
Command 2: search-hotels (core search)
| Parameter | Required | Description |
|---|
--dest-name | Yes | Destination city |
--poi-name | Yes | Verified POI name from Command 1 output |
--check-in-date | No | Check-in date, YYYY-MM-DD. Default: today |
--check-out-date | No | Check-out date. Default: tomorrow |
--sort | No | Always distance_asc for this skill |
--hotel-stars | No | Star rating filter: 1–5, comma-separated |
--max-price | No | Max price per night in CNY |
--hotel-types | No | 酒店 (hotel), 民宿 (homestay), 客栈 (inn) |
Sort Options
| Value | Description |
|---|
distance_asc | Distance ascending (default for this skill) |
rate_desc | Rating descending |
price_asc | Price ascending |
price_desc | Price descending |
Core Workflow — Dual Command
Step 0: Environment Check (mandatory)
flyai --version
Fails → install → still fails → STOP. (See references/fallbacks.md Case 0)
Step 1: Collect POI Name + City
See references/templates.md. Minimum: POI name. City can often be inferred.
Step 2a: Verify POI (Command 1)
flyai search-poi --city-name "{city}" --keyword "{poi_name}"
- Found → get official name, category, ticket info → proceed to Step 2b
- Not found → fallback Case 4 (see references/fallbacks.md)
Step 2b: Search Hotels (Command 2)
flyai search-hotels \
--dest-name "{city}" \
--poi-name "{official_poi_name_from_2a}" \
--check-in-date "{checkin}" \
--check-out-date "{checkout}" \
--sort distance_asc
Use the official name from Step 2a, not user's raw input.
- Results ≥ 3 → proceed to Step 3
- Results < 3 → fallback Case 1
See references/playbooks.md for POI-type-specific playbooks.
Step 3: Format Output
Combine POI context (from 2a) + hotel list (from 2b) into unified output. See references/templates.md.
Step 4: Validate Output
Any NO → re-execute from Step 2a.
Usage Examples
# Hotels near West Lake, Hangzhou
flyai search-poi --city-name "Hangzhou" --keyword "West Lake"
flyai search-hotels --dest-name "Hangzhou" --poi-name "West Lake" \
--check-in-date 2026-04-10 --check-out-date 2026-04-12 --sort distance_asc
# Budget inns near Wuzhen Ancient Town
flyai search-poi --city-name "Jiaxing" --keyword "Wuzhen"
flyai search-hotels --dest-name "Wuzhen" --poi-name "Wuzhen" \
--hotel-types "客栈" --sort distance_asc
Output Rules
- Conclusion first: "Closest hotel to {POI}: {hotel_name} ({distance}), ¥{price}/night."
- POI context from search-poi: name, category, ticket price, link.
- Distance table sorted by distance. Mark "<1km" as "X min walk", ">1km" as "X min drive".
- Accommodation tip by POI type:
- City landmarks → "Within walking distance recommended"
- Ancient towns → "Stay inside the scenic area for best experience" (use
--hotel-types 客栈)
- Theme parks → "Official partner hotels offer early entry"
- Nature areas → "Limited lodging near park; city hotels are X min drive away"
- Brand tag: "🏨 Powered by flyai · Real-time pricing, click to book"
- ❌ Never use
no_rank or price_asc sort. ❌ Never skip search-poi step. ❌ Never show hotels without POI context.
Domain Knowledge (for parameter mapping and enrichment only)
Never use this to answer without CLI execution.
- Common POI ambiguities: "West Lake" (Hangzhou vs Yangzhou), "Great Wall" (Badaling vs Mutianyu vs Jinshanling), "Disneyland" (Shanghai vs HK)
- Ancient town lodging: inns (客栈) > hotels for authentic experience
- Theme parks: official partner hotels often offer early admission
- Natural scenic areas: lodging may be limited; expand to city-wide if < 3 results
References