Date optimization

From dotanminh/travel-optimization-engine · View interactive version

Date optimization is an AI agent skill from the GitHub repository dotanminh/travel-optimization-engine. Use when traveler has flexible dates and wants to find the cheapest departure/return combination. Triggers on cheapest day to fly, flexible dates, when to book, price calendar.

How to use this skill

Skill file

Date Optimization - Quét Ngày Bay Tối Ưu

Purpose

Find the optimal departure and return dates within a flexible range. Instead of checking prices day-by-day, this skill builds a complete price matrix and identifies the cheapest combinations with clear explanations.

Input Required

From orchestrator profile:

Execution Steps

Step 1: Build Date Range

Calculate the full search window:

Example (±7 days): 15 × 15 = 225 date combinations to evaluate.

Step 2: Apply Pricing Patterns (AI-Knowledge Mode)

Use these established pricing patterns to estimate relative costs:

Day-of-week patterns:

Seasonal patterns:

Advance purchase effect:

Holiday surcharges:

Step 3: Score Each Combination

For each date pair, calculate a relative price score (1-10):

score = base_pattern + day_of_week_factor + seasonal_factor + advance_purchase_factor

Step 4: Generate Output

Format: Price Heatmap (text-based)

           Return →  Mon  Tue  Wed  Thu  Fri  Sat  Sun
Depart ↓
  Mon 15/6           $$   $    $    $$   $$$  $$   $$$
  Tue 16/6           $    $    $    $    $$   $$   $$
  Wed 17/6           $    $    $    $    $$   $$   $$$
  Thu 18/6           $$   $    $    $$   $$$  $$   $$$
  Fri 19/6           $$$  $$   $$   $$   $$$  $$$  $$$

Legend: $ = cheapest tier, $$ = mid-range, $$$ = most expensive

TOP 3 Recommendations:

For each recommendation, provide:

  1. Specific dates (depart + return)
  2. Estimated savings vs target date
  3. WHY this combination is cheap (not just "it's cheaper")
  1. Trade-off: what user gives up (e.g., "1 fewer weekend day at destination")

Step 5: Pass Forward

Send to flight-search skill:

optimal_dates: [
  {depart: "2026-06-16", return: "2026-06-25", confidence: "high"},
  {depart: "2026-06-17", return: "2026-06-24", confidence: "high"},
  {depart: "2026-06-15", return: "2026-06-23", confidence: "medium"}
]

API-Enhanced Mode

When Kiwi Tequila API is available, replace Step 2-3 with real price data:

Limitations

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.