Agent skill

American Airlines

by borski in borski/travel-hacking-toolkit

Check American Airlines AAdvantage balance, elite status, and loyalty points via Patchright.

MITAuto-check passed

Install American Airlines

skills CLI
$ npx skills add borski/travel-hacking-toolkit --skill american-airlines -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install borski/travel-hacking-toolkit american-airlines --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/borski/travel-hacking-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/travel-hacking-toolkit/skills/american-airlines .claude/skills/american-airlines && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
american-airlines
GitHub stars
688
Token cost
~1.3k tokens
SKILL.md length
535 words
Files
3 (incl. scripts)
Skills in repo
46
Repo updated
First seen
Licence
MIT

At a glance

Check American Airlines AAdvantage balance, elite status, and loyalty points via Patchright.

  • Works in 5 steps: Run the script in the background (nohup… → Poll stderr for "2FA REQUIRED" to… → Ask the user for the 6-digit code AA… → …
  • SKILL.md covers Prerequisites, Usage, 2FA Handling and Output, plus 4 more sections
  • Runs Python scripts from its folder; calls python3, docker and pip; needs AA_PASSWORD

What it does

American Airlines is an agent skill from borski/travel-hacking-toolkit. Check American Airlines AAdvantage balance, elite status, and loyalty points via Patchright. Handles email 2FA with 6-box code entry. Uses persistent browser profiles to skip 2FA on subsequent runs.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including scripts (for example `scripts/check_balance.py`).

The repository describes itself as: AI-powered travel hacking and search with cash, points, miles, and award flights. Drop-in skills and MCP servers for Claude, Codex, and OpenCode. The licence is MIT.

Example prompts

  • “/american-airlines”

Requirements

  • Python 3
  • Docker

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Run the script in the background (nohup ... &, disown)
  2. Poll stderr for "2FA REQUIRED" to confirm the code was sent
  3. Ask the user for the 6-digit code AA emailed them
  4. Write the code to the code file: echo "123456" > /tmp/aa-2fa-code.txt
  5. Wait for the script to complete and read stdout for the JSON result

What it can do on your machine

Read from SKILL.md and the folder at commit db82131. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • docker
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use docker and pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • AA_PASSWORD

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

American Airlines loads about 1.3k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 535 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from borski/travel-hacking-toolkit at commit db82131, republished under its MIT licence (© borski). 535 words, ~1,285 tokens.

Download SKILL.mdSave it as .claude/skills/american-airlines/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
american-airlines
description
Check American Airlines AAdvantage balance, elite status, and loyalty points via Patchright. Handles email 2FA with 6-box code entry. Uses persistent browser profiles to skip 2FA on subsequent runs.
category
loyalty
summary
AAdvantage balance and elite status. AwardWallet does not support AA.
api_key
None (requires Patchright)
docker_image
ghcr.io/borski/aa-miles-check

American Airlines AAdvantage

Check AAdvantage award miles balance, elite status (Gold/Platinum/Platinum Pro/Executive Platinum), loyalty points, and million miler status. Uses Patchright (undetected Playwright fork) because AA blocks standard browser automation.

Requires Patchright. AA.com blocks vanilla Playwright and agent-browser.

Prerequisites

bash
pip install patchright && patchright install chromium

Or use Docker (no local install needed):

bash
docker pull ghcr.io/borski/aa-miles-check:latest
# or build locally:
docker build -t aa-check skills/american-airlines/

Usage

Pass credentials via environment variables or flags. If you use a secrets manager (1Password, Vault, etc.), inject them however you normally would.

bash
# Environment variables
AA_USERNAME=your_aa_number AA_PASSWORD=your_password \
  python3 scripts/check_balance.py --json

# Flags
python3 scripts/check_balance.py --username YOUR_AA_NUMBER --password YOUR_PASSWORD --json

# Docker
docker run --rm -e AA_USERNAME=your_aa_number -e AA_PASSWORD=your_password aa-check --json

2FA Handling

AA requires email verification on first login from a new device. The script waits up to 120 seconds for the code.

You (the agent) do NOT have access to the user's email. AA sends the 2FA code to the account holder's email address. When the script hits 2FA, you MUST ask the user for the 6-digit code. This is not optional. Do not try to read their email. Do not guess. Do not skip. Ask them, wait for the answer, then write it to the code file.

Agent workflow
  1. Run the script in the background (nohup ... &, disown)
  2. Poll stderr for "2FA REQUIRED" to confirm the code was sent
  3. Ask the user for the 6-digit code AA emailed them
  4. Write the code to the code file: echo "123456" > /tmp/aa-2fa-code.txt
  5. Wait for the script to complete and read stdout for the JSON result
Persistent profiles (skip 2FA on repeat runs)

Use --profile name to save browser cookies. After the first successful 2FA, subsequent runs with the same profile skip 2FA entirely. Profiles are stored at ~/.aa-browser-profiles/{name}/. Sessions last hours, not days.

bash
# First run: will need 2FA
python3 scripts/check_balance.py --profile user1 --json

# Later runs: same profile, no 2FA
python3 scripts/check_balance.py --profile user1 --json
Code input methods
  • Command hook: Set AA_2FA_COMMAND to a command that blocks until it has the code, then prints it to stdout. The script runs this first before falling back to file polling.
  • File (default): Script polls /tmp/aa-2fa-code.txt every 2 seconds. Write the 6-digit code there.
  • Direct flag: --code 123456 if you already have the code before running.
  • Custom file path: --code-file /path/to/code.txt
Show full SKILL.md (217 more words)Show less

Output

json
{
  "username": "XXXXXXX",
  "status": "completed",
  "miles": 123425,
  "elite_status": "Platinum Pro",
  "loyalty_points": 180,
  "name": "John Doe",
  "aadvantage_number": "XXXXXXX",
  "million_miler": 19328,
  "member_since": "Aug 23, 2011"
}
FieldDescription
milesAward miles balance (redeemable)
elite_statusGold, Platinum, Platinum Pro, or Executive Platinum (null if none)
loyalty_pointsCurrent year loyalty points (reset March 1)
million_milerLifetime miles toward Million Miler status
member_sinceAccount creation date

When to Use

  • Checking AA miles balance (AwardWallet doesn't support AA)
  • Verifying elite status tier and expiration
  • Tracking loyalty points toward next status level
  • Comparing AA award availability against balance (combine with seats-aero)

When NOT to Use

  • Booking flights. Read-only. Does not modify anything.
  • Other airlines. Use AwardWallet for airlines it supports.

Implementation Notes

  • AA uses 6 separate input boxes for 2FA codes (one digit per box). The script types each digit individually with auto-advance.
  • Cookie consent banners are removed via JS before interacting with the Verify button.
  • The Verify button requires Tab+Enter to submit (neither JS .click() nor Playwright .click() produce a trusted pointer event that AA's React app accepts).
  • headless=False is required. AA detects headless browsers even with Patchright. Docker uses xvfb for a virtual display.

Limitations

  • 2FA on first use per profile. No way around it. AA sends an email code. Set AA_2FA_COMMAND to automate code retrieval.
  • Session expiry. Persistent profiles last hours, not days. Long gaps between runs may require 2FA again.
  • Headed mode required. Opens a Chrome window locally. Use Docker for no popup.

© borski, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in plugins/travel-hacking-toolkit/skills/american-airlines of borski/travel-hacking-toolkit.

  • SKILL.md
  • Dockerfile
  • scripts/check_balance.py

Open the folder on GitHubat commit db82131

Compare with similar skills

American Airlines next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

American Airlines compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
American Airlines this skillborski/travel-hacking-toolkit688—~1.3kAutomated safety check: PassMIT
Agent Load Balancerruvnet/ruflo74k2 repos~3.1kAutomated safety check: PassMIT
Load Balancingsickn33/agentic-awesome-skills47k2 repos~2.9kAutomated safety check: NotesMIT
Game Balance CheckDonchitos/Claude-Code-Game-Studios26k—~2.2kAutomated safety check: PassMIT
Pp Alaska Airlinesmvanhorn/printing-press-library2.1k—~4.1kAutomated safety check: WarnApache-2.0
Testing Load Balancersjeremylongshore/tons-of-skills-marketplace2.8k—~1.6kAutomated safety check: PassMIT

Similar skills

  • Agent skill for load-balancer - invoke with $agent-load-balancer

    74k GitHub starsUsed in 2 repos~3.1k tokens
    DevOps & CloudAuto-check passed
  • Load Balancing

    sickn33/agentic-awesome-skills

    Configure load balancers and traffic distribution. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~2.9k tokens
    DevOps & CloudAuto-check: notes
  • Game Balance Check

    Donchitos/Claude-Code-Game-Studios

    Checks game data and formulas for balance outliers, broken progression, degenerate strategies and economy problems, and answers 'could not run' when the data is missing.

    26k GitHub stars~2.2k tokensUpdated 3 days ago
    Game DevelopmentAuto-check passed
  • Pp Alaska Airlines

    mvanhorn/printing-press-library

    Search Alaska Airlines flights and check Atmos Rewards balance from the terminal, with offline-cached airports and agent-native JSON output.

    2.1k GitHub stars~4.1k tokensUpdated yesterday
    Auto-check: warnings
  • Testing Load Balancers

    jeremylongshore/tons-of-skills-marketplace

    Validate load balancer behavior, failover, and traffic distribution.

    2.8k GitHub stars~1.6k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Configuring Load Balancers

    jeremylongshore/tons-of-skills-marketplace

    Configure use when configuring load balancers including ALB, NLB, Nginx, and HAProxy.

    2.8k GitHub stars~1.2k tokensUpdated yesterday
    DevOps & CloudAuto-check passed

More from borski/travel-hacking-toolkit

All 46 skills in this repo
  • Amex Travel

    borski/travel-hacking-toolkit

    Search Amex travel portal for cash prices, MR points pricing, IAP discounts, and FHR/THC hotel benefits via Patchright.

    688 GitHub stars~3.1k tokensUpdated 5 days ago
    Auto-check passed
  • Chase Travel

    borski/travel-hacking-toolkit

    Search Chase UR travel portal via Patchright for cash prices, points pricing, Points Boost offers, and Chase Edit hotel benefits.

    688 GitHub stars~2.8k tokensUpdated 5 days ago
    Auto-check passed
  • Deutsche Bahn

    borski/travel-hacking-toolkit

    Deutsche Bahn train schedules, journey planning, and departures across Germany and into neighboring countries (Austria, Switzerland, Netherlands, France, Belgium).

    688 GitHub stars~1.5k tokensUpdated 5 days ago
    Auto-check passed
  • Sutochno

    borski/travel-hacking-toolkit

    Search Sutochno.ru (СУТОЧНО.РУ), a Russian short-term apartment-rental platform where you book directly from owners and pay in rubles (Mir card / bank transfer).

    688 GitHub stars~2.1k tokensUpdated 5 days ago
    Auto-check passed
  • Ticketsatwork

    borski/travel-hacking-toolkit

    Search TicketsAtWork (EBG corporate perks) for hotels, theme park tickets, attractions, and rental cars via Patchright.

    688 GitHub stars~4.2k tokensUpdated 5 days ago
    Auto-check passed
  • Vrbo

    borski/travel-hacking-toolkit

    Search VRBO (Vrbo / Expedia Group) vacation rentals including entire homes, condos, and cabins via Patchright browser automation.

    688 GitHub stars~1.7k tokensUpdated 5 days ago
    Auto-check passed

Questions about American Airlines

What does American Airlines do?

Check American Airlines AAdvantage balance, elite status, and loyalty points via Patchright. American Airlines is an agent skill from borski/travel-hacking-toolkit. Check American Airlines AAdvantage balance, elite status, and loyalty points via Patchright.

How do I install American Airlines in Claude Code?

Run `npx skills add borski/travel-hacking-toolkit --skill american-airlines -a claude-code`. Or copy the skill folder (plugins/travel-hacking-toolkit/skills/american-airlines in borski/travel-hacking-toolkit) into .claude/skills/american-airlines in your project. Claude Code loads it when a task matches its description.

How do I install American Airlines in Codex?

Run `npx skills add borski/travel-hacking-toolkit --skill american-airlines -a codex`. Or copy the skill folder (plugins/travel-hacking-toolkit/skills/american-airlines in borski/travel-hacking-toolkit) into .agents/skills/american-airlines in your project. Codex loads it when a task matches its description.

Can I use American Airlines in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add borski/travel-hacking-toolkit --skill american-airlines -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/american-airlines, .gemini/skills/american-airlines, .github/skills/american-airlines and .opencode/skills/american-airlines in your project.

What does American Airlines need to run?

Going by SKILL.md and its folder, American Airlines needs Python for the scripts in its folder, the command-line tools its instructions call (python3, docker and pip) and credentials named AA_PASSWORD. Our summary lists: Python 3; Docker.

Does American Airlines access the network?

SKILL.md contains no URLs. Its commands use docker and pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is American Airlines safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does American Airlines use?

American Airlines is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does American Airlines use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to American Airlines?

Skills that share tags, products or a category with American Airlines: Agent Load Balancer (ruvnet/ruflo, 74k stars), Load Balancing (sickn33/agentic-awesome-skills, 47k stars), Game Balance Check (Donchitos/Claude-Code-Game-Studios, 26k stars) and Pp Alaska Airlines (mvanhorn/printing-press-library, 2.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains American Airlines?

borski (a GitHub user) maintains it in borski/travel-hacking-toolkit, which has 688 GitHub stars. The repository holds 46 skills in this directory. The repository was last updated on October 5, 2026.

Source: borski/travel-hacking-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.