google-flights

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Google Flights Skill

Google Flights Skill

Overview

概述

Enables Claude to search and compare flights, track price changes, explore destination options, and leverage Google's powerful flight search tools for optimal travel planning.
让Claude能够搜索和对比航班、追踪价格变化、探索目的地选项,并借助Google强大的航班搜索工具实现最优旅行规划。

Quick Install

快速安装

bash
curl -sSL https://canifi.com/skills/google-flights/install.sh | bash
Or manually:
bash
cp -r skills/google-flights ~/.canifi/skills/
bash
curl -sSL https://canifi.com/skills/google-flights/install.sh | bash
或手动安装:
bash
cp -r skills/google-flights ~/.canifi/skills/

Setup

配置

Configure via canifi-env:
bash
undefined
通过canifi-env进行配置:
bash
undefined

First, ensure canifi-env is installed:

首先,确保已安装canifi-env:

canifi-env set GOOGLE_EMAIL "your-email@example.com"
undefined
canifi-env set GOOGLE_EMAIL "your-email@example.com"
undefined

Privacy & Authentication

隐私与认证

Your credentials, your choice. Canifi LifeOS respects your privacy.
您的凭据,您做主。Canifi LifeOS尊重您的隐私。

Option 1: Manual Browser Login (Recommended)

选项1:手动浏览器登录(推荐)

If you prefer not to share credentials with Claude Code:
  1. Complete the Browser Automation Setup using CDP mode
  2. Login to the service manually in the Playwright-controlled Chrome window
  3. Claude will use your authenticated session without ever seeing your password
如果您不想与Claude Code共享凭据:
  1. 使用CDP模式完成浏览器自动化设置
  2. 在Playwright控制的Chrome窗口中手动登录该服务
  3. Claude将使用您的已认证会话,且绝不会看到您的密码

Option 2: Environment Variables

选项2:环境变量

If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果您愿意共享凭据,可以将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
注意:存储在canifi-env中的凭据仅可在您的本地机器上访问,绝不会被传输。

Capabilities

功能

  • Search flights with flexible date options
  • Track prices and receive drop notifications
  • Explore destinations by budget and interests
  • View price graphs and best times to fly
  • Filter by airline alliances, stops, and times
  • Check carbon emissions for flight comparison
  • 搜索带有灵活日期选项的航班
  • 追踪价格并接收降价通知
  • 根据预算和兴趣探索目的地
  • 查看价格图表和最佳出行时间
  • 按航空联盟、经停次数和时间筛选
  • 查看航班碳排放数据以进行对比

Usage Examples

使用示例

Example 1: Search Flights with Date Flexibility

示例1:搜索带有日期灵活性的航班

User: "Find flights from NYC to Tokyo, cheapest time in April"
Claude: I'll search Google Flights for the best April dates.
- Opens Google Flights via Playwright MCP
- Enters JFK/EWR/LGA to NRT/HND
- Selects April date grid view
- Shows price calendar:
  - Cheapest: Apr 8-22, $687 on ANA
  - Average price: $890
  - Peak: Apr 1-7 (cherry blossom), $1,200+
- Recommends: Book Apr 8 departure, returns still cheap
用户:"查找4月份从纽约到东京的最便宜航班"
Claude:我将在Google Flights上搜索4月份的最佳日期。
- 通过Playwright MCP打开Google Flights
- 输入出发地JFK/EWR/LGA,目的地NRT/HND
- 选择4月份的日期网格视图
- 展示价格日历:
  - 最低价:4月8日-22日,ANA航空,687美元
  - 平均价格:890美元
  - 高峰期:4月1日-7日(樱花季),1200美元以上
- 推荐:预订4月8日出发的航班,返程价格仍较低

Example 2: Track Flight Price

示例2:追踪航班价格

