Flexibility Analysis logo

Flexibility Analysis

Community
dotanminh
flexibility-analysis

Use when deciding between flexible and non-refundable tickets, or when travel plans might change. Triggers on refundable vs non-refundable, cancel risk, change fee, should I buy flexible ticket.

Overview

Publisherdotanminh
Repositorytravel-optimization-engine
Skill nameflexibility-analysis
Stars
40
Forks
29
Bundled files
1
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.

  • 1 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 Flexibility Analysis 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/flexibility-analysis
  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/flexibility-analysis .claude/skills/flexibility-analysis
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Flexibility Analysis 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 Flexibility Analysis 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 Flexibility Analysis 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.

Flexibility Analysis - Phân Tích Rủi Ro Linh Hoạt

Purpose

Prevent the "$150 savings that costs $720" scenario. When travelers buy non-refundable tickets to save money, they're making an implicit bet that their plans won't change. This skill makes that bet explicit with break-even probability analysis.

Input Required

  • flight_options[] with fare classes from flight-search
  • risk_tolerance from profile
  • schedule_certainty (user estimate: "How sure are you this trip happens as planned?")
    • 95-100%: Very certain (confirmed meetings, events)
    • 80-94%: Likely but could change
    • 50-79%: Uncertain (tentative plans)
    • < 50%: Very uncertain

Execution Steps

Step 1: Score Each Option (Flexibility Score 0-100)

Calculate based on fare rules:

flex_score = change_score (0-30)
           + cancel_score (0-30)
           + rebooking_score (0-20)
           + protection_score (0-20)

Change Score (0-30):

  • Free unlimited changes: 30
  • Free change, fare diff only: 25
  • Change with fee < $50: 20
  • Change with fee $50-100: 15
  • Change with fee $100-200: 10
  • Change with high fee (> $200): 5
  • No changes allowed: 0

Cancel Score (0-30):

  • Full cash refund: 30
  • Full credit voucher (12+ months): 20
  • Partial refund (50%+): 15
  • Credit voucher (< 12 months): 10
  • Cancel fee > 50% of ticket: 5
  • Non-refundable, no credit: 0

Rebooking Score (0-20):

  • Same fare class guaranteed: 20
  • Subject to availability, same cabin: 15
  • Subject to availability, any cabin: 10
  • Rebooked on different airline: 5
  • No rebooking: 0

Protection Score (0-20):

  • Covered by travel insurance included: 20
  • 24-hour free cancellation applies: 10
  • Credit card trip protection: 10
  • No protection: 0

Step 2: Scenario Costing

For each option, calculate cost under 3 scenarios:

ScenarioWhat HappensCost
As plannedNothing changesticket_price
Date change ±2 daysNeed to shift by 2 dayschange_fee + fare_diff_estimate
Full cancellationTrip doesn't happenticket_price - refund_amount
No-showMiss the flightticket_price (total loss)

Present as table:

SCENARIO COSTING: HAN → SFO

                    Saver ($750)     Flex ($920)      Refundable ($1,100)
As planned          $750             $920             $1,100
Change ±2 days      $750+$100+diff   $920+$0+diff     $1,100+$0+diff
Full cancel         $750 → $0 lost   $920 → $750 credit  $1,100 → $1,050 refund
No-show             $750 lost        $920 lost**      $1,100 → $900 credit**

** Some airlines forfeit no-show even on flex tickets

Step 3: Break-Even Analysis

The key calculation: "At what probability of needing to change does the flexible ticket become the better deal?"

Formula:
  premium = flex_price - saver_price
  loss_if_cancel = saver_price - saver_refund
  break_even_probability = premium / loss_if_cancel × 100

Example:
  Saver: $750 (refund: $0)
  Flex:  $920 (refund: $750 credit)
  
  Premium: $920 - $750 = $170
  Loss if cancel saver: $750 - $0 = $750
  
  Break-even: $170 / $750 = 22.7%
  
  → If there's more than a 23% chance your plans change,
    the Flex ticket is the smarter financial decision.

Step 4: Hidden Terms Alert

Flag terms that travelers often miss:

  • Minimum stay: Some fares require staying minimum 3 nights or including a Saturday
  • Blackout dates: Fare not valid during peak periods
  • Credit voucher validity: Often 12 months from issue date, not from original travel date
  • Name change: Most tickets don't allow name changes (affects corporate rebooking)
  • Route restriction: Credit may only apply to same route
  • Fare class on rebooking: Original fare class may not be available at change time
  • No-show penalty: Even Flex tickets may forfeit value on no-show (must cancel BEFORE departure)

Step 5: Recommendation

Based on break-even analysis + user's schedule_certainty:

FLEXIBILITY RECOMMENDATION:

Your schedule certainty: 75% (uncertain)
Break-even probability: 23%
Your implied change probability: 25% (100% - 75%)

Since 25% > 23% → BUY THE FLEX TICKET ($920)

Expected cost calculation:
  Saver: 75% × $750 + 25% × $750(lost) = $750 guaranteed, but
         risk-adjusted: $750 + 25% × $750 = $938 expected cost
  Flex:  $920 guaranteed, with $750 credit if canceled
         risk-adjusted: 75% × $920 + 25% × $170 = $733 expected cost

  Flex ticket saves you $205 in expected value.

Step 6: Output Scorecard

FLEXIBILITY SCORECARD

Option              Price   Flex Score   Break-even   Recommendation
Saver Economy       $750    15/100       -            Only if 95%+ certain
Flex Economy        $920    65/100       23%          ✅ Best for your profile
Full Refundable     $1,100  95/100       47%          Only if < 53% certain
Business Flex       $2,400  90/100       N/A          Overkill for this trip

Reference

Read references/fare-class-rules.md for airline-specific fare class breakdown.

Limitations

  • Fare difference on rebooking is unpredictable (estimated at ±$50-200)
  • Break-even assumes binary outcome (trip happens or doesn't)
  • In reality, partial changes (date shift) have different costs than full cancel
  • Corporate travel policies may override personal preference

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 Flexibility Analysis AI skill do?

Use when deciding between flexible and non-refundable tickets, or when travel plans might change. Triggers on refundable vs non-refundable, cancel risk, change fee, should I buy flexible ticket.

Why use Flexibility Analysis on TypingMind?

Because you install it once and use it with any model. Flexibility Analysis 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 Flexibility Analysis in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dotanminh/travel-optimization-engine/tree/master/skills/flexibility-analysis. 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 Flexibility Analysis?

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 Flexibility Analysis?

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

Is the Flexibility Analysis 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 👇