Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flight-optimizer

A Claude Code skill that finds the cheapest way to book a trip across cash and points, using your own credit-card rewards.

It scrapes two surfaces in a real browser, normalizes every option to a single comparable number (effective dollars), and recommends the cheapest combination — weighing cash against points on a per-leg basis.

How it works

Two surfaces cover everything (it deliberately does not scrape airline sites like delta.com — they hard-block automation and add nothing the two below don't):

Surface Provides
Capital One Travel Cash fares for all airlines (incl. Delta). It's also where you book for Venture X earning, so the portal price is the cash number that matters.
point.me Award/points prices for all programs (incl. Delta SkyMiles direct and the best transfer route, e.g. Amex MR → Delta). Also shows each flight's cash price as a secondary anchor.

point.me already does the hard award math (transfer ratios, bonuses, which currency to use), so this skill never does transfer math — it gathers prices and ranks them.

The split of labor:

  • The browser (gstack /browse, headed mode) is the hands that scrape.
  • scripts/ranker.py is the brain. It converts every option to effective dollars (cash + taxes + points × your-valuation), reports the cents-per-point you'd get, and compares one whole-trip booking against the best mix of one-ways.

Install

Clone into your Claude Code skills directory:

git clone https://github.com/hchittanuru3/flight-optimizer.git \
  ~/.claude/skills/flight-optimizer

Then invoke it in Claude Code:

/flight-optimizer find the best round trip NYC to Dallas around Jul 14-21

Requirements

  • Claude Code
  • The gstack /browse skill (headed "GStack Browser") for scraping
  • Python 3 (standard library only — no pip installs)

Configure

config.json is the only thing the ranker knows about you: which point currencies you hold and your personal valuation of each (cents per point). These valuations are the single biggest lever on the recommendation — tune them.

{
  "currencies": ["venture_x", "amex_mr", "delta_skymiles"],
  "valuations_cpp": { "venture_x": 1.85, "amex_mr": 2.0, "delta_skymiles": 1.25 },
  "cash_equivalent_cpp": { "venture_x": 1.0 },  // portal/eraser fixed rate
  "min_acceptable_cpp": 1.3                       // flag redemptions below this
}

The valuations shipped here are an example. Edit config.json to match your own wallet and how you value each currency. point.me owns transfer ratios and bonuses — never put those here.

Run the ranker directly

The browser step produces a gathered.json (see references/gathered_schema.md). Rank it:

python scripts/ranker.py --input gathered.json --config config.json --explain

references/gathered.example.json is a worked example you can run today.

Files

  • SKILL.md — the skill definition Claude follows
  • scripts/ranker.py — cash-vs-points ranker (deterministic, stdlib only)
  • scripts/firefox_cookies.py — helper to side-load Firefox/Zen cookies for the Capital One cash fast-path
  • references/gathered_schema.md — the scrape → ranker data contract
  • references/gathered.example.json — a worked example
  • config.json — your currencies and personal point valuations

License

MIT — see LICENSE.

About

Claude Code skill: find the cheapest way to book a trip across cash and points (Capital One Travel + point.me)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages