| name | travel-planner |
| description | Use when planning a trip that needs AMap POI research, Xiaohongshu-style recommendation synthesis, a user-confirmed Markdown itinerary, or a reusable local interactive travel map. |
Travel Planner
Use this skill for multi-day travel planning where the final result should be reusable, not just a chat answer.
Core rule: separate the work into two phases.
- Research and confirmation.
- Interactive map generation.
Do not jump straight to a finished itinerary when the user expects to review choices first.
Workflow
- Create or reuse a task folder under the current repo
tasks/YYYYMMDD_HHMM_<trip_name>.
- Collect facts with AMap first:
- train stations, airport, hotel, departure point, return point;
- candidate attractions, photo spots, meals, drinks, backup points;
- POI coordinates, rating, average cost, address, opening hours, collection count if available;
- route checks for the important day-level hops.
- Use web search and Xiaohongshu-like sources as preference input:
- keep posts with credible engagement;
- treat low-engagement posts as weak evidence;
- do not let social posts override AMap location and route facts.
- Write a Markdown confirmation document, normally
trip-plan.md.
- Use prose and short lists.
- Do not make spreadsheet tables the main review surface unless the user asks.
- Mark uncertain fields directly.
- After the user confirms, convert the plan into
data/trip-data.json.
- Copy
assets/interactive-map-template into the task folder.
- Replace the template
data/trip-data.json with the trip data.
- Start the local app, usually on port
40000.
Interactive Map
The bundled template is data-driven. It expects:
interactive-map/
server.js
public/
index.html
app.js
styles.css
data/
trip-data.json
Use scripts/new-trip-app.ps1 to copy the template:
powershell -ExecutionPolicy Bypass -File <skill-dir>\scripts\new-trip-app.ps1 -Destination <task-dir>\interactive-map
Validate data before starting:
node <skill-dir>\scripts\validate-trip-data.js <task-dir>\interactive-map\data\trip-data.json
Start:
cd <task-dir>\interactive-map
node .\server.js
The app provides:
- AMap JSAPI map with marker filtering by city, day, and type.
- marker details with rating, cost, address, notes, and AMap jump links.
- marker details can show up to three AMap photos and generated Meituan/Dianping/Douyin search links.
- real-time AMap route queries for driving/taxi, transit, and walking.
- a separate live AMap weather card with manual refresh and periodic refresh.
- collapsible sidebar for ticket images, editable luggage, editable day plans, reminders, and route notes.
Data Schema
Read references/trip-data-schema.md when preparing trip-data.json.
Minimum required fields:
trip.title
types
days
points
Each point needs:
id
name
type
typeLabel
days
city
location as "longitude,latitude"
Recommended point fields:
rating
cost
address
openTime
note
meal
area
amapUrl
photos
searchLinks
Recommended itinerary fields:
ticketImages
luggage
days
Quality Rules
- For food, prefer AMap rating above
4.4 and high collection count when available.
- Pass food below
4.2 unless the user explicitly wants it.
- Keep meals near the day route. Do not optimize a restaurant if it breaks the route.
- Prefer local brands and local cuisine when other facts are close.
- Use walking for about 1 km or less.
- Prefer metro when station walking stays reasonable.
- Prefer taxi when metro requires long walking and the destination is within a short city radius.
- Verify ticketing, student ticket rules, booking, crowding, and queue risk where the plan depends on them.
Verification
Before saying the app is ready:
- Run
node --check server.js.
- Run
node --check public/app.js.
- Run
node scripts/validate-trip-data.js <trip-data.json> from this skill or equivalent.
- Start the app and check
GET /, /api/points, and one /api/route.
- For frontend edits, inspect both desktop and mobile views.
Do not claim real-time routing unless /api/route is still calling AMap Web Service, not static route data.