← 返回 Skills 市场
xiaosai

Ctg Travel Booking

作者 xiaosai · GitHub ↗ · v0.2.5 · MIT-0
cross-platform ⚠ suspicious
377
总下载
0
收藏
0
当前安装
9
版本数
在 OpenClaw 中安装
/install ctg-travel-booking
功能描述
【已过期】中旅旅行开放平台一站式预订助手。请前往 https://clawhub.ai/ctg-travel/ctg-travel 下载最新版本。整合机票、酒店、火车票、门票四大资源,支持查询、预订、退款全流程。下载中旅旅行APP获取 API Key。当用户表达出行住宿需求时(如"买火车票""订酒店""查询航班"...
使用说明 (SKILL.md)

旅游项目 Skill

⚠️ 重要提示

此 Skill 已过期,不再维护。

请前往官方地址下载最新版本:https://clawhub.ai/ctg-travel/ctg-travel


接入须知

  • 配置要求:下载中旅旅行APP,获取 API Key,配置到 config/ctgConfig.jsonapiKey 字段
  • 运行环境:Python 环境,支持 HTTP 调用能力
  • 接入指南Skill 接入指南

一、需求识别与分流(按需加载指南)

重要:先根据用户输入识别是「预定/查询某类具体资源」还是「模糊旅游推荐」,再决定是否加载操作指南。仅当识别到用户要预定、查询某个具体资源时,才加载该资源对应的 guide 操作指南,无需预先加载全部指南。

1. 触发条件(用于识别资源线)

根据下列关键词/意图匹配用户输入,命中哪一类则加载对应 guide:

资源线 触发示例(命中则加载对应 guide) 操作指南 接口文档
火车 买火车票、订火车票、买高铁票、动车票、预定武汉-北京火车票、查询火车票/高铁票、去上海有什么车次、坐 G101 去北京 guide/train.md api/train.json
火车票退订 火车票退票、我要退票、申请退款、确认退票 guide/train-refund.md api/train-refund.json
机票 买机票、订机票、买飞机票、预定北京-上海机票、查询航班/机票、明天飞杭州有什么航班、坐飞机去广州、机票订单 guide/plane.md api/plane.json
机票退订 退机票、机票退票、机票退款、申请退款、把刚刚预定的机票退了、取消这张机票(已支付)、张三退票、张三和李四退票 guide/plane-refund.md api/plane-refund.json
酒店 预订酒店、订酒店、订房、酒店订单、我的酒店订单、取消订单(未支付) guide/hotel.md api/hotel.json
酒店退订 退订酒店、酒店退款、申请退款、我要退订 guide/hotel-refund.md api/hotel-refund.json
门票 购买门票、订门票、景区门票、查询门票、门票订单 guide/ticket.md api/ticket.json
门票退订 退门票、门票退票、门票退款、申请退款、把刚刚预定的门票退了、取消这张门票(已支付) guide/ticket-refund.md api/ticket-refund.json

按需加载:若用户说「我要买火车票」→ 仅加载 guide/train.mdapi/train.json,按该指南执行。若用户说「查一下明天北京到上海的航班」→ 仅加载 guide/plane.mdapi/plane.json。未涉及到的资源线不加载其 guide。

2. 模糊旅游推荐(不加载具体资源 guide)

用户表达模糊旅游意愿时(如「我想去XX地方旅游」「推荐一下去哪玩」):

  1. 先进行旅游地合理推荐
  2. 再引导用户明确资源订购意愿(火车/机票/酒店/门票)
  3. 用户明确后,按上表触发条件加载对应 guide,进入该资源线流程

3. 多资源订购

用户同时订购多种资源(如「同时买火车票和酒店」):

  • 逐个引导、依次下单:先按触发条件加载第一个资源的 guide 并完成流程,再加载下一个资源的 guide
  • 避免多资源操作冲突

二、整体交互流程

用户输入 → 匹配触发条件 → 按需加载 guide + api → 收集必填参数 → 话术反馈
- 未命中触发条件 → 判断是否模糊旅游推荐 → 引导明确资源
- 禁止出现技术用语(接口名、API、method 等)

