Date Optimization logo

Date Optimization

Community
dotanminh
date-optimization

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.

Overview

Publisherdotanminh
Repositorytravel-optimization-engine
Skill namedate-optimization
Stars
40
Forks
29
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by dotanminh on GitHub. Read the source before you install it.

Installation

Install the Date Optimization AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dotanminh/travel-optimization-engine/tree/master/skills/date-optimization
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dotanminh/travel-optimization-engine.git /tmp/travel-optimization-engine
mkdir -p .claude/skills
cp -r /tmp/travel-optimization-engine/skills/date-optimization .claude/skills/date-optimization
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Date Optimization in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Date Optimization on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Date Optimization is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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:

  • origin, destination (IATA codes)
  • departure_date (target)
  • return_date (target, if round-trip)
  • flexibility: low (±2d) | medium (±7d) | high (±14d)

Execution Steps

Step 1: Build Date Range

Calculate the full search window:

  • Depart window: departure_date - flex_days to departure_date + flex_days
  • Return window: return_date - flex_days to return_date + flex_days
  • Total combinations: (flex_days * 2 + 1)² for round-trip

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:

  • Tuesday, Wednesday: typically 15-25% cheaper (lowest demand)
  • Friday, Sunday: typically 10-20% more expensive (weekend travel peaks)
  • Saturday departure: sometimes cheap (contra-flow)

Seasonal patterns:

  • Refer to references/pricing-patterns.md for route-specific seasonality

Advance purchase effect:

  • 21+ days ahead: best domestic fares
  • 45-60 days ahead: best international fares
  • < 7 days: premium pricing (last-minute surge)
  • Exception: LCCs sometimes release last-minute deals

Holiday surcharges:

  • Vietnamese holidays: Tet (+50-100%), 30/4-1/5 (+30-50%), 2/9 (+20-30%)
  • US holidays: Thanksgiving, Christmas, July 4th (+30-60%)
  • School holidays: June-August (+20-40% on leisure routes)

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")
    • Example: "Tuesday departure avoids weekend premium. Mid-week return catches post-business-travel low."
  4. 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:

  • Use /v2/search with date_from and date_to parameters
  • Set fly_days to cover the full flexibility range
  • Real prices replace pattern-based estimates

Limitations

  • AI-Knowledge mode provides relative rankings, not exact prices
  • Holiday pricing can be unpredictable (flash sales, last-minute changes)
  • Pattern accuracy decreases for niche routes with irregular schedules

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Date Optimization AI skill do?

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.

Why use Date Optimization on TypingMind?

Because you install it once and use it with any model. Date Optimization is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Date Optimization in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dotanminh/travel-optimization-engine/tree/master/skills/date-optimization. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Date Optimization?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Date Optimization?

As many as you like. As long as a model supports skills, you can use Date Optimization with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Date Optimization AI skill free?

Yes. It is published on GitHub by dotanminh under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