User: "Track prices for SFO to Barcelona in June"
Claude: I'll set up price tracking for that route.
- Opens Google Flights
- Searches SFO to BCN, June dates
- Enables price tracking toggle
- Confirms: Tracking enabled
- Current price: $845 roundtrip
- Typical price range: $750-$1,100
- Notifications will go to your Google account
用户:"追踪6月份从旧金山到巴塞罗那的航班价格"
Claude:我将为该航线设置价格追踪。
- 打开Google Flights
- 搜索旧金山到巴塞罗那6月份的航班
- 启用价格追踪开关
- 确认:已启用追踪
- 当前价格:往返845美元
- 典型价格区间:750-1100美元
- 通知将发送至您的Google账户

Example 3: Explore by Budget

示例3:按预算探索目的地

User: "Where can I fly from Denver for a weekend trip under $400?"
Claude: I'll explore weekend destinations from Denver.
- Uses Google Flights Explore
- Sets origin: Denver
- Filters: Weekend trips, under $400
- Maps shows options:
  - Las Vegas: $98 roundtrip
  - Phoenix: $147 roundtrip
  - San Diego: $198 roundtrip
  - Nashville: $287 roundtrip
- Can filter by interests: beaches, cities, outdoors
用户:"从丹佛出发,周末旅行预算400美元以内,我能去哪里?"
Claude:我将探索丹佛出发的周末目的地。
- 使用Google Flights探索功能
- 设置出发地:丹佛
- 筛选条件:周末旅行,预算400美元以内
- 地图展示选项:
  - 拉斯维加斯:往返98美元
  - 凤凰城:往返147美元
  - 圣地亚哥:往返198美元
  - 纳什维尔:往返287美元
- 可按兴趣筛选:海滩、城市、户外

Authentication Flow

认证流程

  1. Navigate to google.com/flights via Playwright MCP
  2. Sign in with Google account (uses shared Google auth)
  3. Credentials: ember@emberbru.com from canifi-env
  4. Handle 2FA via authenticator or iMessage
  5. Price tracking syncs to Google account
  6. Session maintained across Google services
  1. 通过Playwright MCP导航至google.com/flights
  2. 使用Google账户登录(共享Google认证)
  3. 凭据:来自canifi-env的ember@emberbru.com
  4. 通过验证器或iMessage处理双因素认证(2FA)
  5. 价格追踪同步至Google账户
  6. 在Google服务间维持会话

Error Handling

错误处理

  • Login Failed: Retry Google OAuth, check 2FA
  • Search Failed: Simplify query, reduce filters
  • No Results: Expand airports, check date range
  • Session Expired: Re-authenticate via Google
  • Rate Limited: Wait 60 seconds, retry
  • 2FA Required: Handle via iMessage or authenticator
  • 登录失败:重试Google OAuth,检查2FA
  • 搜索失败:简化查询,减少筛选条件
  • 无结果:扩大机场范围,检查日期区间
  • 会话过期:通过Google重新认证
  • 速率限制:等待60秒后重试
  • 需要2FA:通过iMessage或验证器处理

Self-Improvement Instructions

自我改进说明

After each interaction:
  • Log price tracking accuracy
  • Note seasonal patterns discovered
  • Track alliance and route coverage
  • Document feature updates
Suggest updates when:
  • Google Flights adds new features
  • Explore function expands
  • Price tracking changes
  • UI elements update
每次交互后:
  • 记录价格追踪的准确性
  • 记录发现的季节性规律
  • 追踪航空联盟和航线覆盖范围
  • 记录功能更新
在以下情况时建议更新:
  • Google Flights新增功能
  • 探索功能扩展
  • 价格追踪机制变更
  • UI元素更新

Notes

注意事项

  • Google Flights shows carbon emissions per flight
  • Tracked prices send notifications via Google
  • Some budget airlines may not appear (Spirit, Frontier limited)
  • Price insights show if current price is low/high/typical
  • Baggage fees shown separately for accurate comparison
  • Multi-city trips supported for complex itineraries
  • Google Flights会显示每个航班的碳排放数据
  • 追踪的价格将通过Google发送通知
  • 部分廉航可能不会显示(Spirit、Frontier有限支持)
  • 价格洞察会显示当前价格属于低价/高价/典型价格
  • 行李费单独显示以实现准确对比
  • 支持多城市行程以满足复杂旅行计划