三、接口调用规范

统一接口

  • URLcallUrl(config 中配置)
  • 方法:POST
  • 请求体字段
    • method:从 api/*.json 获取(category、subCategory、action)
    • params:业务参数,对应接口文档中的 parameters
    • auth:脚本自动生成(key、timestamp、nonce、signature)

调用方式

  • 执行:scripts/apiexe.py call --method \x3Cmethod> --arg '\x3Cparams_json>'

异常处理

  • 请求超时:向用户说「当前系统响应较慢,请稍后再试。」
  • 后台报错:将错误转化为通俗话术(如「暂时无法获取结果,请稍后再试」),引导用户重试,切勿直接说「接口错误」「API 报错」等
  • 流程卡住时的统一引导:当多次重试仍失败或流程无法继续时,提示用户:「抱歉,当前服务暂时繁忙。您可以前往「中旅旅行」App 完成操作,体验更流畅。」

四、入参引导与结果反馈

面向用户的文案(重要)

所有对用户说出的内容均为业务话术,禁止出现:

  • 「调用 xxx 接口」「请求 xxx API」「调用 cityList / getPassengerList」等
  • 任何 method 名、接口名、技术报错原文

应使用用户能理解的说法,例如:

  • 「正在为您查询航班」「正在为您占位,请稍候」「系统暂时繁忙,请稍后再试」

入参引导(不写死必填项)

  • 以 api/*.json 为准:需要发起请求时,查阅对应 method 的 parameters.requiredproperties
  • 缺则提示:若用户未给出某必填字段,则用自然语言提示用户填写(如「从哪个城市出发?」)
  • 逐步收集:每次只问一项缺项,待用户回复后再继续
  • 完整后再请求:所有必填字段收集完整后再发起请求

结果反馈

成功示例:「您的火车票订单已创建成功,请注意查收通知。」

错误示例:「抱歉,预定人数输入有误,请输入正确的正整数人数后重新尝试。」

  • 不要直接返回后台原始响应或技术字段
  • 始终用通俗、日常的语言与用户沟通
安全使用建议
This skill appears to implement the stated travel booking functionality (APIs, signing, request flow), but exercise caution: 1) The SKILL.md and guides contain multiple malformed example commands/JSON and inconsistent method names — follow the api/*.json definitions and test calls in a safe environment before using with real data. 2) The package itself is marked as 'expired' and instructs you to download a newer version; prefer the maintained release from the vendor link. 3) The skill requires you to put your API key into config/ctgConfig.json; that key will be sent to whatever callUrl is configured — confirm callUrl is the official pro-api.ourtour.com (or vendor endpoint) before providing secrets, and consider using a limited-scope/rotatable key. 4) The scripts may delete argument files when run with flags (--rm-arg-file); avoid running unverified commands that read arbitrary files. If you decide to use it, validate the callUrl, fix malformed example payloads, and test in a controlled environment with non-production credentials and dummy personal data.
功能分析
Type: OpenClaw Skill Name: ctg-travel-booking Version: 0.2.5 The ctg-travel-booking skill is a legitimate travel reservation assistant designed to interface with the CTG Travel platform. The bundle includes a Python execution script (scripts/apiexe.py) that handles API authentication via HMAC-SHA256 signatures and communicates with a verified endpoint (pro-api.ourtour.com). While the skill processes sensitive user data such as identity numbers and contact information, this is necessary for its stated purpose of booking flights, hotels, and trains. The instructions in SKILL.md and the various guide files are well-structured, focusing on parameter collection and user guidance without any signs of malicious intent or prompt injection.
能力评估
Purpose & Capability
Name/description, API JSON files (train/plane/hotel/ticket) and the invocation scripts (apiexe.py, json_arg_escape.py) are coherent with a travel booking assistant that calls a platform API. The included config/ctgConfig.json and methods align with booking, query and refund flows.
Instruction Scope
SKILL.md and guide files instruct the agent to call local scripts that read config/ctgConfig.json and POST to the configured callUrl — appropriate for this skill — but many examples contain malformed JSON and typos (broken quoting in several example --arg payloads, inconsistent method names in help text). The SKILL.md also labels the skill as '已过期' (expired) and directs users to download a newer version, which is an operational concern. The malformed examples and inconsistent guidance could cause runtime failures or accidental misuse.
Install Mechanism
No external install/download step is present; this is instruction+script packaged in the skill. No download-from-URL or extraction behavior was found in the manifest. Scripts are plain Python and run locally.
Credentials
No environment variables are requested, but the skill requires an API key stored in config/ctgConfig.json (apiKey) and sends it in the auth block to the configured callUrl. Requesting the platform API key and passenger identity/phone details is proportionate for booking, but storing an API key in a file on disk and sending it to whatever callUrl is configured is sensitive — verify the endpoint before use and prefer short-lived/limited-scope keys.
Persistence & Privilege
always:false and no code attempts to change other skills or system-wide agent settings. The script does create a local cache directory and may delete arg files when invoked with explicit --rm flags; this is limited in scope and typical for a local helper script.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ctg-travel-booking
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ctg-travel-booking 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.2.5
- 标明 Skill 已过期,不再维护,添加显著过期提示。 - 更新简介和文档,引导用户前往 https://clawhub.ai/ctg-travel/ctg-travel 下载最新版本。
v0.2.4
ctg-travel-booking 0.2.4 is a version update with no detected file changes. - Version bumped to 0.2.4. - No changes to content, features, or documentation.
v0.2.3
ctg-travel-booking v0.2.3 - Version updated to 0.2.3; - trains update
v0.2.2
- 更新版本号为 0.2.2。 - 移除项目根目录下的 README.md 文件。 - 其他功能未做变更。
v0.2.1
No file changes detected in this release. - Version updated to 0.2.1 with no code or documentation changes. - reduce print
v0.2.0
Major optimization release ~70% token reduction Cleaner APIs, lighter payloads, optimized workflows Now supports: Backend versioning Configurable per-user rate limits
v0.1.2
- 更新了酒店接口文档(api/hotel.json)和酒店操作指南(guide/hotel.md),优化酒店预订相关内容。 - 移除了主项目自述文件(README.md)。 - 其他资源线和主流程未改动,整体交互逻辑保持一致。
v0.1.1
ctg-travel-booking 0.1.1 - SKILL.md 增加了 API Key 获取与 Skill 接入指南说明,明确需下载中旅旅行APP获取并配置 API Key。 - 新增“接入须知”部分,强调运行环境和接入指南链接。 - 其他内容与上一版本一致,未对功能流程和接口调用方式作更改。
v0.1.0
ctg-travel-booking 1.0.0 introduces a comprehensive, user-friendly travel booking assistant with on-demand resource handling. - 支持按需加载火车票、机票、酒店、门票预订/查询/退款全流程,避免无关功能干扰 - 智能识别用户需求,自动引导至相应资源线并逐步收集必填信息 - 采用通俗业务话术与用户交互,杜绝技术细节和接口信息泄漏 - 支持缓存常用数据以提升响应速度(如城市列表) - 优化多资源同时预订流程,依次引导下单确保流畅体验 - 完善异常/报错处理,保障良好用户体验
元数据
Slug ctg-travel-booking
版本 0.2.5
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 9
常见问题

Ctg Travel Booking 是什么?

【已过期】中旅旅行开放平台一站式预订助手。请前往 https://clawhub.ai/ctg-travel/ctg-travel 下载最新版本。整合机票、酒店、火车票、门票四大资源,支持查询、预订、退款全流程。下载中旅旅行APP获取 API Key。当用户表达出行住宿需求时(如"买火车票""订酒店""查询航班"... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 377 次。

如何安装 Ctg Travel Booking?

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

Ctg Travel Booking 是免费的吗?

是的,Ctg Travel Booking 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Ctg Travel Booking 支持哪些平台?

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

谁开发了 Ctg Travel Booking?

由 xiaosai(@xiaosai)开发并维护,当前版本 v0.2.5。

💬 留言讨论