Query flight information, train tickets, and travel data using Variflight (飞常准) HTTP API. Use when the user needs to (1) search flights by route or flight number, (2) check flight status and punctuality, (3) find train tickets, (4) get airport weather forecasts, (5) check flight prices, (6) plan multi-modal trips (flight+train), or (7) get flight comfort metrics (happiness index).
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install variflight或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install variflight⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/variflight/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: variflight description: Query flight information, train tickets, and travel data using Variflight (飞常准) HTTP API. Use when the user needs to (1) search flights by route or flight number, (2) check flight status and punctuality, (3) find train tickets, (4) get airport weather forecasts, (5) check flight prices, (6) plan multi-modal trips (flight+train), or (7) get flight comfort metrics (happiness index). ---
Official Variflight Agent Skills enabling AI assistants to retrieve flight and railway data via zero-dependency tools.
https://ai.variflight.com/api/v1/mcp/dataX-VARIFLIGHT-KEY: your_api_keyapplication/json支持多种配置方式(按优先级排序):
export VARIFLIGHT_API_KEY="sk-xxxxxxxxxxxxxxxx"
按以下顺序查找(找到即停止):
./.variflight.json(项目级配置)~/.variflight.json(用户级配置)~/.config/variflight/config.json(XDG 标准)配置格式:
{
"api_key": "sk-xxxxxxxxxxxxxxxx"
}
./flights.sh --api-key sk-xxxx PEK SHA 2025-02-15
# Clone or copy the skill
git clone https://github.com/variflight-ai/variflight-skill.git
# Or copy to your project
cp -r variflight-skill/scripts ./scripts
Visit https://ai.variflight.com
方式一:环境变量
export VARIFLIGHT_API_KEY="sk-xxxxxxxxxxxxxxxx"
方式二:配置文件
echo '{"api_key": "sk-xxxxxxxxxxxxxxxx"}' > ~/.variflight.json
# Search flights
./scripts/flights.sh PEK SHA 2025-02-15
# Search by flight number
./scripts/flight.sh MU2157 2025-02-15
# Search train tickets
./scripts/train.sh "上海" "合肥" 2025-02-15
# Airport weather
./scripts/weather.sh PEK
# With explicit API key
./scripts/flights.sh --api-key sk-xxxx PEK SHA 2025-02-15
| Endpoint | Description | Parameters | |----------|-------------|------------| | flights | Search by departure/arrival | dep, arr, date, depcity, arrcity | | flight | Search by flight number | fnum, date, dep, arr | | transfer | Flight transfer info | depcity, arrcity, depdate | | happiness | Flight comfort index | fnum, date, dep, arr | | realtimeLocation | Aircraft location | anum | | futureAirportWeather | Airport weather | code, type="1" | | searchFlightItineraries | Flight itineraries | depCityCode, arrCityCode, depDate | | trainStanTicket | Train tickets | cdep, carr, date | | searchTrainStations | Train stations | query | | getFlightPriceByCities | Flight prices | dep_city, arr_city, dep_date |
| City | Airport | Code | |------|---------|------| | 北京 | 首都机场 | PEK | | 北京 | 大兴机场 | PKX | | 上海 | 虹桥机场 | SHA | | 上海 | 浦东机场 | PVG | | 广州 | 白云机场 | CAN | | 深圳 | 宝安机场 | SZX | | 成都 | 双流机场 | CTU | | 杭州 | 萧山机场 | HGH | | 合肥 | 新桥机场 | HFE | | 西安 | 咸阳机场 | XIY |
{
"code": 200,
"message": "Success",
"data": { ... }
}
401 - Invalid API key400 - Bad request500 - Server errorOpenClaw 会自动识别并加载本 skill。
安装:
# 通过 ClawHub 安装
openclaw skill install variflight
# 或手动安装
cp -r variflight-skill ~/.openclaw/workspace/skills/variflight
配置:
# OpenClaw 专用环境文件
echo 'VARIFLIGHT_API_KEY=sk-xxxx' > ~/.openclaw/workspace/.env.variflight
# 或使用通用配置
echo '{"api_key": "sk-xxxx"}' > ~/.variflight.json
使用:
./skills/variflight/scripts/flights.sh PEK SHA 2025-02-15
./skills/variflight/scripts/train.sh "上海" "合肥" 2025-02-15
Add to your settings:
{
"variflight_api_key": "sk-xxxxxxxxxxxxxxxx"
}
Or set environment variable in your shell config:
export VARIFLIGHT_API_KEY="sk-xxxxxxxxxxxxxxxx"
- name: Setup Variflight
env:
VARIFLIGHT_API_KEY: ${{ secrets.VARIFLIGHT_API_KEY }}
run: |
./scripts/flights.sh PEK SHA 2025-02-15
ENV VARIFLIGHT_API_KEY=sk-xxxxxxxxxxxxxxxx
COPY scripts/ /app/scripts/
安装 Variflight 后,可以对 AI 说这些话来触发它
Help me get started with Variflight
Explains what Variflight does, walks through the setup, and runs a quick demo based on your current project
Use Variflight to query flight information, train tickets, and travel data using Vari...
Invokes Variflight with the right parameters and returns the result directly in the conversation
What can I do with Variflight in my data & analytics workflow?
Lists the top use cases for Variflight, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/variflight/ 目录(个人级,所有项目可用),或 .claude/skills/variflight/(项目级)。重启 AI 客户端后,用 /variflight 主动调用,或让 AI 根据上下文自动发现并使用。
Variflight 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Variflight 可免费安装使用。请查阅仓库了解许可证信息。
Query flight information, train tickets, and travel data using Variflight (飞常准) HTTP API. Use when the user needs to (1) search flights by route or flight number, (2) check flight status and punctuality, (3) find train tickets, (4) get airport weather forecasts, (5) check flight prices, (6) plan multi-modal trips (flight+train), or (7) get flight comfort metrics (happiness index).
Variflight 属于「Data & Analytics」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my data & analytics tasks using Variflight
Identifies repetitive steps in your workflow and sets up Variflight to handle them automatically