Tuniu Flight Assistant for Openclaw

A comprehensive AI skill for managing domestic flight searches and bookings through the Tuniu Open Platform via standard shell commands.

leonardoooooo
v1.0.0
Mar 4, 2026
3
2.8k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install tuniu-flight

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install tuniu-flight using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Tuniu Flight Assistant?

Tuniu Flight Assistant is a specialized tool designed for AI agents to interact with the Tuniu flight ecosystem. It utilizes shell execution and curl to communicate with MCP endpoints via the JSON-RPC 2.0 protocol. By adding this capability to your Openclaw Skills library, you empower your agent to handle complex travel logistics including multi-page flight searches, detailed cabin price comparisons, and secure booking submissions.

The skill acts as a bridge between high-level user intent and the Tuniu Open Platform, providing structured data for flight numbers, departure times, tax-inclusive pricing, and seat availability. It is built to handle the full lifecycle of a flight transaction, from initial discovery to the generation of final payment links, ensuring a seamless experience for developers and end-users alike.

Tuniu Flight Assistant Use Cases

  • Searching for domestic flights based on departure/arrival cities and specific dates.
  • Comparing detailed cabin information, baggage allowances, and refund policies for specific flight numbers.
  • Automating the creation of flight orders by collecting passenger PII and submitting it to Tuniu.
  • Handling flight result pagination for users requesting more options or subsequent pages.

How Tuniu Flight Assistant Works

  1. The AI agent identifies a flight-related query and triggers the skill using the searchLowestPriceFlight method.
  2. The skill executes a curl command to the Tuniu MCP endpoint, passing the TUNIU_API_KEY in the headers.
  3. The search results are returned as a JSON string, which the agent parses to display flight options to the user.
  4. Upon flight selection, the agent calls multiCabinDetails to fetch specific booking identifiers like sourceId and vendorId.
  5. The agent optionally calls getBookingRequiredInfo to ensure all necessary passenger data fields are collected.
  6. Finally, the agent invokes saveOrder with passenger details to generate an order ID and a secure payment URL.

Tuniu Flight Assistant Setup

To use this skill, you must provide a valid API key from the Tuniu Open Platform. Ensure curl is installed in your agent's execution environment.

# Set the required environment variable
export TUNIU_API_KEY="your_tuniu_open_platform_api_key"

# Optional: Override the default MCP URL if using a custom proxy
export FLIGHT_MCP_URL="https://openapi.tuniu.cn/mcp/flight"

Tuniu Flight Assistant Data Schema & Taxonomy

The skill organizes data using standard JSON-RPC structures. Below are the key data entities handled within this Openclaw Skills integration:

Entity Key Fields Description
FlightSearch flightNumber, departureTime, priceWithTax Primary flight details for listing results.
CabinDetails sourceId, vendorId, cabinCodes Technical identifiers required for the booking payload.
Passenger psptId, psptType, birthday, tel PII data required for domestic flight regulations.
OrderResponse orderId, payUrl, payAmount Transactional data returned upon successful booking.

Tuniu Flight Assistant Advanced Features

  • Pagination Support: Use the pageNum argument to navigate through large datasets when users ask for more options.
  • Rule Extraction: Access comprehensive refund, change, and luggage rules directly from the cabin details response.
  • Secure PII Handling: Direct transmission of passenger data to the Tuniu endpoint without persistent storage in agent logs.
  • Multi-passenger Booking: Support for arrays of passenger objects within a single order creation request.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins curl
Github Stars: 0
forks: 0