← 返回 Skills 市场
syf8888

flights

作者 syf8888 · GitHub ↗ · v1.1.1
cross-platform ⚠ suspicious
517
总下载
2
收藏
4
当前安装
3
版本数
在 OpenClaw 中安装
/install flights-search-plus
功能描述
Flight price search. Trigger this skill immediately when the user asks about flights, airfare, ticket prices, cheapest dates, price calendars, departure time...
使用说明 (SKILL.md)

✈️ Flight Search Skill

Query real-time flights via the 51smart API (skill.flight.51smart.com). Supports one-way, round-trip, and price calendar.

Note: This skill calls the above public API directly via HTTP POST. No local scripts or authentication required. User data (city/date) is used solely for flight search.


Workflow

  1. Parse Input → Extract origin, destination, dates, passengers, cabin class, trip type
  2. Complete Missing Info → Ask the user if any required fields are missing
  3. Call API → POST directly to https://skill.flight.51smart.com/api/search
  4. Format Output → Display results in a clear, structured format

Step 1: Parse User Input

Field Description Default Required
fromCity IATA airport code of departure city
toCity IATA airport code of destination city
fromDate Departure date (YYYY-MM-DD)
returnDate Return date (YYYY-MM-DD) Required for round-trip
adultNumber Number of adults 1
childNumber Number of children 0
cabinClass E / B / F / P E
flightType oneWay / roundTrip oneWay

Cabin Codes:

  • E = Economy
  • P = Premium Economy
  • B = Business
  • F = First

Step 2: City to IATA Code

China

City Code City Code
Beijing PEK/PKX Shanghai Hongqiao SHA
Shanghai Pudong PVG Guangzhou CAN
Shenzhen SZX Chengdu CTU
Hangzhou HGH Nanjing NKG
Wuhan WUH Xi'an XIY
Chongqing CKG Xiamen XMN
Kunming KMG Sanya SYX
Haikou HAK Qingdao TAO
Zhengzhou CGO Changsha CSX
Jinan TNA Harbin HRB
Shenyang SHE Dalian DLC
Tianjin TSN Hefei HFE
Guiyang KWE Nanning NNG
Urumqi URC Lhasa LXA

International

City Code City Code
Hong Kong HKG Taipei TPE
Macau MFM Tokyo Narita NRT
Tokyo Haneda HND Osaka KIX
Seoul ICN Busan PUS
Singapore SIN Bangkok Suvarnabhumi BKK
Bangkok Don Mueang DMK Kuala Lumpur KUL
Jakarta CGK Manila MNL
Sydney SYD Melbourne MEL
Dubai DXB Abu Dhabi AUH
London Heathrow LHR London Gatwick LGW
Paris CDG Frankfurt FRA
Amsterdam AMS Rome FCO
New York JFK JFK New York Newark EWR
Los Angeles LAX San Francisco SFO
Las Vegas LAS Chicago ORD
Vancouver YVR Toronto YYZ

For cities not listed above, infer the IATA code based on common conventions, or ask the user to confirm the full airport name.


Step 3: Call API

Send an HTTP POST request directly — no local scripts required.

Endpoint: POST https://skill.flight.51smart.com/api/search Content-Type: application/json Auth: Not required

One-way Request Example

{
  "adultNumber": 1,
  "cabinClass": "E",
  "childNumber": 0,
  "cid": "123456",
  "flightType": "oneWay",
  "flights": [
    {
      "fromCity": "PEK",
      "fromDate": "2026-03-15",
      "toCity": "SHA"
    }
  ]
}

Round-trip Request Example

{
  "adultNumber": 2,
  "cabinClass": "B",
  "childNumber": 1,
  "cid": "123456",
  "flightType": "roundTrip",
  "flights": [
    { "fromCity": "PEK", "fromDate": "2026-03-15", "toCity": "NRT" },
    { "fromCity": "NRT", "fromDate": "2026-03-22", "toCity": "PEK" }
  ]
}

Price Calendar

The price calendar is achieved by sending multiple one-way requests for consecutive dates and aggregating results.


Step 4: Format Output

One-way / Round-trip Results

✈️ Beijing (PEK) → Shanghai (SHA)
📅 Mar 15, 2026  |  Economy  |  Adult × 1

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 #  Flight      Depart→Arrive       Duration  Stops   Price (USD)  Baggage
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 1  UA1597      22:38→00:06(+1)     1h28m     Nonstop $81.86       1PC/23KG
 2  CA1234      09:00→11:20         2h20m     Nonstop $95.00       1PC/23KG
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2 flights found
Lowest: $81.86 (before tax), incl. tax: $116.80

Price Calendar Results

📅 Price Calendar
✈️ Shanghai (SHA) → Los Angeles (LAX)  |  Economy

Date            Lowest          Flights
─────────────────────────────────────
2026-04-01      $520.00 ⭐       8
2026-04-02      $490.00 🏆 Best  6
2026-04-03      $535.00          7
2026-04-04      $510.00          5
2026-04-05      $580.00          6
─────────────────────────────────────
Recommended date: 2026-04-02 ($490.00)

