Skip to main content
skill CX Codex

flight — Claude Code skill: compare flights and pick a seat

A terminal panel with a flight list and a seat map. You choose with the keyboard, and the agent gets the result back.

MIT 2 installs ★ 1,518 updated 2026-01-08

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dvdsgl/claude-canvas --skill flight -a claude-code
Open on GitHub

What flight does

The skill opens an interactive panel: flights on one side with carrier, departure and arrival times, duration and fare, the cabin on the other. The default scenario is booking. Arrow keys walk the flight list, Tab moves focus to the seat map, Space marks a seat, Enter confirms. Whatever you picked goes back to the agent over IPC.

It starts with bun run src/cli.ts spawn flight --scenario booking and a JSON config: a flights array where each entry has airports, ISO timestamps, price in cents, cabin class, stop count and an optional seatmap with rows, occupied, blocked and extra-legroom seats. There is also an API route: import bookFlight from ${CLAUDE_PLUGIN_ROOT}/src/api and read the result in code.

No flight search happens inside. The panel renders the list the agent assembles, so with an empty config or no bun installed it will not come up.

What it helps with

  • compare several flights by price and timing on one screen
  • grab a window seat on a specific flight
  • show business class rows with extra legroom
  • hand the agent a confirmed flight plus its seat number
  • sort options by stop count before buying

Example prompts for the agent

  • Compare flights from San Francisco to Denver and open the seat map.
  • Find the cheapest nonstop to New York and offer me a window seat.
  • Show business class to Chicago with more legroom.

How to install flight

1Skills CLI (Vercel)

npx skills add dvdsgl/claude-canvas --skill flight -a claude-code

2Manually: put the files in place

~/.claude/skills/flight/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/flight/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about flight

How do I install flight in Claude Code?

Run npx skills add dvdsgl/claude-canvas --skill flight -a claude-code. The skill file lands at ~/.claude/skills/flight/SKILL.md.

What does the flight skill do?

It draws a flight list and seat map in the terminal, lets you pick a flight and a seat with the keyboard, then passes that choice back to the agent over IPC.

What has to be in place before the panel runs?

bun installed and a JSON config with a flights array. Without them bun run src/cli.ts spawn flight has nothing to start.

Source text

SKILL.md · MIT
---
name: flight
description: |
  Flight canvas for comparing flights and selecting seats.
  Use when users need to browse flight options and book seats.
---

# Flight Canvas

Cyberpunk-themed flight comparison and seat selection interface.

## Example Prompts

Try asking Claude:

- "Find flights from San Francisco to Denver on January 15th"
- "Book me a window seat on the cheapest nonstop to NYC"
- "Compare morning flights from LAX to Seattle next Monday"
- "I need a business class seat to Chicago with extra legroom"
- "Show me United flights to Boston under $300"

## Scenarios

### `booking` (default)
Interactive flight comparison and seat selection.

- Shows flight options with airline, times, duration, and price
- Interactive seat map for seat selection
- Keyboard navigation between flights and seats
- Returns selected flight and seat via IPC

```bash
bun run src/cli.ts spawn flight --scenario booking --config '{
  "title": "// FLIGHT_BOOKING_TERMINAL //",
  "flights": [
    {
      "id": "ua123",
      "airline": "United Airlines",
      "flightNumber": "UA 123",
      "origin": {
        "code": "SFO",
        "name": "San Francisco International",
        "city": "San Francisco",
        "timezone": "PST"
      },
      "destination": {
        "code": "DEN",
        "name": "Denver International",
        "city": "Denver",
        "timezone": "MST"
      },
      "departureTime": "2026-01-08T12:55:00-08:00",
      "arrivalTime": "2026-01-08T16:37:00-07:00",
      "duration": 162,
      "price": 34500,
      "currency": "USD",
      "cabinClass": "economy",
      "aircraft": "Boeing 737-800",
      "stops": 0,
      "seatmap": {
        "rows": 30,
        "seatsPerRow": ["A", "B", "C", "D", "E", "F"],
        "aisleAfter": ["C"],
        "unavailable": ["1A", "1B", "1C", "1D", "1E", "1F"],
        "premium": ["2A", "2B", "2C", "2D", "2E", "2F"],
        "occupied": ["3A", "3C", "4B", "5D"]
      }
    }
  ]
}'
```

## Configuration

```typescript
interface FlightConfig {
  flights: Flight[];
  title?: string;           // Header title
  showSeatmap?: boolean;    // Enable seat selection
  selectedFlightId?: string; // Pre-select a flight
}

interface Flight {
  id: string;
  airline: string;          // e.g., "United Airlines"
  flightNumber: string;     // e.g., "UA 123"
  origin: Airport;
  destination: Airport;
  departureTime: string;    // ISO datetime
  arrivalTime: string;      // ISO datetime
  duration: number;         // Minutes
  price: number;            // Cents
  currency: string;         // e.g., "USD"
  cabinClass: "economy" | "premium" | "business" | "first";
  aircraft?: string;        // e.g., "Boeing 737-800"
  stops: number;            // 0 = nonstop
  seatmap?: Seatmap;        // Optional seat selection
}

interface Airport {
  code: string;             // 3-letter code
  name: string;             // Full airport name
  city: string;
  timezone: string;
}

interface Seatmap {
  rows: number;
  seatsPerRow: string[];    // e.g., ["A", "B", "C", "D", "E", "F"]
  aisleAfter: string[];     // e.g., ["C"] = aisle after seat C
  unavailable: string[];    // Blocked seats
  premium: string[];        // Extra legroom/exit row
  occupied: string[];       // Already booked
}
```

## Controls

- `↑/↓`: Navigate between flights
- `Tab`: Switch focus between flight list and seatmap
- `←/→/↑/↓` (in seatmap): Move seat cursor
- `Space`: Select/deselect seat
- `Enter`: Confirm selection
- `Shift+Enter`: Confirm immediately (skip countdown)
- `q` or `Esc`: Cancel

## Selection Result

```typescript
interface FlightResult {
  selectedFlight: Flight;
  selectedSeat?: string;    // e.g., "12A"
}
```

## Seat Legend

- `[ ]` - Available seat
- `[X]` - Occupied seat
- `[/]` - Unavailable/blocked
- `[+]` - Premium seat (extra legroom)
- `[*]` - Currently selected

## API Usage

```typescript
import { bookFlight } from "${CLAUDE_PLUGIN_ROOT}/src/api";

const result = await bookFlight({
  flights: [
    {
      id: "ua123",
      airline: "United Airlines",
      flightNumber: "UA 123",
      origin: { code: "SFO", name: "San Francisco", city: "SF", timezone: "PST" },
      destination: { code: "DEN", name: "Denver", city: "Denver", timezone: "MST" },
      departureTime: "2026-01-08T12:55:00-08:00",
      arrivalTime: "2026-01-08T16:37:00-07:00",
      duration: 162,
      price: 34500,
      currency: "USD",
      cabinClass: "economy",
      stops: 0,
      seatmap: { ... }
    }
  ]
});

if (result.success && result.data) {
  console.log(`Booked: ${result.data.selectedFlight.flightNumber}`);
  console.log(`Seat: ${result.data.selectedSeat}`);
}
```

© dvdsgl · MIT · dvdsgl/claude-canvas

Similar skills

All skills for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open