spring-air-travel-service
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "spring-air-travel-service" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-be31c6fc3bd852f9ce1d99dcaa96f424beba036fdd2c1537059e7b297b1c5d4a. Verify the upstream source and version against https://skillhub.cn/skills/org-7jj2k6so/spring-air-travel-service before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
A dedicated smart assistant built for the full Spring Airlines ticket booking flow, covering authorization, flight search, passenger selection, ordering, payment, order lookup, and cancellation; it activates automatically when users initiate ticket searches, price comparisons, bookings, or order operations.
Introduction source: third_party · org-7jj2k6so · 1.0.7 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: spring-air-travel-service
description: 完成春秋航空网页授权、登录状态检查、国内及国际航班与舱位查询、常用乘机人查询、国内航班预订确认、用户明确确认后的国内航班真实下单、订单查询、支付表单获取和订单取消;国际航班目前仅支持查询,不支持预订。用户提出查机票、比较春秋航班、选择乘机人、订票、查订单、支付待支付订单或取消订单。春秋航空航旅服务
执行入口
只使用 Skill 内置的 scripts/spring-flight.js 执行业务:
node scripts/spring-flight.js <command> [subcommand] [options]
不要执行 npm install,不要要求系统存在全局 spring-flight 命令。运行环境只需提供 Node.js 18 或更高版本。解析脚本输出的 JSON,不复刻底层 proxyRequest 请求。
内置脚本沿用 spring-flight CLI 0.3.6 的基础实现,通过 node scripts/spring-flight.js 直接执行,不进行 CLI 安装。
认证原则
不要要求用户提供、复制或粘贴 Token,禁止使用 --webtoken 或 SPRING_WEBTOKEN。使用内置脚本完成浏览器授权,并将凭证持久化到本地配置目录。
默认认证目录:
- Windows:
%LOCALAPPDATA%\spring-flight - macOS/Linux:
${XDG_CONFIG_HOME}/spring-flight或~/.config/spring-flight - 如需隔离,可在执行前设置
SPRING_FLIGHT_CONFIG_DIR
认证流程:
- 执行
node scripts/spring-flight.js auth login。 - 将命令输出的
https://pages.ch.com/...授权地址交给用户,并让用户在本人设备浏览器中完成授权。 - 用户完成授权后执行
node scripts/spring-flight.js auth status。 - 当 JSON 返回
"authenticated": true时继续业务流程;未完成时可稍后重试状态检查。 - 需要校验当前登录用户资料时执行
node scripts/spring-flight.js auth check。 - 用户要求退出登录时执行
node scripts/spring-flight.js auth logout。
遇到认证缺失或过期时,重新执行浏览器授权流程,不接受手工 Token。授权窗口为 5 分钟,超时需重新发起。
安全边界
所有业务命令都需要授权,包括 flights search。把以下操作视为真实副作用:
booking book:创建真实机票订单,必须带--agree。orders pay:按订单号和金额创建真实支付表单,必须带--yes。orders cancel:取消真实订单,必须带--yes。- 带
--auto-select --agree的book-flow:可能自动选择并创建真实订单。
国际及港澳台航班目前只支持查询,不支持 booking confirm、booking book 或 book-flow 下单。不得通过改写参数或按国内航班流程绕过限制。
没有用户对具体航班、舱位、乘机人、联系人、价格及条款的当次明确确认,不得执行下单。没有用户对具体订单号和支付金额的当次明确确认,不得获取支付表单。没有用户对具体订单号和取消意图的当次明确确认,不得执行取消。
测试优先使用无副作用命令:auth status、auth check、flights search、passengers list、booking confirm、orders list。
标准业务流程
- 收集出发地、目的地和出发日期;日期使用
YYYY-MM-DD。 - 执行
flights search,展示航班号、起降时间、机场、舱位、票价、税费、余票和行李权益。国际及港澳台航线使用--international;查询结果为international: true、booking_supported: false时,只展示查询结果并明确说明暂不支持预订,不再进入乘机人和下单流程。 - 用户选择具体
flight_no和结果中对应的cabin_level,不要用舱位数组下标代替。 - 执行
passengers list,只展示姓名和必要的脱敏信息,让用户选择 1 名持有身份证且在起飞日已满 12 周岁的成人乘机人;目前不支持多人、儿童、婴儿或非身份证乘机人下单。 - 用刚查询到的数据执行
booking confirm,展示完整确认信息;该命令不下单。 - 再次取得用户明确同意后,执行带
--agree的booking book。 - 返回订单号和金额并询问是否支付,不展示原始个人资料;用户明确要求支付后再进入"支付接管流程"。
查询或管理订单时,先执行 orders list 定位订单。支付前必须让用户确认唯一订单号和准确金额,再按"支付接管流程"处理 orders pay 返回的 cashier_url,不直接展示底层支付表单或收银台链接。取消前必须让用户确认唯一订单号,再执行带 --yes 的 orders cancel。
订单金额确定:
orders list返回的tktPrice可能为0(票价未在订单列表中返回)。此时金额为portPay(机场建设费)+fuelPrice(燃油附加费)+tktPrice(票价)+insFee(保险费)+otherFy(其他费用)之和。若tktPrice为0且无其他费用,则总金额为税费合计。下单时的money_sum字段是更可靠的总金额来源,优先使用。
支付接管流程
仅当用户明确要求支付,并确认唯一订单号与准确待支付金额后执行。
⚠️ Shell 兼容性警告:
cashier_url包含大量 URL 编码字符(%2F、%3A、%3D、+等),在 bash 中直接传递会导致 URL 被截断和签名校验失败。必须通过 Node.js 脚本调用 alipay-bot,不要在 shell 中直接内联cashier_url。
步骤 1:定位 alipay-bot
优先从 PATH 查找:
- Windows PowerShell:
Get-Command alipay-bot -ErrorAction SilentlyContinue - macOS/Linux:
command -v alipay-bot
未找到时,仅检查当前操作系统对应的兼容路径:
- Windows:
$HOME\.openclaw-autoclaw\alipay-bot-cli\bin\alipay-bot.cmd$env:LOCALAPPDATA\openclaw\alipay-bot-cli\bin\alipay-bot.cmd
- macOS/Linux:
$HOME/.openclaw-autoclaw/alipay-bot-cli/bin/alipay-bot$HOME/.local/bin/alipay-bot
仍未找到时,先向用户说明需要安装支付宝支付工具,并请求授权在沙箱外执行安装命令。安装器会使用 trash 等文件系统操作放置二进制文件;不得自行关闭沙箱或绕过授权机制,必须通过当前 Agent 环境提供的权限申请方式发起授权。仅在用户明确授权后,按当前操作系统安装;用户拒绝或无法授权时停止安装,并引导用户通过打开微信小程序完成支付。
-
Windows:必须使用 PowerShell 执行:
npx -y @alipay/agent-payment@1.0.20 install -
macOS/Linux:在终端执行:
npx -y @alipay/agent-payment@1.0.20 install
安装完成后重新检查 PATH。安装仍失败则停止,引导用户通过春秋航空 App、官网或微信公众号完成支付。
本流程支持 Windows、macOS 和 Linux;不适用于直接在 iOS 设备上运行。正常情况下无需记录可执行文件路径,只有
alipay-bot未加入 PATH、但已在兼容路径中找到时,才将该路径传给支付辅助脚本。
步骤 2:获取支付表单
执行 orders pay --order-no <orderNo> --amount <amount> --yes,从 JSON 读取非空 cashier_url,并保存可选的 out_trade_no。每次支付都重新执行该命令,不复用旧链接。
用 URL 解析校验 cashier_url:协议必须为 https:,域名必须为 openapi.alipay.com,路径必须为 /gateway.do。不符合则停止;不要打开、改写、重新编码、截断或拼接该链接。
步骤 3:执行支付接管
禁止在 shell 命令中直接内联
cashier_url。必须使用 Node.js 脚本传递 URL,避免 shell 特殊字符截断。
使用 scripts/pay-helper.js 执行支付接管,脚本内部依次完成 trigger-payment-signal(生成 paymentLink)和 submit-payment(发起支付)两步:
trigger-payment-signal可用性说明:该子命令可能不会出现在alipay-bot --help或公开命令说明中,但实际由兼容版本的alipay-bot提供。不要仅因帮助信息未列出它就判定命令不存在、跳过第一步或改写调用流程,也不要预先单独探测该子命令;始终执行pay-helper.js,以它对真实命令的执行结果为准。只有脚本实际返回非零退出码,并明确报告未知命令或不支持该子命令时,才判定当前alipay-bot版本不兼容并停止。
node scripts/pay-helper.js "<cashier_url>" "春秋航空机票" "<amount>"
默认从 PATH 调用 alipay-bot。仅当步骤 1 从兼容路径找到程序时,才追加第四个参数:
node scripts/pay-helper.js "<cashier_url>" "春秋航空机票" "<amount>" "<alipay-bot路径>"
脚本成功时输出包含支付链接(https://u.alipay.cn/xxx)和二维码图片路径,将它们展示给用户,展示前必须将二维码图片复制到当前工作区的 outputs/ 目录,使用完整绝对路径展示给用户。脚本失败时退出码为 1,按 stderr 信息诊断问题,不自动重试。
步骤 4:确认支付结果
submit-payment明确返回成功前,不要宣称支付成功。失败、取消或状态不明时,按其结果说明当前状态,不自动重新发起支付。- 用户确认已付款后,执行
orders list --order-no <orderNo>确认支付状态:payFlag从0变为1表示支付成功tktFlag变为5表示已出票
- 不要只凭
out_trade_no、paymentLink已生成或支付页面已打开判断成功。
常用命令
node scripts/spring-flight.js help
node scripts/spring-flight.js version
node scripts/spring-flight.js auth login
node scripts/spring-flight.js auth status
node scripts/spring-flight.js auth check
node scripts/spring-flight.js auth logout
node scripts/spring-flight.js flights search --from 上海 --to 重庆 --date 2026-08-03
node scripts/spring-flight.js flights search --from 上海 --to 大阪 --date 2026-08-20 --international
node scripts/spring-flight.js passengers list
node scripts/spring-flight.js booking confirm --from-city 上海 --to-city 重庆 --date 2026-08-03 --departure-time 07:40 --arrival-time 10:30 --flight-no 9C8867 --cabin-class 超惠飞 --passenger-names 张三 --total-price 590
node scripts/spring-flight.js booking book --from SHA --to CKG --date 2026-08-03 --flight-no 9C8867 --cabin-level 5 --passenger 张三 --contact-name 张三 --contact-mobile 13800000000 --agree
node scripts/spring-flight.js orders list --query-type all
node scripts/spring-flight.js orders pay --order-no BKYMODR --amount 780 --yes
node scripts/spring-flight.js orders cancel --order-no BKYMODR --yes
执行任一业务命令、解释输出或处理错误前,读取 references/cli-contract.md。其中包含全部参数、返回字段、认证状态、错误处理和安全约束。
输出与隐私
- 先检查进程退出码,再解析 JSON;即使退出码非零,也解析
error_code、error和detail。 auth check可返回当前登录用户的完整手机号;其他业务结果不要展示jwtToken、完整 state、证件号、无关手机号、booking_raw或订单raw。- 航班结果优先展示可比较字段;不要把
price与tax混为一项,也不要自行编造总价。 - 乘机人结果只展示
name、证件类型和card_number_masked。 - 下单和取消返回中的
raw仅用于排障,不直接转述;支付命令只返回cashier_url和可选的out_trade_no。 - 不在日志、命令参数或回复中输出动态获取的
Authorizationtoken 或CH-User-Token。 - 只在受控本机排障时使用
--debug或SPRING_FLIGHT_DEBUG=1;调试输出可能包含凭证和个人数据。
失败处理
- 认证缺失、过期:重新执行
auth login,不接受手工 Token。授权窗口为 5 分钟,超时需重新发起。 - 城市无法识别:要求提供支持的中文城市名或三字机场/城市代码。
ERR_INTERNATIONAL_BOOKING_UNSUPPORTED:说明目前支持国际航班查询,但暂不支持国际航班预订;保留查询结果,不进入乘机人选择、预订确认或下单。ERR_PASSENGER_COUNT_UNSUPPORTED:明确提示目前仅支持选择 1 名乘机人,要求用户重新选择单人,不得拆成多个订单自动下单。ERR_PASSENGER_ADULT_REQUIRED:明确提示目前仅支持成人乘机人;不得把儿童、婴儿或年龄无法确认的乘机人按成人提交。ERR_PASSENGER_NOT_FOUND/ERR_PASSENGER_ID_CARD_REQUIRED:重新查询乘机人,并明确提示用户目前只支持选择身份证乘机人;不要改选护照或其他证件乘机人。- 航班、舱位或乘机人已变化:重新查询,不用旧结果强行提交。
- 下单、支付表单获取或取消未成功:明确说明未完成,不自动重试副作用命令。
- 网络、HTTP 或 JSON 错误:可以重试只读查询;真实下单结果不明确时先查订单,禁止直接重复下单。
- alipay-bot 找不到:先检查 PATH,再检查当前操作系统对应的兼容路径;都未找到时引导用户通过春秋航空 App、官网或微信公众号完成支付。
trigger-payment-signal未出现在alipay-bot帮助中:这不表示命令不可用,继续按步骤运行pay-helper.js;仅在脚本真实执行后明确返回未知命令或不支持时,才按版本不兼容处理。不得跳过该步骤,也不得把原始cashier_url直接传给submit-payment。cashier_url签名校验失败:原因是 URL 在 shell 中被特殊字符截断。必须改用 Node.jschild_process.execSync传递 URL,不要在 shell 中直接内联。submit-payment失败:确认使用的是trigger-payment-signal返回的paymentLink(alipay_xxxx格式),而非原始cashier_url。
Current listing version
1.0.7
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 高价值刚需场景:春秋航空全流程机票预订服务
- 覆盖完整业务链路:授权、查航班、选乘机人、下单、支付、查单、取消
- 明确区分国内国际航班支持范围
Areas to improve
-
触发词可进一步细化 Reported severity: Minor
description 中触发场景描述较为宽泛
Recommendation: 可补充更具体的触发关键词如'春秋航空'、'机票预订'、'航班查询'等
Highlights
- 触发场景覆盖完整:查机票、比价、订票、订单操作
- 边界清晰:明确说明国际航班仅支持查询
Areas to improve
-
缺少 When to Use 章节 Reported severity: Minor
文档结构完整但缺少明确的适用场景说明章节
Recommendation: 建议增加 When to Use 章节说明适用场景
Highlights
- Phase/步骤清晰:标准业务流程分7步详细说明
- 有出口条件:明确各步骤的退出和重试条件
- 含端到端示例:提供完整的常用命令示例
- frontmatter完整:包含name和description
Areas to improve
-
部分异常处理可更完善 Reported severity: Minor
alipay-bot相关异常处理较为复杂,部分边缘场景未完全覆盖
Recommendation: 建议补充更多alipay-bot安装和执行的异常处理细节
Highlights
- 工具来源明确:使用内置scripts/spring-flight.js
- 参数正确:提供完整的命令参数说明
- 覆盖主要异常:包含认证、网络、业务逻辑等各类异常处理
- 不可逆操作有确认机制:下单、支付、取消都需要用户明确确认
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 16, 97, 103 -
Invoke commands or scripts
Read the script and arguments first. Use ordinary privileges and a scoped directory; confirm installation or execution in your host tool.
Mentioned in main document · lines 188
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- pages.ch.com
- s.ch.com
- u.alipay.cn
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.