This automates flight searches on Ctrip (携程) using browser automation. It handles both domestic and international routes, supports roundtrip queries, and works with Chinese city names or airport codes. The implementation uses keyboard shortcuts (Enter key) instead of clicking search buttons to avoid overlay issues, which proved more reliable across different city pairs during testing. Already verified on routes like Guangzhou to Chengdu and Shanghai to Tokyo. Fair warning: you'll need to handle any CAPTCHAs manually, and the skill assumes stable page load times. If you're scraping flight data from Ctrip or building travel tools for Chinese markets, this handles the tedious form-filling part.
npx -y skills add stvlynn/dingtalk-wukong-skills --skill ctrip-flight-search --agent claude-codeInstalls into .claude/skills of the current project.
本技能提供完整的携程航班查询自动化能力,基于实际验证的浏览器操作流程,支持以下功能:
当用户需要:
navigate → https://www.ctrip.combackbone → 定位机票按钮 → clicktype → 城市名称 → search → 选择具体机场 → clicksearch → 目标城市 → clickpress → Enter(优先方案)或点击搜索按钮type在输入框中输入城市名称(如"北京"、"上海"、"广州"、"成都"等)search查找具体的机场选项(如"北京(大兴国际机场)(PKX)"、"成都(双流国际机场)(CTU)"等)click选择目标机场press + Enter提交表单(避免覆盖层阻挡问题,已在多城市场景下验证有效性)search查找搜索按钮并clickbackbone或search获取最新元素引用✅ 访问携程官网并导航到航班查询页面
✅ 输入出发地城市名称并选择具体机场
✅ 输入目的地城市名称并选择具体机场
✅ 设置查询日期
✅ 执行航班查询并成功跳转到结果页面
✅ 处理页面动态变化和元素引用更新
✅ 多城市通用性验证: 成功测试广州(CAN)→成都(CTU)、北京(PEK)→上海(SHA)等多种城市组合
✅ 键盘操作稳定性: 在多城市测试中验证了回车键提交策略的可靠性
✅ 国际航班查询验证: 成功测试上海(SHA)→东京(HND)国际航线,验证了国际城市识别和查询流程的通用性
详细的操作指南和SOP流程请参考:references/操作指南.md
juliusbrussee/caveman
mattpocock/skills
shadcn/improve
obra/superpowers
forrestchang/andrej-karpathy-skills
vercel-labs/skills