Field Interpretation Rules

  • Total price incl. tax = price + tax (adult fare)
  • Multiple passengers = adult total × adultNumber + child total × childNumber
  • Stops = number of segments - 1; show stopover city when stopQuantity > 0
  • Baggage = baggages[].pieces + baggages[].weight; note "baggage not included" when freeBaggage: false
  • Limited seats = show ⚠️ "Only X seats left" when maxSeatsRemain ≤ 3

Key Response Fields

Field Description
status 0 = success
message "SUCCESS" indicates normal response
routings[] List of flight options
routings[].prices[] Prices by passenger type (ADT = Adult, CHD = Child)
routings[].segments[] Segment details (each stopover is a separate segment)
routings[].rule.baggages[] Free baggage allowance
routings[].rule.freeBaggage false = baggage must be purchased separately
routings[].maxSeatsRemain Remaining seats
passengerType ADT = Adult, CHD = Child

Error Handling

Scenario Action
status != 0 or message != "SUCCESS" Inform the user the query failed; suggest trying a different date
routings is an empty list Notify that no flights are available for this route/date
Network timeout Retry once; if it fails again, ask the user to try later
Unrecognized city code Ask the user to confirm the full city or airport name
childNumber > adultNumber Prompt: "Number of children cannot exceed the number of adults"
安全使用建议
This skill appears to do what it says (flight searches) but will send users' trip details (dates, origins/destinations, passenger counts) to https://skill.flight.51smart.com. Before installing or enabling it, verify the operator/service (51smart) and their privacy policy/data retention practices. Consider asking users for explicit consent before sending personally identifiable travel info, test with non-sensitive queries, and avoid using the skill for queries containing real passenger names, payment info, or other sensitive data. If you need stronger guarantees, prefer skills that use well-known, audited APIs or that document authentication and data-handling practices.
功能分析
Type: OpenClaw Skill Name: flights-search-plus Version: 1.1.1 The skill bundle is benign. The `SKILL.md` instructions clearly define a flight search function that interacts with a single, specified external API (`https://skill.flight.51smart.com/api/search`) via HTTP POST. It explicitly states 'No local scripts or authentication required' and that user data is used 'solely for flight search', indicating a lack of intent for local execution, credential theft, or data exfiltration. There are no instructions for prompt injection, persistence, or any other malicious activities.
能力评估
Purpose & Capability
Name, description, and instructions align: the skill parses flight queries, converts cities to IATA codes, aggregates price-calendar queries, and POSTs to a flight-search API. There are no unrelated binaries, installs, or credentials requested.
Instruction Scope
SKILL.md explicitly instructs the agent to POST user-provided origin/destination/dates/passenger info to https://skill.flight.51smart.com/api/search. It does not read local files or extra env vars, but it does transmit user PII (travel dates, passenger counts, city choices) to a third-party endpoint without authentication or stated data-retention/privacy terms — a privacy and trust risk worth noting.
Install Mechanism
Instruction-only skill with no install steps and no code files; nothing is written to disk or installed locally.
Credentials
Requires no environment variables, credentials, or config paths — the requested privileges are minimal and proportionate to the stated functionality.
Persistence & Privilege
always is false and the skill is user-invocable; it does not request permanent inclusion or elevated agent-wide privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install flights-search-plus
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /flights-search-plus 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.1
- Fully rewrote documentation in English for wider accessibility. - Kept the workflow, field definitions, API usage, and output formatting consistent. - Clarified field names, cabin codes, error handling, and key response details. - Retained bilingual city–IATA tables for China and major international destinations. - No changes to code or function—documentation update only.
v1.1.0
**Summary:** Skill now uses direct HTTP API calls, with broader city support and improved workflow clarity. - Skill name changed to "flight-price-plus" and English description improved for clarity. - Now calls the public flight API directly via HTTP POST—no local script execution required. - City-to-airport code tables expanded, covering more domestic and international airports. - Price calendar is now described as aggregating multiple single-day queries, not a standalone mode. - Workflow and example requests updated for direct API integration, including clearer request/response structuring. - General formatting, error handling, and output explanation clarified for both Chinese and English audiences.
v1.0.0
- Initial release of the flight-price skill for bilingual (Chinese/English) flight price search. - Added support for one-way, round-trip, and price calendar queries via Python script. - Automatically parses and converts city names to IATA airport codes, supporting both Chinese and international cities. - Outputs results in both Chinese and English, clearly displaying flight details and pricing.
元数据
Slug flights-search-plus
版本 1.1.1
许可证
累计安装 4
当前安装数 4
历史版本数 3
常见问题

flights 是什么?

Flight price search. Trigger this skill immediately when the user asks about flights, airfare, ticket prices, cheapest dates, price calendars, departure time... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 517 次。

如何安装 flights?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install flights-search-plus」即可一键安装,无需额外配置。

flights 是免费的吗?

是的,flights 完全免费(开源免费),可自由下载、安装和使用。

flights 支持哪些平台?

flights 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 flights?

由 syf8888(@syf8888)开发并维护,当前版本 v1.1.1。

💬 留言讨论