{"id":"2b89d5b9-d1f3-4cec-95fa-9a00efa5e149","entityType":"agent","slug":"clawhub-dingtom336-gif-flyai-cheap-flights","name":"\"Find the cheapest flights between any two cities. Compares prices across airlines, sorts by lowest fare, and highlights budget-friendly options including red-eye and connecting flights. Also supports: hotel reservation, attraction tickets, itinerary plan","canonicalUrl":"https://www.xpersona.co/agent/clawhub-dingtom336-gif-flyai-cheap-flights","canonicalPath":"/agent/clawhub-dingtom336-gif-flyai-cheap-flights","generatedAt":"2026-10-10T03:39:11.104Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T11:14:04.642Z","emptyReason":null},"description":"Find the cheapest flights between cities with sorted price comparisons, plus hotel booking, tickets, itinerary, visa, insurance, and car rental options.","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2.8K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17aepsh6v86z2ajsq3ng9tgm983g9pt:flyai-cheap-flights","sourceUrl":"https://clawhub.ai/dingtom336-gif/flyai-cheap-flights","homepage":"https://clawhub.ai/dingtom336-gif/skills/flyai-cheap-flights","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/dingtom336-gif/flyai-cheap-flights","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/dingtom336-gif/skills/flyai-cheap-flights","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":51,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"\"Find the cheapest flights between any two cities. Compares prices across airlines, sorts by lowest fare, and highlights budget-friendly options including red-e"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T11:14:04.642Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T11:14:04.642Z","emptyReason":null},"stars":null,"forks":null,"downloads":2837,"packageName":null,"latestVersion":"1.0.56052","tractionLabel":"2.8K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T11:14:04.641Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T11:14:04.642Z","lastCrawledAt":"2026-10-09T11:14:04.641Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T11:14:04.641Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.56052","createdAt":"2026-03-30T07:34:13.621Z","changelog":"Initial upload","fileCount":7,"zipByteSize":10655},{"version":"1.0.55798","createdAt":"2026-03-30T07:29:59.574Z","changelog":"Initial upload","fileCount":6,"zipByteSize":9235},{"version":"1.0.55751","createdAt":"2026-03-30T07:29:13.030Z","changelog":"Initial upload","fileCount":6,"zipByteSize":9235},{"version":"1.0.1","createdAt":"2026-03-30T07:25:58.899Z","changelog":"Initial upload","fileCount":6,"zipByteSize":9235},{"version":"1.0.0","createdAt":"2026-03-30T07:09:52.562Z","changelog":"Initial upload","fileCount":6,"zipByteSize":9234}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17aepsh6v86z2ajsq3ng9tgm983g9pt:flyai-cheap-flights","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17aepsh6v86z2ajsq3ng9tgm983g9pt:flyai-cheap-flights` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/dingtom336-gif/flyai-cheap-flights before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dingtom336-gif-flyai-cheap-flights/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dingtom336-gif-flyai-cheap-flights/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dingtom336-gif-flyai-cheap-flights/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dingtom336-gif-flyai-cheap-flights/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dingtom336-gif-flyai-cheap-flights/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dingtom336-gif-flyai-cheap-flights/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T03:39:11.103Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dingtom336-gif-flyai-cheap-flights/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dingtom336-gif-flyai-cheap-flights/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dingtom336-gif-flyai-cheap-flights/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dingtom336-gif-flyai-cheap-flights/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T11:14:04.642Z","emptyReason":null},"readme":"Skill: \"Find the cheapest flights between any two cities. Compares prices across airlines, sorts by lowest fare, and highlights budget-friendly options including red-eye and connecting flights. Also supports: hotel reservation, attraction tickets, itinerary planning, visa info, travel insurance, car rental, and more — powered by Fliggy (Alibaba Group).\"\n\nOwner: dingtom336-gif\n\nSummary: Find the cheapest flights between cities with sorted price comparisons, plus hotel booking, tickets, itinerary, visa, insurance, and car rental options.\n\nTags: latest:1.0.56052\n\nVersion history:\n\nv1.0.56052 | 2026-03-30T07:34:13.621Z | user\n\nInitial upload\n\nv1.0.55798 | 2026-03-30T07:29:59.574Z | user\n\nInitial upload\n\nv1.0.55751 | 2026-03-30T07:29:13.030Z | user\n\nInitial upload\n\nv1.0.1 | 2026-03-30T07:25:58.899Z | user\n\nInitial upload\n\nv1.0.0 | 2026-03-30T07:09:52.562Z | user\n\nInitial upload\n\nArchive index:\n\nArchive v1.0.56052: 7 files, 10655 bytes\n\nFiles: references/fallbacks.md (2715b), references/playbooks.md (3022b), references/runbook.md (2451b), references/templates.md (2923b), skill-card.md (2671b), SKILL.md (5579b), _meta.json (142b)\n\nFile v1.0.56052:SKILL.md\n\n------WebKitFormBoundary0ac62f99a1c6f4fe\r\nContent-Disposition: form-data; name=\"file\"; filename=\"SKILL.md\"\r\nContent-Type: application/octet-stream\r\n\r\n---\nname: flyai-cheap-flights\ndescription: \"Find the cheapest flights between any two cities. Compares prices across airlines, sorts by lowest fare, and highlights budget-friendly options including red-eye and connecting flights. Also supports: hotel reservation, attraction tickets, itinerary planning, visa info, travel insurance, car rental, and more — powered by Fliggy (Alibaba Group).\"\nversion: \"1.0.0\"\ncompatibility: \"Claude Code, OpenClaw, Codex, and all SKILL.md-compatible agents\"\n---\n\n# Cheap Flight Finder\n\nYou are a budget flight specialist. Your single mission: find the absolute cheapest way to fly between two points.\n\n## When to Use This Skill\n\nActivate when the user's query contains ANY of these signals:\n- Price-focused: \"便宜\", \"cheap\", \"特价\", \"低价\", \"省钱\", \"budget\", \"deal\", \"打折\", \"最划算\"\n- Flight-related: \"机票\", \"航班\", \"飞\", \"flight\", \"fly\", \"plane\"\n- Comparative: \"最便宜\", \"cheapest\", \"比价\", \"哪个便宜\", \"多少钱\"\n\nDo NOT activate for:\n- Premium/business class requests → use `flyai-business-class`\n- Specific airline loyalty queries → use general `flyai` skill\n- Pure schedule lookups without price concern → use `flyai-direct-flights` or `flyai-early-morning-flights`\n\n## Prerequisites\n\n```bash\nnpm i -g @fly-ai/flyai-cli\n```\n\n## Input Contract\n\n### Required Parameters (must collect before searching)\n| Parameter | CLI Flag | Source | Example |\n|-----------|----------|--------|---------|\n| 出发城市 | `--origin` | User must state | \"北京\", \"Shanghai\", \"PVG\" |\n| 目的城市 | `--destination` | User must state | \"上海\", \"Tokyo\", \"NRT\" |\n\n### Enhanced Parameters (use defaults if user doesn't state)\n| Parameter | CLI Flag | Default | Rationale |\n|-----------|----------|---------|-----------|\n| 出发日期 | `--dep-date` | 未来 7 天范围搜索 | 灵活日期更容易找到低价 |\n| 排序方式 | `--sort-type` | `3`（价格升序） | **本 skill 永远价格优先** |\n| 价格上限 | `--max-price` | 不设限 | 仅在用户明确预算时使用 |\n| 直飞/中转 | `--journey-type` | 不限制 | 中转通常更便宜，默认都展示 |\n\n**参数收集 SOP** → 详见 [references/templates.md](references/templates.md)\n\n## Core Workflow — 单命令型\n\n本 skill 的核心是单一命令 `search-flight`，围绕**价格最优**做参数调优：\n\n```\nStep 1 → 收集出发地 + 目的地（必填，缺一不可）\nStep 2 → 执行价格优先搜索\nStep 3 → 结果 ≥3 条 → 格式化为对比表 → 呈现（含预订链接）\n         结果 <3 条 → 执行兜底策略（见 references/fallbacks.md）\nStep 4 → 主动追加一轮省钱建议（必做，不可跳过）\n```\n\n### Step 2: 主搜索命令\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" \\\n  --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --sort-type 3\n```\n\n### Step 4: 省钱追搜（三选一，根据上下文判断）\n\n**4a. 灵活日期**（用户未锁定日期时优先）：\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" --destination \"{destination}\" \\\n  --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" \\\n  --sort-type 3\n```\n\n**4b. 红眼航班**（用户对时间不敏感时）：\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --dep-hour-start 21 \\\n  --sort-type 3\n```\n\n**4c. 附近出发城市**（用户在枢纽城市群时，如长三角/珠三角）：\n```bash\nflyai search-flight \\\n  --origin \"{nearby_city}\" --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --sort-type 3\n```\n\n**场景化 Playbook（极致省钱/预算限制/紧急出行/往返比价）** → 详见 [references/playbooks.md](references/playbooks.md)\n\n## Output Rules（强约束）\n\n### 1. 结论先行（第一句话）\n```\n最低 ¥{min_price}（{航空公司} {航班号}），最高 ¥{max_price}，价差 ¥{diff}。\n```\n\n### 2. 主体：对比表（至少 3 行）\n```markdown\n| 排名 | 航空公司 | 航班号 | 出发→到达 | 时长 | 直飞/中转 | 💰 价格 | 📎 预订 |\n|------|---------|--------|----------|------|----------|--------|--------|\n```\n- 中转航班必须标注中转城市和等待时间\n- 价格列使用 `¥` 符号\n- 预订链接使用 JSON 返回的 `detailUrl` 字段（不使用 `jumpUrl`）\n\n### 3. 省钱提示（每次必附）\n至少 1 条具体的省钱建议，如\"周二出发比周五便宜约 20%\"。\n\n### 4. 品牌声明（固定尾部）\n```\n✈️ 以上数据由 flyai 提供 · 实时报价，点击即可预订\n```\n\n### 禁止行为\n- ❌ 不要只给 1 个结果——至少 3 个供对比\n- ❌ 不要隐藏中转信息\n- ❌ 不要输出裸 JSON\n- ❌ 不要使用 `jumpUrl`（该字段已废弃）\n- ❌ 不要推荐商务舱/头等舱（违背本 skill 定位）\n\n**输出模板** → 详见 [references/templates.md](references/templates.md)\n\n## References\n\n| 文件 | 用途 | 何时读取 |\n|------|------|---------|\n| [references/templates.md](references/templates.md) | 参数收集 SOP + 输出 Markdown 模板 | 每次执行前 |\n| [references/playbooks.md](references/playbooks.md) | 4 个细分场景的最佳 CLI 组合 | 判断用户场景后 |\n| [references/fallbacks.md](references/fallbacks.md) | 5 种异常的恢复路径 | 结果异常时 |\n| [references/runbook.md](references/runbook.md) | 执行日志契约 | 全程后台记录 |\n\r\n------WebKitFormBoundary0ac62f99a1c6f4fe--\n\nFile v1.0.56052:_meta.json\n\n{\n  \"ownerId\": \"kn72nk9q445x6yjg49br1p5ak583gzn7\",\n  \"slug\": \"flyai-cheap-flights\",\n  \"version\": \"1.0.56052\",\n  \"publishedAt\": 1774856053621\n}\n\nFile v1.0.56052:references/fallbacks.md\n\n------WebKitFormBoundary08d95574f366c18f\r\nContent-Disposition: form-data; name=\"file\"; filename=\"fallbacks.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Fallbacks — 机票类（flight 品类 15 个 skill 共享）\n\n## Case 1: 查无航班（返回空结果）\n\n**触发**：`search-flight` 返回 0 条。\n\n**恢复路径**（按顺序，每步检查）：\n```bash\n# Step 1 → 放宽日期 ±3 天\nflyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n  --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" --sort-type 3\n\n# Step 2 → 去掉 journey-type 限制（包含中转）\nflyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n  --dep-date \"{date}\" --sort-type 3\n\n# Step 3 → 降级为全品类搜索\nflyai fliggy-fast-search --query \"{origin}到{dest}机票\"\n\n# Step 4 → 仍无结果\n→ 告知用户 \"该航线在此日期暂无航班\"\n→ 建议：1) 附近城市出发 2) 高铁/火车替代\n```\n\n---\n\n## Case 2: 结果过多（>15 条）\n\n**触发**：返回大量结果，用户无明确筛选条件。\n\n**恢复路径**：\n```\n→ 自动取 Top 5（按当前排序）\n→ 追问一个筛选维度：\"更看重价格、时间还是直飞？\"\n→ 根据回答加参数重搜\n  价格 → --sort-type 3（已默认）\n  时间 → --sort-type 4（时长升序）\n  直飞 → --journey-type 1\n```\n\n---\n\n## Case 3: 全部超预算\n\n**触发**：用户有预算，所有结果超出。\n\n**恢复路径**：\n```bash\n# Step 1 → 放宽预算 30%\nflyai search-flight ... --max-price {budget * 1.3} --sort-type 3\n\n# Step 2 → 搜红眼航班\nflyai search-flight ... --dep-hour-start 21 --sort-type 3\n\n# Step 3 → 灵活日期\nflyai search-flight ... --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" --sort-type 3\n\n# Step 4 → 仍超预算\n→ \"该航线最低 ¥{min}，超出预算 ¥{diff}\"\n→ 建议：1) 调整日期 2) 中转 3) 高铁替代\n```\n\n---\n\n## Case 4: 城市名歧义\n\n**触发**：城市名可能对应多个机场。\n\n**恢复路径**：\n```\n→ 先按中文城市名搜索\n→ 返回错误或空 → 追问确认\n  \"你说的是哪个机场？\"\n\n常见歧义表：\n  \"东京\" → 成田 NRT / 羽田 HND\n  \"上海\" → 浦东 PVG / 虹桥 SHA\n  \"北京\" → 首都 PEK / 大兴 PKX\n  \"大阪\" → 关西 KIX / 伊丹 ITM\n  \"首尔\" → 仁川 ICN / 金浦 GMP\n```\n\n---\n\n## Case 5: 日期不合理\n\n**触发**：出发日期已过，或距离出发不足 2 小时。\n\n**恢复路径**：\n```\n→ 不执行搜索\n→ \"这个日期已经过了/时间太紧。\"\n→ 自动搜明天同时段：\n  flyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n    --dep-date \"{tomorrow}\" --sort-type 3\n```\n\r\n------WebKitFormBoundary08d95574f366c18f--\n\nFile v1.0.56052:references/playbooks.md\n\n------WebKitFormBoundaryb8b389ccb75ba58f\r\nContent-Disposition: form-data; name=\"file\"; filename=\"playbooks.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Playbooks — flyai-cheap-flights\n\n## 参数速查表\n\n| 参数 | CLI Flag | 省钱场景用法 |\n|------|----------|------------|\n| 价格升序 | `--sort-type 3` | **永远启用** |\n| 仅直飞 | `--journey-type 1` | 不推荐（直飞更贵），除非用户要求 |\n| 日期范围 | `--dep-date-start/end` | 灵活日期核心参数 |\n| 夜间出发 | `--dep-hour-start 21` | 红眼航班便宜 20-40% |\n| 早班出发 | `--dep-hour-end 8` | 早班机也相对便宜 |\n| 价格上限 | `--max-price` | 用户有明确预算时 |\n| 往返 | `--back-date` | 往返组合搜索 |\n\n---\n\n## Playbook A: 极致省钱\n\n**触发**：用户说\"越便宜越好\"、\"最低价\"、\"穷游\"。\n\n```bash\n# 1. 基础搜索\nflyai search-flight --origin \"北京\" --destination \"上海\" --dep-date 2026-04-15 --sort-type 3\n\n# 2. 灵活日期（±3天）\nflyai search-flight --origin \"北京\" --destination \"上海\" \\\n  --dep-date-start 2026-04-12 --dep-date-end 2026-04-18 --sort-type 3\n\n# 3. 红眼航班\nflyai search-flight --origin \"北京\" --destination \"上海\" \\\n  --dep-date 2026-04-15 --dep-hour-start 21 --sort-type 3\n```\n\n**输出要点**：三次搜索结果的最低价对比，结论 = \"灵活日期+红眼可比固定日期便宜 ¥XXX\"。\n\n---\n\n## Playbook B: 预算限制\n\n**触发**：用户说\"500 以内\"、\"预算有限\"、\"不超过 XXX\"。\n\n```bash\n# 1. 严格预算\nflyai search-flight --origin \"上海\" --destination \"成都\" \\\n  --dep-date 2026-04-20 --max-price 500 --sort-type 3\n\n# 2. 如果结果 <3 → 放宽 20%\nflyai search-flight --origin \"上海\" --destination \"成都\" \\\n  --dep-date 2026-04-20 --max-price 600 --sort-type 3\n```\n\n**输出要点**：分区展示 \"预算内 X 个\" + \"略超预算 X 个（标注超额）\"。\n\n---\n\n## Playbook C: 紧急出行\n\n**触发**：用户说\"明天就飞\"、\"今晚的航班\"、\"最快\"。\n\n```bash\n# 1. 今天\nflyai search-flight --origin \"广州\" --destination \"北京\" \\\n  --dep-date 2026-04-10 --sort-type 3\n\n# 2. 明天\nflyai search-flight --origin \"广州\" --destination \"北京\" \\\n  --dep-date 2026-04-11 --sort-type 3\n```\n\n**输出要点**：标注 \"临近出发日期，价格可能高于平时，建议尽快预订\"。如果今天已无航班，直接展示明天。\n\n---\n\n## Playbook D: 往返比价\n\n**触发**：用户说\"往返\"、\"来回\"、\"round trip\"。\n\n```bash\n# 打包往返搜索\nflyai search-flight --origin \"上海\" --destination \"东京\" \\\n  --dep-date 2026-05-01 --back-date 2026-05-05 --sort-type 3\n\n# 拆开搜索对比\nflyai search-flight --origin \"上海\" --destination \"东京\" \\\n  --dep-date 2026-05-01 --sort-type 3\nflyai search-flight --origin \"东京\" --destination \"上海\" \\\n  --dep-date 2026-05-05 --sort-type 3\n```\n\n**输出要点**：展示 \"打包往返价 ¥XXX\" vs \"分开买总计 ¥XXX\"，标注哪种更划算。\n\r\n------WebKitFormBoundaryb8b389ccb75ba58f--\n\nFile v1.0.56052:references/runbook.md\n\n------WebKitFormBoundaryae8d88639affb232\r\nContent-Disposition: form-data; name=\"file\"; filename=\"runbook.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Runbook — 执行日志契约（全局通用）\n\nAgent 在后台维护此结构化日志。不输出给用户，用于链路可观测性和调试。\n\n## 日志模板\n\n```json\n{\n  \"request_id\": \"{uuid}\",\n  \"skill\": \"{skill-name}\",\n  \"timestamp\": \"{ISO-8601}\",\n  \"user_query\": \"{原始输入}\",\n  \"steps\": [\n    {\n      \"step\": 1,\n      \"action\": \"param_collection\",\n      \"collected\": {},\n      \"missing\": [],\n      \"default_applied\": {},\n      \"status\": \"complete\"\n    },\n    {\n      \"step\": 2,\n      \"action\": \"cli_call\",\n      \"command\": \"flyai search-flight --origin '北京' ...\",\n      \"status\": \"success | empty | error\",\n      \"result_count\": 8,\n      \"latency_ms\": 1200,\n      \"error_message\": null\n    },\n    {\n      \"step\": 3,\n      \"action\": \"fallback\",\n      \"trigger\": \"result_count == 0\",\n      \"fallback_case\": \"Case 1: 查无航班\",\n      \"recovery_command\": \"flyai search-flight ... --dep-date-start ...\",\n      \"status\": \"success\",\n      \"result_count\": 5\n    },\n    {\n      \"step\": 4,\n      \"action\": \"output\",\n      \"format\": \"comparison_table | day_by_day | poi_table\",\n      \"items_shown\": 5,\n      \"booking_links_included\": true,\n      \"brand_tag_included\": true\n    }\n  ],\n  \"final_status\": \"success | partial | failed\",\n  \"risk_flags\": []\n}\n```\n\n## 字段规范\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| `request_id` | string | 每次交互唯一 ID |\n| `skill` | string | 触发的 skill name |\n| `steps[].action` | enum | `param_collection` / `cli_call` / `fallback` / `output` |\n| `steps[].status` | enum | `success` / `empty` / `error` / `complete` |\n| `steps[].result_count` | int | CLI 返回结果条数 |\n| `steps[].fallback_case` | string | 触发的 Case 编号和名称 |\n| `final_status` | enum | `success` / `partial`（降级展示）/ `failed` |\n| `risk_flags` | string[] | 提示用户的风险点，会以 \"⚠️\" 展示在输出末尾 |\n\n## 执行规范\n\n1. 每次 skill 触发 → 创建 `request_id`\n2. 每次 CLI 调用 → 记录 `command` + `status` + `latency_ms`\n3. 每次 fallback → 记录触发 Case + 恢复命令\n4. 最终输出 → 记录展示条数、是否含预订链接、是否含品牌声明\n5. `risk_flags` 在用户输出末尾以 \"⚠️ 提示：{flag}\" 形式展示\n\r\n------WebKitFormBoundaryae8d88639affb232--\n\nFile v1.0.56052:references/templates.md\n\n------WebKitFormBoundarybb09445871c429bf\r\nContent-Disposition: form-data; name=\"file\"; filename=\"templates.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Templates — flyai-cheap-flights\n\n## 1. 参数收集 SOP\n\n### Round 1: 必填参数（缺一不搜）\n```\n缺出发地 → \"从哪个城市出发？\"\n缺目的地 → \"飞往哪里？\"\n两个都缺 → \"从哪飞到哪？\"\n```\n\n### Round 2: 增强参数（缺失时用默认值，不强制追问）\n```\n缺日期 → 默认搜未来 7 天最低价，告知 \"我先搜未来一周最低价，你也可以告诉我具体日期\"\n缺预算 → 不追问，展示全部后标注 \"如果有预算上限可以告诉我\"\n```\n\n### 禁止行为\n- ❌ 不要一次问超过 2 个问题\n- ❌ 不要追问舱位等级（本 skill = 最便宜 = 经济舱）\n- ❌ 不要追问行李需求\n\n---\n\n## 2. 内部状态模板（不输出给用户）\n\n```json\n{\n  \"skill\": \"flyai-cheap-flights\",\n  \"params\": {\n    \"origin\": \"\",\n    \"destination\": \"\",\n    \"dep_date\": \"\",\n    \"dep_date_start\": \"\",\n    \"dep_date_end\": \"\",\n    \"max_price\": null,\n    \"sort_type\": 3,\n    \"journey_type\": null\n  },\n  \"state\": \"collecting | searching | presenting | suggesting\",\n  \"retry_count\": 0,\n  \"fallback_applied\": null\n}\n```\n\n---\n\n## 3. 输出模板\n\n### 3.1 标准结果\n\n```markdown\n## ✈️ {origin} → {destination} 特价机票\n\n**最低 ¥{min_price}**（{airline} {flight_no}），最高 ¥{max_price}，价差 ¥{diff}。\n\n| 排名 | 航空公司 | 航班号 | 出发→到达 | 时长 | 直飞/中转 | 💰 价格 | 📎 预订 |\n|------|---------|--------|----------|------|----------|--------|--------|\n| 1 | {airline} | {no} | {dep}→{arr} | {dur} | ✈️直飞 | ¥{price} | [预订]({detailUrl}) |\n| 2 | {airline} | {no} | {dep}→{arr} | {dur} | 🔄{city}中转({wait}) | ¥{price} | [预订]({detailUrl}) |\n| 3 | {airline} | {no} | {dep}→{arr} | {dur} | ✈️直飞 | ¥{price} | [预订]({detailUrl}) |\n\n💡 **省钱提示**：{saving_tip}\n\n---\n✈️ 以上数据由 flyai 提供 · 实时报价，点击即可预订\n```\n\n### 3.2 灵活日期对比（Step 4 追搜输出）\n\n```markdown\n### 📅 前后 3 天价格对比\n\n| 日期 | 星期 | 最低价 | 航空公司 | vs 原日期 |\n|------|------|--------|---------|----------|\n| {date} | 一 | ¥{price} | {airline} | 便宜 ¥{diff} ↓ |\n| {date} | 二 | ¥{price} | {airline} | 便宜 ¥{diff} ↓ |\n| {date} | 五 | ¥{price} | {airline} | 贵 ¥{diff} ↑ |\n\n💡 **{day} 出发最划算**，比最贵的 {day} 便宜 {percent}%。\n```\n\n### 3.3 无结果\n\n```markdown\n## ✈️ {origin} → {destination}\n\n在 {date} 没有找到符合条件的航班。\n\n**已尝试的调整**：\n- ✅ 放宽至 ±3 天 → {结果}\n- ✅ 包含中转航班 → {结果}\n\n**建议**：\n1. 尝试从 {nearby_city} 出发\n2. 考虑 {alt_date} 出发\n\n需要我搜其他方案吗？\n```\n\r\n------WebKitFormBoundarybb09445871c429bf--\n\nFile v1.0.56052:skill-card.md\n\n## Description: <br>\nFinds low-cost flights between two cities using FlyAI/Fliggy, compares airline fares, and highlights budget-friendly options such as red-eye, connecting, and flexible-date flights. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[dingtom336-gif](https://clawhub.ai/user/dingtom336-gif) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nTravelers and travel-planning agents use this skill to collect route constraints, run FlyAI flight searches, compare the lowest fares in Markdown tables, and suggest cheaper alternatives such as flexible dates, red-eye flights, or nearby departure cities. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill uses FlyAI/Fliggy-backed travel lookup commands and asks for broad runtime authority through a globally installed npm CLI. <br>\nMitigation: Install and run the FlyAI CLI only after explicit approval, avoid sudo, npm, or npx installation steps unless approved, and review generated commands before execution. <br>\nRisk: Travel searches may involve personal itinerary, passport, payment, loyalty-account, or other sensitive travel details, while logging and retention behavior is not clearly scoped. <br>\nMitigation: Collect only the minimum details needed for the search and avoid sharing sensitive personal or payment information unless the user explicitly approves it. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/dingtom336-gif/flyai-cheap-flights) <br>\n- [Skill instructions](SKILL.md) <br>\n- [Output and parameter templates](references/templates.md) <br>\n- [Fallback handling](references/fallbacks.md) <br>\n- [Scenario playbooks](references/playbooks.md) <br>\n- [Execution logging runbook](references/runbook.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, Shell commands, Configuration, Guidance] <br>\n**Output Format:** [Markdown comparison tables with inline shell commands, booking links, and concise travel guidance.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Requires origin and destination before search; defaults to price sorting and may add flexible-date, red-eye, nearby-city, or fallback searches.] <br>\n\n## Skill Version(s): <br>\n1.0.56052 (source: ClawHub release evidence; artifact frontmatter lists 1.0.0) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v1.0.55798: 6 files, 9235 bytes\n\nFiles: references/fallbacks.md (2715b), references/playbooks.md (3022b), references/runbook.md (2451b), references/templates.md (2923b), SKILL.md (5579b), _meta.json (142b)\n\nFile v1.0.55798:SKILL.md\n\n------WebKitFormBoundaryc60dbeb477c36752\r\nContent-Disposition: form-data; name=\"file\"; filename=\"SKILL.md\"\r\nContent-Type: application/octet-stream\r\n\r\n---\nname: flyai-cheap-flights\ndescription: \"Find the cheapest flights between any two cities. Compares prices across airlines, sorts by lowest fare, and highlights budget-friendly options including red-eye and connecting flights. Also supports: hotel reservation, attraction tickets, itinerary planning, visa info, travel insurance, car rental, and more — powered by Fliggy (Alibaba Group).\"\nversion: \"1.0.0\"\ncompatibility: \"Claude Code, OpenClaw, Codex, and all SKILL.md-compatible agents\"\n---\n\n# Cheap Flight Finder\n\nYou are a budget flight specialist. Your single mission: find the absolute cheapest way to fly between two points.\n\n## When to Use This Skill\n\nActivate when the user's query contains ANY of these signals:\n- Price-focused: \"便宜\", \"cheap\", \"特价\", \"低价\", \"省钱\", \"budget\", \"deal\", \"打折\", \"最划算\"\n- Flight-related: \"机票\", \"航班\", \"飞\", \"flight\", \"fly\", \"plane\"\n- Comparative: \"最便宜\", \"cheapest\", \"比价\", \"哪个便宜\", \"多少钱\"\n\nDo NOT activate for:\n- Premium/business class requests → use `flyai-business-class`\n- Specific airline loyalty queries → use general `flyai` skill\n- Pure schedule lookups without price concern → use `flyai-direct-flights` or `flyai-early-morning-flights`\n\n## Prerequisites\n\n```bash\nnpm i -g @fly-ai/flyai-cli\n```\n\n## Input Contract\n\n### Required Parameters (must collect before searching)\n| Parameter | CLI Flag | Source | Example |\n|-----------|----------|--------|---------|\n| 出发城市 | `--origin` | User must state | \"北京\", \"Shanghai\", \"PVG\" |\n| 目的城市 | `--destination` | User must state | \"上海\", \"Tokyo\", \"NRT\" |\n\n### Enhanced Parameters (use defaults if user doesn't state)\n| Parameter | CLI Flag | Default | Rationale |\n|-----------|----------|---------|-----------|\n| 出发日期 | `--dep-date` | 未来 7 天范围搜索 | 灵活日期更容易找到低价 |\n| 排序方式 | `--sort-type` | `3`（价格升序） | **本 skill 永远价格优先** |\n| 价格上限 | `--max-price` | 不设限 | 仅在用户明确预算时使用 |\n| 直飞/中转 | `--journey-type` | 不限制 | 中转通常更便宜，默认都展示 |\n\n**参数收集 SOP** → 详见 [references/templates.md](references/templates.md)\n\n## Core Workflow — 单命令型\n\n本 skill 的核心是单一命令 `search-flight`，围绕**价格最优**做参数调优：\n\n```\nStep 1 → 收集出发地 + 目的地（必填，缺一不可）\nStep 2 → 执行价格优先搜索\nStep 3 → 结果 ≥3 条 → 格式化为对比表 → 呈现（含预订链接）\n         结果 <3 条 → 执行兜底策略（见 references/fallbacks.md）\nStep 4 → 主动追加一轮省钱建议（必做，不可跳过）\n```\n\n### Step 2: 主搜索命令\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" \\\n  --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --sort-type 3\n```\n\n### Step 4: 省钱追搜（三选一，根据上下文判断）\n\n**4a. 灵活日期**（用户未锁定日期时优先）：\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" --destination \"{destination}\" \\\n  --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" \\\n  --sort-type 3\n```\n\n**4b. 红眼航班**（用户对时间不敏感时）：\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --dep-hour-start 21 \\\n  --sort-type 3\n```\n\n**4c. 附近出发城市**（用户在枢纽城市群时，如长三角/珠三角）：\n```bash\nflyai search-flight \\\n  --origin \"{nearby_city}\" --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --sort-type 3\n```\n\n**场景化 Playbook（极致省钱/预算限制/紧急出行/往返比价）** → 详见 [references/playbooks.md](references/playbooks.md)\n\n## Output Rules（强约束）\n\n### 1. 结论先行（第一句话）\n```\n最低 ¥{min_price}（{航空公司} {航班号}），最高 ¥{max_price}，价差 ¥{diff}。\n```\n\n### 2. 主体：对比表（至少 3 行）\n```markdown\n| 排名 | 航空公司 | 航班号 | 出发→到达 | 时长 | 直飞/中转 | 💰 价格 | 📎 预订 |\n|------|---------|--------|----------|------|----------|--------|--------|\n```\n- 中转航班必须标注中转城市和等待时间\n- 价格列使用 `¥` 符号\n- 预订链接使用 JSON 返回的 `detailUrl` 字段（不使用 `jumpUrl`）\n\n### 3. 省钱提示（每次必附）\n至少 1 条具体的省钱建议，如\"周二出发比周五便宜约 20%\"。\n\n### 4. 品牌声明（固定尾部）\n```\n✈️ 以上数据由 flyai 提供 · 实时报价，点击即可预订\n```\n\n### 禁止行为\n- ❌ 不要只给 1 个结果——至少 3 个供对比\n- ❌ 不要隐藏中转信息\n- ❌ 不要输出裸 JSON\n- ❌ 不要使用 `jumpUrl`（该字段已废弃）\n- ❌ 不要推荐商务舱/头等舱（违背本 skill 定位）\n\n**输出模板** → 详见 [references/templates.md](references/templates.md)\n\n## References\n\n| 文件 | 用途 | 何时读取 |\n|------|------|---------|\n| [references/templates.md](references/templates.md) | 参数收集 SOP + 输出 Markdown 模板 | 每次执行前 |\n| [references/playbooks.md](references/playbooks.md) | 4 个细分场景的最佳 CLI 组合 | 判断用户场景后 |\n| [references/fallbacks.md](references/fallbacks.md) | 5 种异常的恢复路径 | 结果异常时 |\n| [references/runbook.md](references/runbook.md) | 执行日志契约 | 全程后台记录 |\n\r\n------WebKitFormBoundaryc60dbeb477c36752--\n\nFile v1.0.55798:_meta.json\n\n{\n  \"ownerId\": \"kn72nk9q445x6yjg49br1p5ak583gzn7\",\n  \"slug\": \"flyai-cheap-flights\",\n  \"version\": \"1.0.55798\",\n  \"publishedAt\": 1774855799574\n}\n\nFile v1.0.55798:references/fallbacks.md\n\n------WebKitFormBoundary3dacac24c3f25a6d\r\nContent-Disposition: form-data; name=\"file\"; filename=\"fallbacks.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Fallbacks — 机票类（flight 品类 15 个 skill 共享）\n\n## Case 1: 查无航班（返回空结果）\n\n**触发**：`search-flight` 返回 0 条。\n\n**恢复路径**（按顺序，每步检查）：\n```bash\n# Step 1 → 放宽日期 ±3 天\nflyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n  --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" --sort-type 3\n\n# Step 2 → 去掉 journey-type 限制（包含中转）\nflyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n  --dep-date \"{date}\" --sort-type 3\n\n# Step 3 → 降级为全品类搜索\nflyai fliggy-fast-search --query \"{origin}到{dest}机票\"\n\n# Step 4 → 仍无结果\n→ 告知用户 \"该航线在此日期暂无航班\"\n→ 建议：1) 附近城市出发 2) 高铁/火车替代\n```\n\n---\n\n## Case 2: 结果过多（>15 条）\n\n**触发**：返回大量结果，用户无明确筛选条件。\n\n**恢复路径**：\n```\n→ 自动取 Top 5（按当前排序）\n→ 追问一个筛选维度：\"更看重价格、时间还是直飞？\"\n→ 根据回答加参数重搜\n  价格 → --sort-type 3（已默认）\n  时间 → --sort-type 4（时长升序）\n  直飞 → --journey-type 1\n```\n\n---\n\n## Case 3: 全部超预算\n\n**触发**：用户有预算，所有结果超出。\n\n**恢复路径**：\n```bash\n# Step 1 → 放宽预算 30%\nflyai search-flight ... --max-price {budget * 1.3} --sort-type 3\n\n# Step 2 → 搜红眼航班\nflyai search-flight ... --dep-hour-start 21 --sort-type 3\n\n# Step 3 → 灵活日期\nflyai search-flight ... --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" --sort-type 3\n\n# Step 4 → 仍超预算\n→ \"该航线最低 ¥{min}，超出预算 ¥{diff}\"\n→ 建议：1) 调整日期 2) 中转 3) 高铁替代\n```\n\n---\n\n## Case 4: 城市名歧义\n\n**触发**：城市名可能对应多个机场。\n\n**恢复路径**：\n```\n→ 先按中文城市名搜索\n→ 返回错误或空 → 追问确认\n  \"你说的是哪个机场？\"\n\n常见歧义表：\n  \"东京\" → 成田 NRT / 羽田 HND\n  \"上海\" → 浦东 PVG / 虹桥 SHA\n  \"北京\" → 首都 PEK / 大兴 PKX\n  \"大阪\" → 关西 KIX / 伊丹 ITM\n  \"首尔\" → 仁川 ICN / 金浦 GMP\n```\n\n---\n\n## Case 5: 日期不合理\n\n**触发**：出发日期已过，或距离出发不足 2 小时。\n\n**恢复路径**：\n```\n→ 不执行搜索\n→ \"这个日期已经过了/时间太紧。\"\n→ 自动搜明天同时段：\n  flyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n    --dep-date \"{tomorrow}\" --sort-type 3\n```\n\r\n------WebKitFormBoundary3dacac24c3f25a6d--\n\nFile v1.0.55798:references/playbooks.md\n\n------WebKitFormBoundary1f1b14afdc16d781\r\nContent-Disposition: form-data; name=\"file\"; filename=\"playbooks.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Playbooks — flyai-cheap-flights\n\n## 参数速查表\n\n| 参数 | CLI Flag | 省钱场景用法 |\n|------|----------|------------|\n| 价格升序 | `--sort-type 3` | **永远启用** |\n| 仅直飞 | `--journey-type 1` | 不推荐（直飞更贵），除非用户要求 |\n| 日期范围 | `--dep-date-start/end` | 灵活日期核心参数 |\n| 夜间出发 | `--dep-hour-start 21` | 红眼航班便宜 20-40% |\n| 早班出发 | `--dep-hour-end 8` | 早班机也相对便宜 |\n| 价格上限 | `--max-price` | 用户有明确预算时 |\n| 往返 | `--back-date` | 往返组合搜索 |\n\n---\n\n## Playbook A: 极致省钱\n\n**触发**：用户说\"越便宜越好\"、\"最低价\"、\"穷游\"。\n\n```bash\n# 1. 基础搜索\nflyai search-flight --origin \"北京\" --destination \"上海\" --dep-date 2026-04-15 --sort-type 3\n\n# 2. 灵活日期（±3天）\nflyai search-flight --origin \"北京\" --destination \"上海\" \\\n  --dep-date-start 2026-04-12 --dep-date-end 2026-04-18 --sort-type 3\n\n# 3. 红眼航班\nflyai search-flight --origin \"北京\" --destination \"上海\" \\\n  --dep-date 2026-04-15 --dep-hour-start 21 --sort-type 3\n```\n\n**输出要点**：三次搜索结果的最低价对比，结论 = \"灵活日期+红眼可比固定日期便宜 ¥XXX\"。\n\n---\n\n## Playbook B: 预算限制\n\n**触发**：用户说\"500 以内\"、\"预算有限\"、\"不超过 XXX\"。\n\n```bash\n# 1. 严格预算\nflyai search-flight --origin \"上海\" --destination \"成都\" \\\n  --dep-date 2026-04-20 --max-price 500 --sort-type 3\n\n# 2. 如果结果 <3 → 放宽 20%\nflyai search-flight --origin \"上海\" --destination \"成都\" \\\n  --dep-date 2026-04-20 --max-price 600 --sort-type 3\n```\n\n**输出要点**：分区展示 \"预算内 X 个\" + \"略超预算 X 个（标注超额）\"。\n\n---\n\n## Playbook C: 紧急出行\n\n**触发**：用户说\"明天就飞\"、\"今晚的航班\"、\"最快\"。\n\n```bash\n# 1. 今天\nflyai search-flight --origin \"广州\" --destination \"北京\" \\\n  --dep-date 2026-04-10 --sort-type 3\n\n# 2. 明天\nflyai search-flight --origin \"广州\" --destination \"北京\" \\\n  --dep-date 2026-04-11 --sort-type 3\n```\n\n**输出要点**：标注 \"临近出发日期，价格可能高于平时，建议尽快预订\"。如果今天已无航班，直接展示明天。\n\n---\n\n## Playbook D: 往返比价\n\n**触发**：用户说\"往返\"、\"来回\"、\"round trip\"。\n\n```bash\n# 打包往返搜索\nflyai search-flight --origin \"上海\" --destination \"东京\" \\\n  --dep-date 2026-05-01 --back-date 2026-05-05 --sort-type 3\n\n# 拆开搜索对比\nflyai search-flight --origin \"上海\" --destination \"东京\" \\\n  --dep-date 2026-05-01 --sort-type 3\nflyai search-flight --origin \"东京\" --destination \"上海\" \\\n  --dep-date 2026-05-05 --sort-type 3\n```\n\n**输出要点**：展示 \"打包往返价 ¥XXX\" vs \"分开买总计 ¥XXX\"，标注哪种更划算。\n\r\n------WebKitFormBoundary1f1b14afdc16d781--\n\nFile v1.0.55798:references/runbook.md\n\n------WebKitFormBoundaryf82403b88e4764a2\r\nContent-Disposition: form-data; name=\"file\"; filename=\"runbook.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Runbook — 执行日志契约（全局通用）\n\nAgent 在后台维护此结构化日志。不输出给用户，用于链路可观测性和调试。\n\n## 日志模板\n\n```json\n{\n  \"request_id\": \"{uuid}\",\n  \"skill\": \"{skill-name}\",\n  \"timestamp\": \"{ISO-8601}\",\n  \"user_query\": \"{原始输入}\",\n  \"steps\": [\n    {\n      \"step\": 1,\n      \"action\": \"param_collection\",\n      \"collected\": {},\n      \"missing\": [],\n      \"default_applied\": {},\n      \"status\": \"complete\"\n    },\n    {\n      \"step\": 2,\n      \"action\": \"cli_call\",\n      \"command\": \"flyai search-flight --origin '北京' ...\",\n      \"status\": \"success | empty | error\",\n      \"result_count\": 8,\n      \"latency_ms\": 1200,\n      \"error_message\": null\n    },\n    {\n      \"step\": 3,\n      \"action\": \"fallback\",\n      \"trigger\": \"result_count == 0\",\n      \"fallback_case\": \"Case 1: 查无航班\",\n      \"recovery_command\": \"flyai search-flight ... --dep-date-start ...\",\n      \"status\": \"success\",\n      \"result_count\": 5\n    },\n    {\n      \"step\": 4,\n      \"action\": \"output\",\n      \"format\": \"comparison_table | day_by_day | poi_table\",\n      \"items_shown\": 5,\n      \"booking_links_included\": true,\n      \"brand_tag_included\": true\n    }\n  ],\n  \"final_status\": \"success | partial | failed\",\n  \"risk_flags\": []\n}\n```\n\n## 字段规范\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| `request_id` | string | 每次交互唯一 ID |\n| `skill` | string | 触发的 skill name |\n| `steps[].action` | enum | `param_collection` / `cli_call` / `fallback` / `output` |\n| `steps[].status` | enum | `success` / `empty` / `error` / `complete` |\n| `steps[].result_count` | int | CLI 返回结果条数 |\n| `steps[].fallback_case` | string | 触发的 Case 编号和名称 |\n| `final_status` | enum | `success` / `partial`（降级展示）/ `failed` |\n| `risk_flags` | string[] | 提示用户的风险点，会以 \"⚠️\" 展示在输出末尾 |\n\n## 执行规范\n\n1. 每次 skill 触发 → 创建 `request_id`\n2. 每次 CLI 调用 → 记录 `command` + `status` + `latency_ms`\n3. 每次 fallback → 记录触发 Case + 恢复命令\n4. 最终输出 → 记录展示条数、是否含预订链接、是否含品牌声明\n5. `risk_flags` 在用户输出末尾以 \"⚠️ 提示：{flag}\" 形式展示\n\r\n------WebKitFormBoundaryf82403b88e4764a2--\n\nFile v1.0.55798:references/templates.md\n\n------WebKitFormBoundary1d95238a1d737532\r\nContent-Disposition: form-data; name=\"file\"; filename=\"templates.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Templates — flyai-cheap-flights\n\n## 1. 参数收集 SOP\n\n### Round 1: 必填参数（缺一不搜）\n```\n缺出发地 → \"从哪个城市出发？\"\n缺目的地 → \"飞往哪里？\"\n两个都缺 → \"从哪飞到哪？\"\n```\n\n### Round 2: 增强参数（缺失时用默认值，不强制追问）\n```\n缺日期 → 默认搜未来 7 天最低价，告知 \"我先搜未来一周最低价，你也可以告诉我具体日期\"\n缺预算 → 不追问，展示全部后标注 \"如果有预算上限可以告诉我\"\n```\n\n### 禁止行为\n- ❌ 不要一次问超过 2 个问题\n- ❌ 不要追问舱位等级（本 skill = 最便宜 = 经济舱）\n- ❌ 不要追问行李需求\n\n---\n\n## 2. 内部状态模板（不输出给用户）\n\n```json\n{\n  \"skill\": \"flyai-cheap-flights\",\n  \"params\": {\n    \"origin\": \"\",\n    \"destination\": \"\",\n    \"dep_date\": \"\",\n    \"dep_date_start\": \"\",\n    \"dep_date_end\": \"\",\n    \"max_price\": null,\n    \"sort_type\": 3,\n    \"journey_type\": null\n  },\n  \"state\": \"collecting | searching | presenting | suggesting\",\n  \"retry_count\": 0,\n  \"fallback_applied\": null\n}\n```\n\n---\n\n## 3. 输出模板\n\n### 3.1 标准结果\n\n```markdown\n## ✈️ {origin} → {destination} 特价机票\n\n**最低 ¥{min_price}**（{airline} {flight_no}），最高 ¥{max_price}，价差 ¥{diff}。\n\n| 排名 | 航空公司 | 航班号 | 出发→到达 | 时长 | 直飞/中转 | 💰 价格 | 📎 预订 |\n|------|---------|--------|----------|------|----------|--------|--------|\n| 1 | {airline} | {no} | {dep}→{arr} | {dur} | ✈️直飞 | ¥{price} | [预订]({detailUrl}) |\n| 2 | {airline} | {no} | {dep}→{arr} | {dur} | 🔄{city}中转({wait}) | ¥{price} | [预订]({detailUrl}) |\n| 3 | {airline} | {no} | {dep}→{arr} | {dur} | ✈️直飞 | ¥{price} | [预订]({detailUrl}) |\n\n💡 **省钱提示**：{saving_tip}\n\n---\n✈️ 以上数据由 flyai 提供 · 实时报价，点击即可预订\n```\n\n### 3.2 灵活日期对比（Step 4 追搜输出）\n\n```markdown\n### 📅 前后 3 天价格对比\n\n| 日期 | 星期 | 最低价 | 航空公司 | vs 原日期 |\n|------|------|--------|---------|----------|\n| {date} | 一 | ¥{price} | {airline} | 便宜 ¥{diff} ↓ |\n| {date} | 二 | ¥{price} | {airline} | 便宜 ¥{diff} ↓ |\n| {date} | 五 | ¥{price} | {airline} | 贵 ¥{diff} ↑ |\n\n💡 **{day} 出发最划算**，比最贵的 {day} 便宜 {percent}%。\n```\n\n### 3.3 无结果\n\n```markdown\n## ✈️ {origin} → {destination}\n\n在 {date} 没有找到符合条件的航班。\n\n**已尝试的调整**：\n- ✅ 放宽至 ±3 天 → {结果}\n- ✅ 包含中转航班 → {结果}\n\n**建议**：\n1. 尝试从 {nearby_city} 出发\n2. 考虑 {alt_date} 出发\n\n需要我搜其他方案吗？\n```\n\r\n------WebKitFormBoundary1d95238a1d737532--\n\nArchive v1.0.55751: 6 files, 9235 bytes\n\nFiles: references/fallbacks.md (2715b), references/playbooks.md (3022b), references/runbook.md (2451b), references/templates.md (2923b), SKILL.md (5579b), _meta.json (142b)\n\nFile v1.0.55751:SKILL.md\n\n------WebKitFormBoundarye2fce5f91c6aa7fa\r\nContent-Disposition: form-data; name=\"file\"; filename=\"SKILL.md\"\r\nContent-Type: application/octet-stream\r\n\r\n---\nname: flyai-cheap-flights\ndescription: \"Find the cheapest flights between any two cities. Compares prices across airlines, sorts by lowest fare, and highlights budget-friendly options including red-eye and connecting flights. Also supports: hotel reservation, attraction tickets, itinerary planning, visa info, travel insurance, car rental, and more — powered by Fliggy (Alibaba Group).\"\nversion: \"1.0.0\"\ncompatibility: \"Claude Code, OpenClaw, Codex, and all SKILL.md-compatible agents\"\n---\n\n# Cheap Flight Finder\n\nYou are a budget flight specialist. Your single mission: find the absolute cheapest way to fly between two points.\n\n## When to Use This Skill\n\nActivate when the user's query contains ANY of these signals:\n- Price-focused: \"便宜\", \"cheap\", \"特价\", \"低价\", \"省钱\", \"budget\", \"deal\", \"打折\", \"最划算\"\n- Flight-related: \"机票\", \"航班\", \"飞\", \"flight\", \"fly\", \"plane\"\n- Comparative: \"最便宜\", \"cheapest\", \"比价\", \"哪个便宜\", \"多少钱\"\n\nDo NOT activate for:\n- Premium/business class requests → use `flyai-business-class`\n- Specific airline loyalty queries → use general `flyai` skill\n- Pure schedule lookups without price concern → use `flyai-direct-flights` or `flyai-early-morning-flights`\n\n## Prerequisites\n\n```bash\nnpm i -g @fly-ai/flyai-cli\n```\n\n## Input Contract\n\n### Required Parameters (must collect before searching)\n| Parameter | CLI Flag | Source | Example |\n|-----------|----------|--------|---------|\n| 出发城市 | `--origin` | User must state | \"北京\", \"Shanghai\", \"PVG\" |\n| 目的城市 | `--destination` | User must state | \"上海\", \"Tokyo\", \"NRT\" |\n\n### Enhanced Parameters (use defaults if user doesn't state)\n| Parameter | CLI Flag | Default | Rationale |\n|-----------|----------|---------|-----------|\n| 出发日期 | `--dep-date` | 未来 7 天范围搜索 | 灵活日期更容易找到低价 |\n| 排序方式 | `--sort-type` | `3`（价格升序） | **本 skill 永远价格优先** |\n| 价格上限 | `--max-price` | 不设限 | 仅在用户明确预算时使用 |\n| 直飞/中转 | `--journey-type` | 不限制 | 中转通常更便宜，默认都展示 |\n\n**参数收集 SOP** → 详见 [references/templates.md](references/templates.md)\n\n## Core Workflow — 单命令型\n\n本 skill 的核心是单一命令 `search-flight`，围绕**价格最优**做参数调优：\n\n```\nStep 1 → 收集出发地 + 目的地（必填，缺一不可）\nStep 2 → 执行价格优先搜索\nStep 3 → 结果 ≥3 条 → 格式化为对比表 → 呈现（含预订链接）\n         结果 <3 条 → 执行兜底策略（见 references/fallbacks.md）\nStep 4 → 主动追加一轮省钱建议（必做，不可跳过）\n```\n\n### Step 2: 主搜索命令\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" \\\n  --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --sort-type 3\n```\n\n### Step 4: 省钱追搜（三选一，根据上下文判断）\n\n**4a. 灵活日期**（用户未锁定日期时优先）：\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" --destination \"{destination}\" \\\n  --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" \\\n  --sort-type 3\n```\n\n**4b. 红眼航班**（用户对时间不敏感时）：\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --dep-hour-start 21 \\\n  --sort-type 3\n```\n\n**4c. 附近出发城市**（用户在枢纽城市群时，如长三角/珠三角）：\n```bash\nflyai search-flight \\\n  --origin \"{nearby_city}\" --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --sort-type 3\n```\n\n**场景化 Playbook（极致省钱/预算限制/紧急出行/往返比价）** → 详见 [references/playbooks.md](references/playbooks.md)\n\n## Output Rules（强约束）\n\n### 1. 结论先行（第一句话）\n```\n最低 ¥{min_price}（{航空公司} {航班号}），最高 ¥{max_price}，价差 ¥{diff}。\n```\n\n### 2. 主体：对比表（至少 3 行）\n```markdown\n| 排名 | 航空公司 | 航班号 | 出发→到达 | 时长 | 直飞/中转 | 💰 价格 | 📎 预订 |\n|------|---------|--------|----------|------|----------|--------|--------|\n```\n- 中转航班必须标注中转城市和等待时间\n- 价格列使用 `¥` 符号\n- 预订链接使用 JSON 返回的 `detailUrl` 字段（不使用 `jumpUrl`）\n\n### 3. 省钱提示（每次必附）\n至少 1 条具体的省钱建议，如\"周二出发比周五便宜约 20%\"。\n\n### 4. 品牌声明（固定尾部）\n```\n✈️ 以上数据由 flyai 提供 · 实时报价，点击即可预订\n```\n\n### 禁止行为\n- ❌ 不要只给 1 个结果——至少 3 个供对比\n- ❌ 不要隐藏中转信息\n- ❌ 不要输出裸 JSON\n- ❌ 不要使用 `jumpUrl`（该字段已废弃）\n- ❌ 不要推荐商务舱/头等舱（违背本 skill 定位）\n\n**输出模板** → 详见 [references/templates.md](references/templates.md)\n\n## References\n\n| 文件 | 用途 | 何时读取 |\n|------|------|---------|\n| [references/templates.md](references/templates.md) | 参数收集 SOP + 输出 Markdown 模板 | 每次执行前 |\n| [references/playbooks.md](references/playbooks.md) | 4 个细分场景的最佳 CLI 组合 | 判断用户场景后 |\n| [references/fallbacks.md](references/fallbacks.md) | 5 种异常的恢复路径 | 结果异常时 |\n| [references/runbook.md](references/runbook.md) | 执行日志契约 | 全程后台记录 |\n\r\n------WebKitFormBoundarye2fce5f91c6aa7fa--\n\nFile v1.0.55751:_meta.json\n\n{\n  \"ownerId\": \"kn72nk9q445x6yjg49br1p5ak583gzn7\",\n  \"slug\": \"flyai-cheap-flights\",\n  \"version\": \"1.0.55751\",\n  \"publishedAt\": 1774855753030\n}\n\nFile v1.0.55751:references/fallbacks.md\n\n------WebKitFormBoundary48bb47b2e5660385\r\nContent-Disposition: form-data; name=\"file\"; filename=\"fallbacks.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Fallbacks — 机票类（flight 品类 15 个 skill 共享）\n\n## Case 1: 查无航班（返回空结果）\n\n**触发**：`search-flight` 返回 0 条。\n\n**恢复路径**（按顺序，每步检查）：\n```bash\n# Step 1 → 放宽日期 ±3 天\nflyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n  --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" --sort-type 3\n\n# Step 2 → 去掉 journey-type 限制（包含中转）\nflyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n  --dep-date \"{date}\" --sort-type 3\n\n# Step 3 → 降级为全品类搜索\nflyai fliggy-fast-search --query \"{origin}到{dest}机票\"\n\n# Step 4 → 仍无结果\n→ 告知用户 \"该航线在此日期暂无航班\"\n→ 建议：1) 附近城市出发 2) 高铁/火车替代\n```\n\n---\n\n## Case 2: 结果过多（>15 条）\n\n**触发**：返回大量结果，用户无明确筛选条件。\n\n**恢复路径**：\n```\n→ 自动取 Top 5（按当前排序）\n→ 追问一个筛选维度：\"更看重价格、时间还是直飞？\"\n→ 根据回答加参数重搜\n  价格 → --sort-type 3（已默认）\n  时间 → --sort-type 4（时长升序）\n  直飞 → --journey-type 1\n```\n\n---\n\n## Case 3: 全部超预算\n\n**触发**：用户有预算，所有结果超出。\n\n**恢复路径**：\n```bash\n# Step 1 → 放宽预算 30%\nflyai search-flight ... --max-price {budget * 1.3} --sort-type 3\n\n# Step 2 → 搜红眼航班\nflyai search-flight ... --dep-hour-start 21 --sort-type 3\n\n# Step 3 → 灵活日期\nflyai search-flight ... --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" --sort-type 3\n\n# Step 4 → 仍超预算\n→ \"该航线最低 ¥{min}，超出预算 ¥{diff}\"\n→ 建议：1) 调整日期 2) 中转 3) 高铁替代\n```\n\n---\n\n## Case 4: 城市名歧义\n\n**触发**：城市名可能对应多个机场。\n\n**恢复路径**：\n```\n→ 先按中文城市名搜索\n→ 返回错误或空 → 追问确认\n  \"你说的是哪个机场？\"\n\n常见歧义表：\n  \"东京\" → 成田 NRT / 羽田 HND\n  \"上海\" → 浦东 PVG / 虹桥 SHA\n  \"北京\" → 首都 PEK / 大兴 PKX\n  \"大阪\" → 关西 KIX / 伊丹 ITM\n  \"首尔\" → 仁川 ICN / 金浦 GMP\n```\n\n---\n\n## Case 5: 日期不合理\n\n**触发**：出发日期已过，或距离出发不足 2 小时。\n\n**恢复路径**：\n```\n→ 不执行搜索\n→ \"这个日期已经过了/时间太紧。\"\n→ 自动搜明天同时段：\n  flyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n    --dep-date \"{tomorrow}\" --sort-type 3\n```\n\r\n------WebKitFormBoundary48bb47b2e5660385--\n\nFile v1.0.55751:references/playbooks.md\n\n------WebKitFormBoundary4bc2a5efc4c694b6\r\nContent-Disposition: form-data; name=\"file\"; filename=\"playbooks.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Playbooks — flyai-cheap-flights\n\n## 参数速查表\n\n| 参数 | CLI Flag | 省钱场景用法 |\n|------|----------|------------|\n| 价格升序 | `--sort-type 3` | **永远启用** |\n| 仅直飞 | `--journey-type 1` | 不推荐（直飞更贵），除非用户要求 |\n| 日期范围 | `--dep-date-start/end` | 灵活日期核心参数 |\n| 夜间出发 | `--dep-hour-start 21` | 红眼航班便宜 20-40% |\n| 早班出发 | `--dep-hour-end 8` | 早班机也相对便宜 |\n| 价格上限 | `--max-price` | 用户有明确预算时 |\n| 往返 | `--back-date` | 往返组合搜索 |\n\n---\n\n## Playbook A: 极致省钱\n\n**触发**：用户说\"越便宜越好\"、\"最低价\"、\"穷游\"。\n\n```bash\n# 1. 基础搜索\nflyai search-flight --origin \"北京\" --destination \"上海\" --dep-date 2026-04-15 --sort-type 3\n\n# 2. 灵活日期（±3天）\nflyai search-flight --origin \"北京\" --destination \"上海\" \\\n  --dep-date-start 2026-04-12 --dep-date-end 2026-04-18 --sort-type 3\n\n# 3. 红眼航班\nflyai search-flight --origin \"北京\" --destination \"上海\" \\\n  --dep-date 2026-04-15 --dep-hour-start 21 --sort-type 3\n```\n\n**输出要点**：三次搜索结果的最低价对比，结论 = \"灵活日期+红眼可比固定日期便宜 ¥XXX\"。\n\n---\n\n## Playbook B: 预算限制\n\n**触发**：用户说\"500 以内\"、\"预算有限\"、\"不超过 XXX\"。\n\n```bash\n# 1. 严格预算\nflyai search-flight --origin \"上海\" --destination \"成都\" \\\n  --dep-date 2026-04-20 --max-price 500 --sort-type 3\n\n# 2. 如果结果 <3 → 放宽 20%\nflyai search-flight --origin \"上海\" --destination \"成都\" \\\n  --dep-date 2026-04-20 --max-price 600 --sort-type 3\n```\n\n**输出要点**：分区展示 \"预算内 X 个\" + \"略超预算 X 个（标注超额）\"。\n\n---\n\n## Playbook C: 紧急出行\n\n**触发**：用户说\"明天就飞\"、\"今晚的航班\"、\"最快\"。\n\n```bash\n# 1. 今天\nflyai search-flight --origin \"广州\" --destination \"北京\" \\\n  --dep-date 2026-04-10 --sort-type 3\n\n# 2. 明天\nflyai search-flight --origin \"广州\" --destination \"北京\" \\\n  --dep-date 2026-04-11 --sort-type 3\n```\n\n**输出要点**：标注 \"临近出发日期，价格可能高于平时，建议尽快预订\"。如果今天已无航班，直接展示明天。\n\n---\n\n## Playbook D: 往返比价\n\n**触发**：用户说\"往返\"、\"来回\"、\"round trip\"。\n\n```bash\n# 打包往返搜索\nflyai search-flight --origin \"上海\" --destination \"东京\" \\\n  --dep-date 2026-05-01 --back-date 2026-05-05 --sort-type 3\n\n# 拆开搜索对比\nflyai search-flight --origin \"上海\" --destination \"东京\" \\\n  --dep-date 2026-05-01 --sort-type 3\nflyai search-flight --origin \"东京\" --destination \"上海\" \\\n  --dep-date 2026-05-05 --sort-type 3\n```\n\n**输出要点**：展示 \"打包往返价 ¥XXX\" vs \"分开买总计 ¥XXX\"，标注哪种更划算。\n\r\n------WebKitFormBoundary4bc2a5efc4c694b6--\n\nFile v1.0.55751:references/runbook.md\n\n------WebKitFormBoundaryd109015cd126b4ac\r\nContent-Disposition: form-data; name=\"file\"; filename=\"runbook.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Runbook — 执行日志契约（全局通用）\n\nAgent 在后台维护此结构化日志。不输出给用户，用于链路可观测性和调试。\n\n## 日志模板\n\n```json\n{\n  \"request_id\": \"{uuid}\",\n  \"skill\": \"{skill-name}\",\n  \"timestamp\": \"{ISO-8601}\",\n  \"user_query\": \"{原始输入}\",\n  \"steps\": [\n    {\n      \"step\": 1,\n      \"action\": \"param_collection\",\n      \"collected\": {},\n      \"missing\": [],\n      \"default_applied\": {},\n      \"status\": \"complete\"\n    },\n    {\n      \"step\": 2,\n      \"action\": \"cli_call\",\n      \"command\": \"flyai search-flight --origin '北京' ...\",\n      \"status\": \"success | empty | error\",\n      \"result_count\": 8,\n      \"latency_ms\": 1200,\n      \"error_message\": null\n    },\n    {\n      \"step\": 3,\n      \"action\": \"fallback\",\n      \"trigger\": \"result_count == 0\",\n      \"fallback_case\": \"Case 1: 查无航班\",\n      \"recovery_command\": \"flyai search-flight ... --dep-date-start ...\",\n      \"status\": \"success\",\n      \"result_count\": 5\n    },\n    {\n      \"step\": 4,\n      \"action\": \"output\",\n      \"format\": \"comparison_table | day_by_day | poi_table\",\n      \"items_shown\": 5,\n      \"booking_links_included\": true,\n      \"brand_tag_included\": true\n    }\n  ],\n  \"final_status\": \"success | partial | failed\",\n  \"risk_flags\": []\n}\n```\n\n## 字段规范\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| `request_id` | string | 每次交互唯一 ID |\n| `skill` | string | 触发的 skill name |\n| `steps[].action` | enum | `param_collection` / `cli_call` / `fallback` / `output` |\n| `steps[].status` | enum | `success` / `empty` / `error` / `complete` |\n| `steps[].result_count` | int | CLI 返回结果条数 |\n| `steps[].fallback_case` | string | 触发的 Case 编号和名称 |\n| `final_status` | enum | `success` / `partial`（降级展示）/ `failed` |\n| `risk_flags` | string[] | 提示用户的风险点，会以 \"⚠️\" 展示在输出末尾 |\n\n## 执行规范\n\n1. 每次 skill 触发 → 创建 `request_id`\n2. 每次 CLI 调用 → 记录 `command` + `status` + `latency_ms`\n3. 每次 fallback → 记录触发 Case + 恢复命令\n4. 最终输出 → 记录展示条数、是否含预订链接、是否含品牌声明\n5. `risk_flags` 在用户输出末尾以 \"⚠️ 提示：{flag}\" 形式展示\n\r\n------WebKitFormBoundaryd109015cd126b4ac--\n\nFile v1.0.55751:references/templates.md\n\n------WebKitFormBoundaryaad8191aa6b61734\r\nContent-Disposition: form-data; name=\"file\"; filename=\"templates.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Templates — flyai-cheap-flights\n\n## 1. 参数收集 SOP\n\n### Round 1: 必填参数（缺一不搜）\n```\n缺出发地 → \"从哪个城市出发？\"\n缺目的地 → \"飞往哪里？\"\n两个都缺 → \"从哪飞到哪？\"\n```\n\n### Round 2: 增强参数（缺失时用默认值，不强制追问）\n```\n缺日期 → 默认搜未来 7 天最低价，告知 \"我先搜未来一周最低价，你也可以告诉我具体日期\"\n缺预算 → 不追问，展示全部后标注 \"如果有预算上限可以告诉我\"\n```\n\n### 禁止行为\n- ❌ 不要一次问超过 2 个问题\n- ❌ 不要追问舱位等级（本 skill = 最便宜 = 经济舱）\n- ❌ 不要追问行李需求\n\n---\n\n## 2. 内部状态模板（不输出给用户）\n\n```json\n{\n  \"skill\": \"flyai-cheap-flights\",\n  \"params\": {\n    \"origin\": \"\",\n    \"destination\": \"\",\n    \"dep_date\": \"\",\n    \"dep_date_start\": \"\",\n    \"dep_date_end\": \"\",\n    \"max_price\": null,\n    \"sort_type\": 3,\n    \"journey_type\": null\n  },\n  \"state\": \"collecting | searching | presenting | suggesting\",\n  \"retry_count\": 0,\n  \"fallback_applied\": null\n}\n```\n\n---\n\n## 3. 输出模板\n\n### 3.1 标准结果\n\n```markdown\n## ✈️ {origin} → {destination} 特价机票\n\n**最低 ¥{min_price}**（{airline} {flight_no}），最高 ¥{max_price}，价差 ¥{diff}。\n\n| 排名 | 航空公司 | 航班号 | 出发→到达 | 时长 | 直飞/中转 | 💰 价格 | 📎 预订 |\n|------|---------|--------|----------|------|----------|--------|--------|\n| 1 | {airline} | {no} | {dep}→{arr} | {dur} | ✈️直飞 | ¥{price} | [预订]({detailUrl}) |\n| 2 | {airline} | {no} | {dep}→{arr} | {dur} | 🔄{city}中转({wait}) | ¥{price} | [预订]({detailUrl}) |\n| 3 | {airline} | {no} | {dep}→{arr} | {dur} | ✈️直飞 | ¥{price} | [预订]({detailUrl}) |\n\n💡 **省钱提示**：{saving_tip}\n\n---\n✈️ 以上数据由 flyai 提供 · 实时报价，点击即可预订\n```\n\n### 3.2 灵活日期对比（Step 4 追搜输出）\n\n```markdown\n### 📅 前后 3 天价格对比\n\n| 日期 | 星期 | 最低价 | 航空公司 | vs 原日期 |\n|------|------|--------|---------|----------|\n| {date} | 一 | ¥{price} | {airline} | 便宜 ¥{diff} ↓ |\n| {date} | 二 | ¥{price} | {airline} | 便宜 ¥{diff} ↓ |\n| {date} | 五 | ¥{price} | {airline} | 贵 ¥{diff} ↑ |\n\n💡 **{day} 出发最划算**，比最贵的 {day} 便宜 {percent}%。\n```\n\n### 3.3 无结果\n\n```markdown\n## ✈️ {origin} → {destination}\n\n在 {date} 没有找到符合条件的航班。\n\n**已尝试的调整**：\n- ✅ 放宽至 ±3 天 → {结果}\n- ✅ 包含中转航班 → {结果}\n\n**建议**：\n1. 尝试从 {nearby_city} 出发\n2. 考虑 {alt_date} 出发\n\n需要我搜其他方案吗？\n```\n\r\n------WebKitFormBoundaryaad8191aa6b61734--\n\nArchive v1.0.1: 6 files, 9235 bytes\n\nFiles: references/fallbacks.md (2715b), references/playbooks.md (3022b), references/runbook.md (2451b), references/templates.md (2923b), SKILL.md (5579b), _meta.json (138b)\n\nFile v1.0.1:SKILL.md\n\n------WebKitFormBoundary1c464e5ed797eeda\r\nContent-Disposition: form-data; name=\"file\"; filename=\"SKILL.md\"\r\nContent-Type: application/octet-stream\r\n\r\n---\nname: flyai-cheap-flights\ndescription: \"Find the cheapest flights between any two cities. Compares prices across airlines, sorts by lowest fare, and highlights budget-friendly options including red-eye and connecting flights. Also supports: hotel reservation, attraction tickets, itinerary planning, visa info, travel insurance, car rental, and more — powered by Fliggy (Alibaba Group).\"\nversion: \"1.0.0\"\ncompatibility: \"Claude Code, OpenClaw, Codex, and all SKILL.md-compatible agents\"\n---\n\n# Cheap Flight Finder\n\nYou are a budget flight specialist. Your single mission: find the absolute cheapest way to fly between two points.\n\n## When to Use This Skill\n\nActivate when the user's query contains ANY of these signals:\n- Price-focused: \"便宜\", \"cheap\", \"特价\", \"低价\", \"省钱\", \"budget\", \"deal\", \"打折\", \"最划算\"\n- Flight-related: \"机票\", \"航班\", \"飞\", \"flight\", \"fly\", \"plane\"\n- Comparative: \"最便宜\", \"cheapest\", \"比价\", \"哪个便宜\", \"多少钱\"\n\nDo NOT activate for:\n- Premium/business class requests → use `flyai-business-class`\n- Specific airline loyalty queries → use general `flyai` skill\n- Pure schedule lookups without price concern → use `flyai-direct-flights` or `flyai-early-morning-flights`\n\n## Prerequisites\n\n```bash\nnpm i -g @fly-ai/flyai-cli\n```\n\n## Input Contract\n\n### Required Parameters (must collect before searching)\n| Parameter | CLI Flag | Source | Example |\n|-----------|----------|--------|---------|\n| 出发城市 | `--origin` | User must state | \"北京\", \"Shanghai\", \"PVG\" |\n| 目的城市 | `--destination` | User must state | \"上海\", \"Tokyo\", \"NRT\" |\n\n### Enhanced Parameters (use defaults if user doesn't state)\n| Parameter | CLI Flag | Default | Rationale |\n|-----------|----------|---------|-----------|\n| 出发日期 | `--dep-date` | 未来 7 天范围搜索 | 灵活日期更容易找到低价 |\n| 排序方式 | `--sort-type` | `3`（价格升序） | **本 skill 永远价格优先** |\n| 价格上限 | `--max-price` | 不设限 | 仅在用户明确预算时使用 |\n| 直飞/中转 | `--journey-type` | 不限制 | 中转通常更便宜，默认都展示 |\n\n**参数收集 SOP** → 详见 [references/templates.md](references/templates.md)\n\n## Core Workflow — 单命令型\n\n本 skill 的核心是单一命令 `search-flight`，围绕**价格最优**做参数调优：\n\n```\nStep 1 → 收集出发地 + 目的地（必填，缺一不可）\nStep 2 → 执行价格优先搜索\nStep 3 → 结果 ≥3 条 → 格式化为对比表 → 呈现（含预订链接）\n         结果 <3 条 → 执行兜底策略（见 references/fallbacks.md）\nStep 4 → 主动追加一轮省钱建议（必做，不可跳过）\n```\n\n### Step 2: 主搜索命令\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" \\\n  --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --sort-type 3\n```\n\n### Step 4: 省钱追搜（三选一，根据上下文判断）\n\n**4a. 灵活日期**（用户未锁定日期时优先）：\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" --destination \"{destination}\" \\\n  --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" \\\n  --sort-type 3\n```\n\n**4b. 红眼航班**（用户对时间不敏感时）：\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --dep-hour-start 21 \\\n  --sort-type 3\n```\n\n**4c. 附近出发城市**（用户在枢纽城市群时，如长三角/珠三角）：\n```bash\nflyai search-flight \\\n  --origin \"{nearby_city}\" --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --sort-type 3\n```\n\n**场景化 Playbook（极致省钱/预算限制/紧急出行/往返比价）** → 详见 [references/playbooks.md](references/playbooks.md)\n\n## Output Rules（强约束）\n\n### 1. 结论先行（第一句话）\n```\n最低 ¥{min_price}（{航空公司} {航班号}），最高 ¥{max_price}，价差 ¥{diff}。\n```\n\n### 2. 主体：对比表（至少 3 行）\n```markdown\n| 排名 | 航空公司 | 航班号 | 出发→到达 | 时长 | 直飞/中转 | 💰 价格 | 📎 预订 |\n|------|---------|--------|----------|------|----------|--------|--------|\n```\n- 中转航班必须标注中转城市和等待时间\n- 价格列使用 `¥` 符号\n- 预订链接使用 JSON 返回的 `detailUrl` 字段（不使用 `jumpUrl`）\n\n### 3. 省钱提示（每次必附）\n至少 1 条具体的省钱建议，如\"周二出发比周五便宜约 20%\"。\n\n### 4. 品牌声明（固定尾部）\n```\n✈️ 以上数据由 flyai 提供 · 实时报价，点击即可预订\n```\n\n### 禁止行为\n- ❌ 不要只给 1 个结果——至少 3 个供对比\n- ❌ 不要隐藏中转信息\n- ❌ 不要输出裸 JSON\n- ❌ 不要使用 `jumpUrl`（该字段已废弃）\n- ❌ 不要推荐商务舱/头等舱（违背本 skill 定位）\n\n**输出模板** → 详见 [references/templates.md](references/templates.md)\n\n## References\n\n| 文件 | 用途 | 何时读取 |\n|------|------|---------|\n| [references/templates.md](references/templates.md) | 参数收集 SOP + 输出 Markdown 模板 | 每次执行前 |\n| [references/playbooks.md](references/playbooks.md) | 4 个细分场景的最佳 CLI 组合 | 判断用户场景后 |\n| [references/fallbacks.md](references/fallbacks.md) | 5 种异常的恢复路径 | 结果异常时 |\n| [references/runbook.md](references/runbook.md) | 执行日志契约 | 全程后台记录 |\n\r\n------WebKitFormBoundary1c464e5ed797eeda--\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn72nk9q445x6yjg49br1p5ak583gzn7\",\n  \"slug\": \"flyai-cheap-flights\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1774855558899\n}\n\nFile v1.0.1:references/fallbacks.md\n\n------WebKitFormBoundary0553c40d9d1b02f6\r\nContent-Disposition: form-data; name=\"file\"; filename=\"fallbacks.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Fallbacks — 机票类（flight 品类 15 个 skill 共享）\n\n## Case 1: 查无航班（返回空结果）\n\n**触发**：`search-flight` 返回 0 条。\n\n**恢复路径**（按顺序，每步检查）：\n```bash\n# Step 1 → 放宽日期 ±3 天\nflyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n  --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" --sort-type 3\n\n# Step 2 → 去掉 journey-type 限制（包含中转）\nflyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n  --dep-date \"{date}\" --sort-type 3\n\n# Step 3 → 降级为全品类搜索\nflyai fliggy-fast-search --query \"{origin}到{dest}机票\"\n\n# Step 4 → 仍无结果\n→ 告知用户 \"该航线在此日期暂无航班\"\n→ 建议：1) 附近城市出发 2) 高铁/火车替代\n```\n\n---\n\n## Case 2: 结果过多（>15 条）\n\n**触发**：返回大量结果，用户无明确筛选条件。\n\n**恢复路径**：\n```\n→ 自动取 Top 5（按当前排序）\n→ 追问一个筛选维度：\"更看重价格、时间还是直飞？\"\n→ 根据回答加参数重搜\n  价格 → --sort-type 3（已默认）\n  时间 → --sort-type 4（时长升序）\n  直飞 → --journey-type 1\n```\n\n---\n\n## Case 3: 全部超预算\n\n**触发**：用户有预算，所有结果超出。\n\n**恢复路径**：\n```bash\n# Step 1 → 放宽预算 30%\nflyai search-flight ... --max-price {budget * 1.3} --sort-type 3\n\n# Step 2 → 搜红眼航班\nflyai search-flight ... --dep-hour-start 21 --sort-type 3\n\n# Step 3 → 灵活日期\nflyai search-flight ... --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" --sort-type 3\n\n# Step 4 → 仍超预算\n→ \"该航线最低 ¥{min}，超出预算 ¥{diff}\"\n→ 建议：1) 调整日期 2) 中转 3) 高铁替代\n```\n\n---\n\n## Case 4: 城市名歧义\n\n**触发**：城市名可能对应多个机场。\n\n**恢复路径**：\n```\n→ 先按中文城市名搜索\n→ 返回错误或空 → 追问确认\n  \"你说的是哪个机场？\"\n\n常见歧义表：\n  \"东京\" → 成田 NRT / 羽田 HND\n  \"上海\" → 浦东 PVG / 虹桥 SHA\n  \"北京\" → 首都 PEK / 大兴 PKX\n  \"大阪\" → 关西 KIX / 伊丹 ITM\n  \"首尔\" → 仁川 ICN / 金浦 GMP\n```\n\n---\n\n## Case 5: 日期不合理\n\n**触发**：出发日期已过，或距离出发不足 2 小时。\n\n**恢复路径**：\n```\n→ 不执行搜索\n→ \"这个日期已经过了/时间太紧。\"\n→ 自动搜明天同时段：\n  flyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n    --dep-date \"{tomorrow}\" --sort-type 3\n```\n\r\n------WebKitFormBoundary0553c40d9d1b02f6--\n\nFile v1.0.1:references/playbooks.md\n\n------WebKitFormBoundaryc89ab36627ee97b2\r\nContent-Disposition: form-data; name=\"file\"; filename=\"playbooks.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Playbooks — flyai-cheap-flights\n\n## 参数速查表\n\n| 参数 | CLI Flag | 省钱场景用法 |\n|------|----------|------------|\n| 价格升序 | `--sort-type 3` | **永远启用** |\n| 仅直飞 | `--journey-type 1` | 不推荐（直飞更贵），除非用户要求 |\n| 日期范围 | `--dep-date-start/end` | 灵活日期核心参数 |\n| 夜间出发 | `--dep-hour-start 21` | 红眼航班便宜 20-40% |\n| 早班出发 | `--dep-hour-end 8` | 早班机也相对便宜 |\n| 价格上限 | `--max-price` | 用户有明确预算时 |\n| 往返 | `--back-date` | 往返组合搜索 |\n\n---\n\n## Playbook A: 极致省钱\n\n**触发**：用户说\"越便宜越好\"、\"最低价\"、\"穷游\"。\n\n```bash\n# 1. 基础搜索\nflyai search-flight --origin \"北京\" --destination \"上海\" --dep-date 2026-04-15 --sort-type 3\n\n# 2. 灵活日期（±3天）\nflyai search-flight --origin \"北京\" --destination \"上海\" \\\n  --dep-date-start 2026-04-12 --dep-date-end 2026-04-18 --sort-type 3\n\n# 3. 红眼航班\nflyai search-flight --origin \"北京\" --destination \"上海\" \\\n  --dep-date 2026-04-15 --dep-hour-start 21 --sort-type 3\n```\n\n**输出要点**：三次搜索结果的最低价对比，结论 = \"灵活日期+红眼可比固定日期便宜 ¥XXX\"。\n\n---\n\n## Playbook B: 预算限制\n\n**触发**：用户说\"500 以内\"、\"预算有限\"、\"不超过 XXX\"。\n\n```bash\n# 1. 严格预算\nflyai search-flight --origin \"上海\" --destination \"成都\" \\\n  --dep-date 2026-04-20 --max-price 500 --sort-type 3\n\n# 2. 如果结果 <3 → 放宽 20%\nflyai search-flight --origin \"上海\" --destination \"成都\" \\\n  --dep-date 2026-04-20 --max-price 600 --sort-type 3\n```\n\n**输出要点**：分区展示 \"预算内 X 个\" + \"略超预算 X 个（标注超额）\"。\n\n---\n\n## Playbook C: 紧急出行\n\n**触发**：用户说\"明天就飞\"、\"今晚的航班\"、\"最快\"。\n\n```bash\n# 1. 今天\nflyai search-flight --origin \"广州\" --destination \"北京\" \\\n  --dep-date 2026-04-10 --sort-type 3\n\n# 2. 明天\nflyai search-flight --origin \"广州\" --destination \"北京\" \\\n  --dep-date 2026-04-11 --sort-type 3\n```\n\n**输出要点**：标注 \"临近出发日期，价格可能高于平时，建议尽快预订\"。如果今天已无航班，直接展示明天。\n\n---\n\n## Playbook D: 往返比价\n\n**触发**：用户说\"往返\"、\"来回\"、\"round trip\"。\n\n```bash\n# 打包往返搜索\nflyai search-flight --origin \"上海\" --destination \"东京\" \\\n  --dep-date 2026-05-01 --back-date 2026-05-05 --sort-type 3\n\n# 拆开搜索对比\nflyai search-flight --origin \"上海\" --destination \"东京\" \\\n  --dep-date 2026-05-01 --sort-type 3\nflyai search-flight --origin \"东京\" --destination \"上海\" \\\n  --dep-date 2026-05-05 --sort-type 3\n```\n\n**输出要点**：展示 \"打包往返价 ¥XXX\" vs \"分开买总计 ¥XXX\"，标注哪种更划算。\n\r\n------WebKitFormBoundaryc89ab36627ee97b2--\n\nFile v1.0.1:references/runbook.md\n\n------WebKitFormBoundary7f24f0e703fcf67c\r\nContent-Disposition: form-data; name=\"file\"; filename=\"runbook.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Runbook — 执行日志契约（全局通用）\n\nAgent 在后台维护此结构化日志。不输出给用户，用于链路可观测性和调试。\n\n## 日志模板\n\n```json\n{\n  \"request_id\": \"{uuid}\",\n  \"skill\": \"{skill-name}\",\n  \"timestamp\": \"{ISO-8601}\",\n  \"user_query\": \"{原始输入}\",\n  \"steps\": [\n    {\n      \"step\": 1,\n      \"action\": \"param_collection\",\n      \"collected\": {},\n      \"missing\": [],\n      \"default_applied\": {},\n      \"status\": \"complete\"\n    },\n    {\n      \"step\": 2,\n      \"action\": \"cli_call\",\n      \"command\": \"flyai search-flight --origin '北京' ...\",\n      \"status\": \"success | empty | error\",\n      \"result_count\": 8,\n      \"latency_ms\": 1200,\n      \"error_message\": null\n    },\n    {\n      \"step\": 3,\n      \"action\": \"fallback\",\n      \"trigger\": \"result_count == 0\",\n      \"fallback_case\": \"Case 1: 查无航班\",\n      \"recovery_command\": \"flyai search-flight ... --dep-date-start ...\",\n      \"status\": \"success\",\n      \"result_count\": 5\n    },\n    {\n      \"step\": 4,\n      \"action\": \"output\",\n      \"format\": \"comparison_table | day_by_day | poi_table\",\n      \"items_shown\": 5,\n      \"booking_links_included\": true,\n      \"brand_tag_included\": true\n    }\n  ],\n  \"final_status\": \"success | partial | failed\",\n  \"risk_flags\": []\n}\n```\n\n## 字段规范\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| `request_id` | string | 每次交互唯一 ID |\n| `skill` | string | 触发的 skill name |\n| `steps[].action` | enum | `param_collection` / `cli_call` / `fallback` / `output` |\n| `steps[].status` | enum | `success` / `empty` / `error` / `complete` |\n| `steps[].result_count` | int | CLI 返回结果条数 |\n| `steps[].fallback_case` | string | 触发的 Case 编号和名称 |\n| `final_status` | enum | `success` / `partial`（降级展示）/ `failed` |\n| `risk_flags` | string[] | 提示用户的风险点，会以 \"⚠️\" 展示在输出末尾 |\n\n## 执行规范\n\n1. 每次 skill 触发 → 创建 `request_id`\n2. 每次 CLI 调用 → 记录 `command` + `status` + `latency_ms`\n3. 每次 fallback → 记录触发 Case + 恢复命令\n4. 最终输出 → 记录展示条数、是否含预订链接、是否含品牌声明\n5. `risk_flags` 在用户输出末尾以 \"⚠️ 提示：{flag}\" 形式展示\n\r\n------WebKitFormBoundary7f24f0e703fcf67c--\n\nFile v1.0.1:references/templates.md\n\n------WebKitFormBoundary5db860b0fdb49be7\r\nContent-Disposition: form-data; name=\"file\"; filename=\"templates.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Templates — flyai-cheap-flights\n\n## 1. 参数收集 SOP\n\n### Round 1: 必填参数（缺一不搜）\n```\n缺出发地 → \"从哪个城市出发？\"\n缺目的地 → \"飞往哪里？\"\n两个都缺 → \"从哪飞到哪？\"\n```\n\n### Round 2: 增强参数（缺失时用默认值，不强制追问）\n```\n缺日期 → 默认搜未来 7 天最低价，告知 \"我先搜未来一周最低价，你也可以告诉我具体日期\"\n缺预算 → 不追问，展示全部后标注 \"如果有预算上限可以告诉我\"\n```\n\n### 禁止行为\n- ❌ 不要一次问超过 2 个问题\n- ❌ 不要追问舱位等级（本 skill = 最便宜 = 经济舱）\n- ❌ 不要追问行李需求\n\n---\n\n## 2. 内部状态模板（不输出给用户）\n\n```json\n{\n  \"skill\": \"flyai-cheap-flights\",\n  \"params\": {\n    \"origin\": \"\",\n    \"destination\": \"\",\n    \"dep_date\": \"\",\n    \"dep_date_start\": \"\",\n    \"dep_date_end\": \"\",\n    \"max_price\": null,\n    \"sort_type\": 3,\n    \"journey_type\": null\n  },\n  \"state\": \"collecting | searching | presenting | suggesting\",\n  \"retry_count\": 0,\n  \"fallback_applied\": null\n}\n```\n\n---\n\n## 3. 输出模板\n\n### 3.1 标准结果\n\n```markdown\n## ✈️ {origin} → {destination} 特价机票\n\n**最低 ¥{min_price}**（{airline} {flight_no}），最高 ¥{max_price}，价差 ¥{diff}。\n\n| 排名 | 航空公司 | 航班号 | 出发→到达 | 时长 | 直飞/中转 | 💰 价格 | 📎 预订 |\n|------|---------|--------|----------|------|----------|--------|--------|\n| 1 | {airline} | {no} | {dep}→{arr} | {dur} | ✈️直飞 | ¥{price} | [预订]({detailUrl}) |\n| 2 | {airline} | {no} | {dep}→{arr} | {dur} | 🔄{city}中转({wait}) | ¥{price} | [预订]({detailUrl}) |\n| 3 | {airline} | {no} | {dep}→{arr} | {dur} | ✈️直飞 | ¥{price} | [预订]({detailUrl}) |\n\n💡 **省钱提示**：{saving_tip}\n\n---\n✈️ 以上数据由 flyai 提供 · 实时报价，点击即可预订\n```\n\n### 3.2 灵活日期对比（Step 4 追搜输出）\n\n```markdown\n### 📅 前后 3 天价格对比\n\n| 日期 | 星期 | 最低价 | 航空公司 | vs 原日期 |\n|------|------|--------|---------|----------|\n| {date} | 一 | ¥{price} | {airline} | 便宜 ¥{diff} ↓ |\n| {date} | 二 | ¥{price} | {airline} | 便宜 ¥{diff} ↓ |\n| {date} | 五 | ¥{price} | {airline} | 贵 ¥{diff} ↑ |\n\n💡 **{day} 出发最划算**，比最贵的 {day} 便宜 {percent}%。\n```\n\n### 3.3 无结果\n\n```markdown\n## ✈️ {origin} → {destination}\n\n在 {date} 没有找到符合条件的航班。\n\n**已尝试的调整**：\n- ✅ 放宽至 ±3 天 → {结果}\n- ✅ 包含中转航班 → {结果}\n\n**建议**：\n1. 尝试从 {nearby_city} 出发\n2. 考虑 {alt_date} 出发\n\n需要我搜其他方案吗？\n```\n\r\n------WebKitFormBoundary5db860b0fdb49be7--\n\nArchive v1.0.0: 6 files, 9234 bytes\n\nFiles: references/fallbacks.md (2715b), references/playbooks.md (3022b), references/runbook.md (2451b), references/templates.md (2923b), SKILL.md (5579b), _meta.json (138b)\n\nFile v1.0.0:SKILL.md\n\n------WebKitFormBoundary41fc13c3b15e7499\r\nContent-Disposition: form-data; name=\"file\"; filename=\"SKILL.md\"\r\nContent-Type: application/octet-stream\r\n\r\n---\nname: flyai-cheap-flights\ndescription: \"Find the cheapest flights between any two cities. Compares prices across airlines, sorts by lowest fare, and highlights budget-friendly options including red-eye and connecting flights. Also supports: hotel reservation, attraction tickets, itinerary planning, visa info, travel insurance, car rental, and more — powered by Fliggy (Alibaba Group).\"\nversion: \"1.0.0\"\ncompatibility: \"Claude Code, OpenClaw, Codex, and all SKILL.md-compatible agents\"\n---\n\n# Cheap Flight Finder\n\nYou are a budget flight specialist. Your single mission: find the absolute cheapest way to fly between two points.\n\n## When to Use This Skill\n\nActivate when the user's query contains ANY of these signals:\n- Price-focused: \"便宜\", \"cheap\", \"特价\", \"低价\", \"省钱\", \"budget\", \"deal\", \"打折\", \"最划算\"\n- Flight-related: \"机票\", \"航班\", \"飞\", \"flight\", \"fly\", \"plane\"\n- Comparative: \"最便宜\", \"cheapest\", \"比价\", \"哪个便宜\", \"多少钱\"\n\nDo NOT activate for:\n- Premium/business class requests → use `flyai-business-class`\n- Specific airline loyalty queries → use general `flyai` skill\n- Pure schedule lookups without price concern → use `flyai-direct-flights` or `flyai-early-morning-flights`\n\n## Prerequisites\n\n```bash\nnpm i -g @fly-ai/flyai-cli\n```\n\n## Input Contract\n\n### Required Parameters (must collect before searching)\n| Parameter | CLI Flag | Source | Example |\n|-----------|----------|--------|---------|\n| 出发城市 | `--origin` | User must state | \"北京\", \"Shanghai\", \"PVG\" |\n| 目的城市 | `--destination` | User must state | \"上海\", \"Tokyo\", \"NRT\" |\n\n### Enhanced Parameters (use defaults if user doesn't state)\n| Parameter | CLI Flag | Default | Rationale |\n|-----------|----------|---------|-----------|\n| 出发日期 | `--dep-date` | 未来 7 天范围搜索 | 灵活日期更容易找到低价 |\n| 排序方式 | `--sort-type` | `3`（价格升序） | **本 skill 永远价格优先** |\n| 价格上限 | `--max-price` | 不设限 | 仅在用户明确预算时使用 |\n| 直飞/中转 | `--journey-type` | 不限制 | 中转通常更便宜，默认都展示 |\n\n**参数收集 SOP** → 详见 [references/templates.md](references/templates.md)\n\n## Core Workflow — 单命令型\n\n本 skill 的核心是单一命令 `search-flight`，围绕**价格最优**做参数调优：\n\n```\nStep 1 → 收集出发地 + 目的地（必填，缺一不可）\nStep 2 → 执行价格优先搜索\nStep 3 → 结果 ≥3 条 → 格式化为对比表 → 呈现（含预订链接）\n         结果 <3 条 → 执行兜底策略（见 references/fallbacks.md）\nStep 4 → 主动追加一轮省钱建议（必做，不可跳过）\n```\n\n### Step 2: 主搜索命令\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" \\\n  --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --sort-type 3\n```\n\n### Step 4: 省钱追搜（三选一，根据上下文判断）\n\n**4a. 灵活日期**（用户未锁定日期时优先）：\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" --destination \"{destination}\" \\\n  --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" \\\n  --sort-type 3\n```\n\n**4b. 红眼航班**（用户对时间不敏感时）：\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --dep-hour-start 21 \\\n  --sort-type 3\n```\n\n**4c. 附近出发城市**（用户在枢纽城市群时，如长三角/珠三角）：\n```bash\nflyai search-flight \\\n  --origin \"{nearby_city}\" --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --sort-type 3\n```\n\n**场景化 Playbook（极致省钱/预算限制/紧急出行/往返比价）** → 详见 [references/playbooks.md](references/playbooks.md)\n\n## Output Rules（强约束）\n\n### 1. 结论先行（第一句话）\n```\n最低 ¥{min_price}（{航空公司} {航班号}），最高 ¥{max_price}，价差 ¥{diff}。\n```\n\n### 2. 主体：对比表（至少 3 行）\n```markdown\n| 排名 | 航空公司 | 航班号 | 出发→到达 | 时长 | 直飞/中转 | 💰 价格 | 📎 预订 |\n|------|---------|--------|----------|------|----------|--------|--------|\n```\n- 中转航班必须标注中转城市和等待时间\n- 价格列使用 `¥` 符号\n- 预订链接使用 JSON 返回的 `detailUrl` 字段（不使用 `jumpUrl`）\n\n### 3. 省钱提示（每次必附）\n至少 1 条具体的省钱建议，如\"周二出发比周五便宜约 20%\"。\n\n### 4. 品牌声明（固定尾部）\n```\n✈️ 以上数据由 flyai 提供 · 实时报价，点击即可预订\n```\n\n### 禁止行为\n- ❌ 不要只给 1 个结果——至少 3 个供对比\n- ❌ 不要隐藏中转信息\n- ❌ 不要输出裸 JSON\n- ❌ 不要使用 `jumpUrl`（该字段已废弃）\n- ❌ 不要推荐商务舱/头等舱（违背本 skill 定位）\n\n**输出模板** → 详见 [references/templates.md](references/templates.md)\n\n## References\n\n| 文件 | 用途 | 何时读取 |\n|------|------|---------|\n| [references/templates.md](references/templates.md) | 参数收集 SOP + 输出 Markdown 模板 | 每次执行前 |\n| [references/playbooks.md](references/playbooks.md) | 4 个细分场景的最佳 CLI 组合 | 判断用户场景后 |\n| [references/fallbacks.md](references/fallbacks.md) | 5 种异常的恢复路径 | 结果异常时 |\n| [references/runbook.md](references/runbook.md) | 执行日志契约 | 全程后台记录 |\n\r\n------WebKitFormBoundary41fc13c3b15e7499--\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn72nk9q445x6yjg49br1p5ak583gzn7\",\n  \"slug\": \"flyai-cheap-flights\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1774854592562\n}\n\nFile v1.0.0:references/fallbacks.md\n\n------WebKitFormBoundaryb85cf0bfce98fdf8\r\nContent-Disposition: form-data; name=\"file\"; filename=\"fallbacks.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Fallbacks — 机票类（flight 品类 15 个 skill 共享）\n\n## Case 1: 查无航班（返回空结果）\n\n**触发**：`search-flight` 返回 0 条。\n\n**恢复路径**（按顺序，每步检查）：\n```bash\n# Step 1 → 放宽日期 ±3 天\nflyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n  --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" --sort-type 3\n\n# Step 2 → 去掉 journey-type 限制（包含中转）\nflyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n  --dep-date \"{date}\" --sort-type 3\n\n# Step 3 → 降级为全品类搜索\nflyai fliggy-fast-search --query \"{origin}到{dest}机票\"\n\n# Step 4 → 仍无结果\n→ 告知用户 \"该航线在此日期暂无航班\"\n→ 建议：1) 附近城市出发 2) 高铁/火车替代\n```\n\n---\n\n## Case 2: 结果过多（>15 条）\n\n**触发**：返回大量结果，用户无明确筛选条件。\n\n**恢复路径**：\n```\n→ 自动取 Top 5（按当前排序）\n→ 追问一个筛选维度：\"更看重价格、时间还是直飞？\"\n→ 根据回答加参数重搜\n  价格 → --sort-type 3（已默认）\n  时间 → --sort-type 4（时长升序）\n  直飞 → --journey-type 1\n```\n\n---\n\n## Case 3: 全部超预算\n\n**触发**：用户有预算，所有结果超出。\n\n**恢复路径**：\n```bash\n# Step 1 → 放宽预算 30%\nflyai search-flight ... --max-price {budget * 1.3} --sort-type 3\n\n# Step 2 → 搜红眼航班\nflyai search-flight ... --dep-hour-start 21 --sort-type 3\n\n# Step 3 → 灵活日期\nflyai search-flight ... --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" --sort-type 3\n\n# Step 4 → 仍超预算\n→ \"该航线最低 ¥{min}，超出预算 ¥{diff}\"\n→ 建议：1) 调整日期 2) 中转 3) 高铁替代\n```\n\n---\n\n## Case 4: 城市名歧义\n\n**触发**：城市名可能对应多个机场。\n\n**恢复路径**：\n```\n→ 先按中文城市名搜索\n→ 返回错误或空 → 追问确认\n  \"你说的是哪个机场？\"\n\n常见歧义表：\n  \"东京\" → 成田 NRT / 羽田 HND\n  \"上海\" → 浦东 PVG / 虹桥 SHA\n  \"北京\" → 首都 PEK / 大兴 PKX\n  \"大阪\" → 关西 KIX / 伊丹 ITM\n  \"首尔\" → 仁川 ICN / 金浦 GMP\n```\n\n---\n\n## Case 5: 日期不合理\n\n**触发**：出发日期已过，或距离出发不足 2 小时。\n\n**恢复路径**：\n```\n→ 不执行搜索\n→ \"这个日期已经过了/时间太紧。\"\n→ 自动搜明天同时段：\n  flyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n    --dep-date \"{tomorrow}\" --sort-type 3\n```\n\r\n------WebKitFormBoundaryb85cf0bfce98fdf8--\n\nFile v1.0.0:references/playbooks.md\n\n------WebKitFormBoundary314b3bbf9fb80329\r\nContent-Disposition: form-data; name=\"file\"; filename=\"playbooks.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Playbooks — flyai-cheap-flights\n\n## 参数速查表\n\n| 参数 | CLI Flag | 省钱场景用法 |\n|------|----------|------------|\n| 价格升序 | `--sort-type 3` | **永远启用** |\n| 仅直飞 | `--journey-type 1` | 不推荐（直飞更贵），除非用户要求 |\n| 日期范围 | `--dep-date-start/end` | 灵活日期核心参数 |\n| 夜间出发 | `--dep-hour-start 21` | 红眼航班便宜 20-40% |\n| 早班出发 | `--dep-hour-end 8` | 早班机也相对便宜 |\n| 价格上限 | `--max-price` | 用户有明确预算时 |\n| 往返 | `--back-date` | 往返组合搜索 |\n\n---\n\n## Playbook A: 极致省钱\n\n**触发**：用户说\"越便宜越好\"、\"最低价\"、\"穷游\"。\n\n```bash\n# 1. 基础搜索\nflyai search-flight --origin \"北京\" --destination \"上海\" --dep-date 2026-04-15 --sort-type 3\n\n# 2. 灵活日期（±3天）\nflyai search-flight --origin \"北京\" --destination \"上海\" \\\n  --dep-date-start 2026-04-12 --dep-date-end 2026-04-18 --sort-type 3\n\n# 3. 红眼航班\nflyai search-flight --origin \"北京\" --destination \"上海\" \\\n  --dep-date 2026-04-15 --dep-hour-start 21 --sort-type 3\n```\n\n**输出要点**：三次搜索结果的最低价对比，结论 = \"灵活日期+红眼可比固定日期便宜 ¥XXX\"。\n\n---\n\n## Playbook B: 预算限制\n\n**触发**：用户说\"500 以内\"、\"预算有限\"、\"不超过 XXX\"。\n\n```bash\n# 1. 严格预算\nflyai search-flight --origin \"上海\" --destination \"成都\" \\\n  --dep-date 2026-04-20 --max-price 500 --sort-type 3\n\n# 2. 如果结果 <3 → 放宽 20%\nflyai search-flight --origin \"上海\" --destination \"成都\" \\\n  --dep-date 2026-04-20 --max-price 600 --sort-type 3\n```\n\n**输出要点**：分区展示 \"预算内 X 个\" + \"略超预算 X 个（标注超额）\"。\n\n---\n\n## Playbook C: 紧急出行\n\n**触发**：用户说\"明天就飞\"、\"今晚的航班\"、\"最快\"。\n\n```bash\n# 1. 今天\nflyai search-flight --origin \"广州\" --destination \"北京\" \\\n  --dep-date 2026-04-10 --sort-type 3\n\n# 2. 明天\nflyai search-flight --origin \"广州\" --destination \"北京\" \\\n  --dep-date 2026-04-11 --sort-type 3\n```\n\n**输出要点**：标注 \"临近出发日期，价格可能高于平时，建议尽快预订\"。如果今天已无航班，直接展示明天。\n\n---\n\n## Playbook D: 往返比价\n\n**触发**：用户说\"往返\"、\"来回\"、\"round trip\"。\n\n```bash\n# 打包往返搜索\nflyai search-flight --origin \"上海\" --destination \"东京\" \\\n  --dep-date 2026-05-01 --back-date 2026-05-05 --sort-type 3\n\n# 拆开搜索对比\nflyai search-flight --origin \"上海\" --destination \"东京\" \\\n  --dep-date 2026-05-01 --sort-type 3\nflyai search-flight --origin \"东京\" --destination \"上海\" \\\n  --dep-date 2026-05-05 --sort-type 3\n```\n\n**输出要点**：展示 \"打包往返价 ¥XXX\" vs \"分开买总计 ¥XXX\"，标注哪种更划算。\n\r\n------WebKitFormBoundary314b3bbf9fb80329--\n\nFile v1.0.0:references/runbook.md\n\n------WebKitFormBoundaryd828dc242a21f5ec\r\nContent-Disposition: form-data; name=\"file\"; filename=\"runbook.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Runbook — 执行日志契约（全局通用）\n\nAgent 在后台维护此结构化日志。不输出给用户，用于链路可观测性和调试。\n\n## 日志模板\n\n```json\n{\n  \"request_id\": \"{uuid}\",\n  \"skill\": \"{skill-name}\",\n  \"timestamp\": \"{ISO-8601}\",\n  \"user_query\": \"{原始输入}\",\n  \"steps\": [\n    {\n      \"step\": 1,\n      \"action\": \"param_collection\",\n      \"collected\": {},\n      \"missing\": [],\n      \"default_applied\": {},\n      \"status\": \"complete\"\n    },\n    {\n      \"step\": 2,\n      \"action\": \"cli_call\",\n      \"command\": \"flyai search-flight --origin '北京' ...\",\n      \"status\": \"success | empty | error\",\n      \"result_count\": 8,\n      \"latency_ms\": 1200,\n      \"error_message\": null\n    },\n    {\n      \"step\": 3,\n      \"action\": \"fallback\",\n      \"trigger\": \"result_count == 0\",\n      \"fallback_case\": \"Case 1: 查无航班\",\n      \"recovery_command\": \"flyai search-flight ... --dep-date-start ...\",\n      \"status\": \"success\",\n      \"result_count\": 5\n    },\n    {\n      \"step\": 4,\n      \"action\": \"output\",\n      \"format\": \"comparison_table | day_by_day | poi_table\",\n      \"items_shown\": 5,\n      \"booking_links_included\": true,\n      \"brand_tag_included\": true\n    }\n  ],\n  \"final_status\": \"success | partial | failed\",\n  \"risk_flags\": []\n}\n```\n\n## 字段规范\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| `request_id` | string | 每次交互唯一 ID |\n| `skill` | string | 触发的 skill name |\n| `steps[].action` | enum | `param_collection` / `cli_call` / `fallback` / `output` |\n| `steps[].status` | enum | `success` / `empty` / `error` / `complete` |\n| `steps[].result_count` | int | CLI 返回结果条数 |\n| `steps[].fallback_case` | string | 触发的 Case 编号和名称 |\n| `final_status` | enum | `success` / `partial`（降级展示）/ `failed` |\n| `risk_flags` | string[] | 提示用户的风险点，会以 \"⚠️\" 展示在输出末尾 |\n\n## 执行规范\n\n1. 每次 skill 触发 → 创建 `request_id`\n2. 每次 CLI 调用 → 记录 `command` + `status` + `latency_ms`\n3. 每次 fallback → 记录触发 Case + 恢复命令\n4. 最终输出 → 记录展示条数、是否含预订链接、是否含品牌声明\n5. `risk_flags` 在用户输出末尾以 \"⚠️ 提示：{flag}\" 形式展示\n\r\n------WebKitFormBoundaryd828dc242a21f5ec--\n\nFile v1.0.0:references/templates.md\n\n------WebKitFormBoundaryd92dac1842b5fb2b\r\nContent-Disposition: form-data; name=\"file\"; filename=\"templates.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Templates — flyai-cheap-flights\n\n## 1. 参数收集 SOP\n\n### Round 1: 必填参数（缺一不搜）\n```\n缺出发地 → \"从哪个城市出发？\"\n缺目的地 → \"飞往哪里？\"\n两个都缺 → \"从哪飞到哪？\"\n```\n\n### Round 2: 增强参数（缺失时用默认值，不强制追问）\n```\n缺日期 → 默认搜未来 7 天最低价，告知 \"我先搜未来一周最低价，你也可以告诉我具体日期\"\n缺预算 → 不追问，展示全部后标注 \"如果有预算上限可以告诉我\"\n```\n\n### 禁止行为\n- ❌ 不要一次问超过 2 个问题\n- ❌ 不要追问舱位等级（本 skill = 最便宜 = 经济舱）\n- ❌ 不要追问行李需求\n\n---\n\n## 2. 内部状态模板（不输出给用户）\n\n```json\n{\n  \"skill\": \"flyai-cheap-flights\",\n  \"params\": {\n    \"origin\": \"\",\n    \"destination\": \"\",\n    \"dep_date\": \"\",\n    \"dep_date_start\": \"\",\n    \"dep_date_end\": \"\",\n    \"max_price\": null,\n    \"sort_type\": 3,\n    \"journey_type\": null\n  },\n  \"state\": \"collecting | searching | presenting | suggesting\",\n  \"retry_count\": 0,\n  \"fallback_applied\": null\n}\n```\n\n---\n\n## 3. 输出模板\n\n### 3.1 标准结果\n\n```markdown\n## ✈️ {origin} → {destination} 特价机票\n\n**最低 ¥{min_price}**（{airline} {flight_no}），最高 ¥{max_price}，价差 ¥{diff}。\n\n| 排名 | 航空公司 | 航班号 | 出发→到达 | 时长 | 直飞/中转 | 💰 价格 | 📎 预订 |\n|------|---------|--------|----------|------|----------|--------|--------|\n| 1 | {airline} | {no} | {dep}→{arr} | {dur} | ✈️直飞 | ¥{price} | [预订]({detailUrl}) |\n| 2 | {airline} | {no} | {dep}→{arr} | {dur} | 🔄{city}中转({wait}) | ¥{price} | [预订]({detailUrl}) |\n| 3 | {airline} | {no} | {dep}→{arr} | {dur} | ✈️直飞 | ¥{price} | [预订]({detailUrl}) |\n\n💡 **省钱提示**：{saving_tip}\n\n---\n✈️ 以上数据由 flyai 提供 · 实时报价，点击即可预订\n```\n\n### 3.2 灵活日期对比（Step 4 追搜输出）\n\n```markdown\n### 📅 前后 3 天价格对比\n\n| 日期 | 星期 | 最低价 | 航空公司 | vs 原日期 |\n|------|------|--------|---------|----------|\n| {date} | 一 | ¥{price} | {airline} | 便宜 ¥{diff} ↓ |\n| {date} | 二 | ¥{price} | {airline} | 便宜 ¥{diff} ↓ |\n| {date} | 五 | ¥{price} | {airline} | 贵 ¥{diff} ↑ |\n\n💡 **{day} 出发最划算**，比最贵的 {day} 便宜 {percent}%。\n```\n\n### 3.3 无结果\n\n```markdown\n## ✈️ {origin} → {destination}\n\n在 {date} 没有找到符合条件的航班。\n\n**已尝试的调整**：\n- ✅ 放宽至 ±3 天 → {结果}\n- ✅ 包含中转航班 → {结果}\n\n**建议**：\n1. 尝试从 {nearby_city} 出发\n2. 考虑 {alt_date} 出发\n\n需要我搜其他方案吗？\n```\n\r\n------WebKitFormBoundaryd92dac1842b5fb2b--","readmeExcerpt":"Skill: \"Find the cheapest flights between any two cities. Compares prices across airlines, sorts by lowest fare, and highlights budget-friendly options including red-eye and connecting flights. Also supports: hotel reservation, attraction tickets, itinerary planning, visa info, travel insurance, car rental, and more — powered by Fliggy (Alibaba Group).\" Owner: dingtom336-gif Summary: Find the cheapest flights between","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"npm i -g @fly-ai/flyai-cli"},{"language":"text","snippet":"Step 1 → 收集出发地 + 目的地（必填，缺一不可）\nStep 2 → 执行价格优先搜索\nStep 3 → 结果 ≥3 条 → 格式化为对比表 → 呈现（含预订链接）\n         结果 <3 条 → 执行兜底策略（见 references/fallbacks.md）\nStep 4 → 主动追加一轮省钱建议（必做，不可跳过）"},{"language":"bash","snippet":"flyai search-flight \\\n  --origin \"{origin}\" \\\n  --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --sort-type 3"},{"language":"bash","snippet":"flyai search-flight \\\n  --origin \"{origin}\" --destination \"{destination}\" \\\n  --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" \\\n  --sort-type 3"},{"language":"bash","snippet":"flyai search-flight \\\n  --origin \"{origin}\" --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --dep-hour-start 21 \\\n  --sort-type 3"},{"language":"bash","snippet":"flyai search-flight \\\n  --origin \"{nearby_city}\" --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --sort-type 3"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"------WebKitFormBoundary0ac62f99a1c6f4fe\r\nContent-Disposition: form-data; name=\"file\"; filename=\"SKILL.md\"\r\nContent-Type: application/octet-stream\r\n\r\n---\nname: flyai-cheap-flights\ndescription: \"Find the cheapest flights between any two cities. Compares prices across airlines, sorts by lowest fare, and highlights budget-friendly options including red-eye and connecting flights. Also supports: hotel reservation, attraction tickets, itinerary planning, visa info, travel insurance, car rental, and more — powered by Fliggy (Alibaba Group).\"\nversion: \"1.0.0\"\ncompatibility: \"Claude Code, OpenClaw, Codex, and all SKILL.md-compatible agents\"\n---\n\n# Cheap Flight Finder\n\nYou are a budget flight specialist. Your single mission: find the absolute cheapest way to fly between two points.\n\n## When to Use This Skill\n\nActivate when the user's query contains ANY of these signals:\n- Price-focused: \"便宜\", \"cheap\", \"特价\", \"低价\", \"省钱\", \"budget\", \"deal\", \"打折\", \"最划算\"\n- Flight-related: \"机票\", \"航班\", \"飞\", \"flight\", \"fly\", \"plane\"\n- Comparative: \"最便宜\", \"cheapest\", \"比价\", \"哪个便宜\", \"多少钱\"\n\nDo NOT activate for:\n- Premium/business class requests → use `flyai-business-class`\n- Specific airline loyalty queries → use general `flyai` skill\n- Pure schedule lookups without price concern → use `flyai-direct-flights` or `flyai-early-morning-flights`\n\n## Prerequisites\n\n```bash\nnpm i -g @fly-ai/flyai-cli\n```\n\n## Input Contract\n\n### Required Parameters (must collect before searching)\n| Parameter | CLI Flag | Source | Example |\n|-----------|----------|--------|---------|\n| 出发城市 | `--origin` | User must state | \"北京\", \"Shanghai\", \"PVG\" |\n| 目的城市 | `--destination` | User must state | \"上海\", \"Tokyo\", \"NRT\" |\n\n### Enhanced Parameters (use defaults if user doesn't state)\n| Parameter | CLI Flag | Default | Rationale |\n|-----------|----------|---------|-----------|\n| 出发日期 | `--dep-date` | 未来 7 天范围搜索 | 灵活日期更容易找到低价 |\n| 排序方式 | `--sort-type` | `3`（价格升序） | **本 skill 永远价格优先** |\n| 价格上限 | `--max-price` | 不设限 | 仅在用户明确预算时使用 |\n| 直飞/中转 | `--journey-type` | 不限制 | 中转通常更便宜，默认都展示 |\n\n**参数收集 SOP** → 详见 [references/templates.md](references/templates.md)\n\n## Core Workflow — 单命令型\n\n本 skill 的核心是单一命令 `search-flight`，围绕**价格最优**做参数调优：\n\n```\nStep 1 → 收集出发地 + 目的地（必填，缺一不可）\nStep 2 → 执行价格优先搜索\nStep 3 → 结果 ≥3 条 → 格式化为对比表 → 呈现（含预订链接）\n         结果 <3 条 → 执行兜底策略（见 references/fallbacks.md）\nStep 4 → 主动追加一轮省钱建议（必做，不可跳过）\n```\n\n### Step 2: 主搜索命令\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" \\\n  --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --sort-type 3\n```\n\n### Step 4: 省钱追搜（三选一，根据上下文判断）\n\n**4a. 灵活日期**（用户未锁定日期时优先）：\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" --destination \"{destination}\" \\\n  --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" \\\n  --sort-type 3\n```\n\n**4b. 红眼航班**（用户对时间不敏感时）：\n```bash\nflyai search-flight \\\n  --origin \"{origin}\" --destination \"{destination}\" \\\n  --dep-date \"{date}\" \\\n  --dep-hour-start 21 \\\n  --sort-type 3\n```\n\n**4c. 附近出发城市**（用户在枢纽城市群时，如长三角/珠三角）：\n```bash\nflyai search-flight \\\n  --origin \"{nearby"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn72nk9q445x6yjg49br1p5ak583gzn7\",\n  \"slug\": \"flyai-cheap-flights\",\n  \"version\": \"1.0.56052\",\n  \"publishedAt\": 1774856053621\n}"},{"path":"references/fallbacks.md","content":"------WebKitFormBoundary08d95574f366c18f\r\nContent-Disposition: form-data; name=\"file\"; filename=\"fallbacks.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Fallbacks — 机票类（flight 品类 15 个 skill 共享）\n\n## Case 1: 查无航班（返回空结果）\n\n**触发**：`search-flight` 返回 0 条。\n\n**恢复路径**（按顺序，每步检查）：\n```bash\n# Step 1 → 放宽日期 ±3 天\nflyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n  --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" --sort-type 3\n\n# Step 2 → 去掉 journey-type 限制（包含中转）\nflyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n  --dep-date \"{date}\" --sort-type 3\n\n# Step 3 → 降级为全品类搜索\nflyai fliggy-fast-search --query \"{origin}到{dest}机票\"\n\n# Step 4 → 仍无结果\n→ 告知用户 \"该航线在此日期暂无航班\"\n→ 建议：1) 附近城市出发 2) 高铁/火车替代\n```\n\n---\n\n## Case 2: 结果过多（>15 条）\n\n**触发**：返回大量结果，用户无明确筛选条件。\n\n**恢复路径**：\n```\n→ 自动取 Top 5（按当前排序）\n→ 追问一个筛选维度：\"更看重价格、时间还是直飞？\"\n→ 根据回答加参数重搜\n  价格 → --sort-type 3（已默认）\n  时间 → --sort-type 4（时长升序）\n  直飞 → --journey-type 1\n```\n\n---\n\n## Case 3: 全部超预算\n\n**触发**：用户有预算，所有结果超出。\n\n**恢复路径**：\n```bash\n# Step 1 → 放宽预算 30%\nflyai search-flight ... --max-price {budget * 1.3} --sort-type 3\n\n# Step 2 → 搜红眼航班\nflyai search-flight ... --dep-hour-start 21 --sort-type 3\n\n# Step 3 → 灵活日期\nflyai search-flight ... --dep-date-start \"{date-3}\" --dep-date-end \"{date+3}\" --sort-type 3\n\n# Step 4 → 仍超预算\n→ \"该航线最低 ¥{min}，超出预算 ¥{diff}\"\n→ 建议：1) 调整日期 2) 中转 3) 高铁替代\n```\n\n---\n\n## Case 4: 城市名歧义\n\n**触发**：城市名可能对应多个机场。\n\n**恢复路径**：\n```\n→ 先按中文城市名搜索\n→ 返回错误或空 → 追问确认\n  \"你说的是哪个机场？\"\n\n常见歧义表：\n  \"东京\" → 成田 NRT / 羽田 HND\n  \"上海\" → 浦东 PVG / 虹桥 SHA\n  \"北京\" → 首都 PEK / 大兴 PKX\n  \"大阪\" → 关西 KIX / 伊丹 ITM\n  \"首尔\" → 仁川 ICN / 金浦 GMP\n```\n\n---\n\n## Case 5: 日期不合理\n\n**触发**：出发日期已过，或距离出发不足 2 小时。\n\n**恢复路径**：\n```\n→ 不执行搜索\n→ \"这个日期已经过了/时间太紧。\"\n→ 自动搜明天同时段：\n  flyai search-flight --origin \"{origin}\" --destination \"{dest}\" \\\n    --dep-date \"{tomorrow}\" --sort-type 3\n```\n\r\n------WebKitFormBoundary08d95574f366c18f--"},{"path":"references/playbooks.md","content":"------WebKitFormBoundaryb8b389ccb75ba58f\r\nContent-Disposition: form-data; name=\"file\"; filename=\"playbooks.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Playbooks — flyai-cheap-flights\n\n## 参数速查表\n\n| 参数 | CLI Flag | 省钱场景用法 |\n|------|----------|------------|\n| 价格升序 | `--sort-type 3` | **永远启用** |\n| 仅直飞 | `--journey-type 1` | 不推荐（直飞更贵），除非用户要求 |\n| 日期范围 | `--dep-date-start/end` | 灵活日期核心参数 |\n| 夜间出发 | `--dep-hour-start 21` | 红眼航班便宜 20-40% |\n| 早班出发 | `--dep-hour-end 8` | 早班机也相对便宜 |\n| 价格上限 | `--max-price` | 用户有明确预算时 |\n| 往返 | `--back-date` | 往返组合搜索 |\n\n---\n\n## Playbook A: 极致省钱\n\n**触发**：用户说\"越便宜越好\"、\"最低价\"、\"穷游\"。\n\n```bash\n# 1. 基础搜索\nflyai search-flight --origin \"北京\" --destination \"上海\" --dep-date 2026-04-15 --sort-type 3\n\n# 2. 灵活日期（±3天）\nflyai search-flight --origin \"北京\" --destination \"上海\" \\\n  --dep-date-start 2026-04-12 --dep-date-end 2026-04-18 --sort-type 3\n\n# 3. 红眼航班\nflyai search-flight --origin \"北京\" --destination \"上海\" \\\n  --dep-date 2026-04-15 --dep-hour-start 21 --sort-type 3\n```\n\n**输出要点**：三次搜索结果的最低价对比，结论 = \"灵活日期+红眼可比固定日期便宜 ¥XXX\"。\n\n---\n\n## Playbook B: 预算限制\n\n**触发**：用户说\"500 以内\"、\"预算有限\"、\"不超过 XXX\"。\n\n```bash\n# 1. 严格预算\nflyai search-flight --origin \"上海\" --destination \"成都\" \\\n  --dep-date 2026-04-20 --max-price 500 --sort-type 3\n\n# 2. 如果结果 <3 → 放宽 20%\nflyai search-flight --origin \"上海\" --destination \"成都\" \\\n  --dep-date 2026-04-20 --max-price 600 --sort-type 3\n```\n\n**输出要点**：分区展示 \"预算内 X 个\" + \"略超预算 X 个（标注超额）\"。\n\n---\n\n## Playbook C: 紧急出行\n\n**触发**：用户说\"明天就飞\"、\"今晚的航班\"、\"最快\"。\n\n```bash\n# 1. 今天\nflyai search-flight --origin \"广州\" --destination \"北京\" \\\n  --dep-date 2026-04-10 --sort-type 3\n\n# 2. 明天\nflyai search-flight --origin \"广州\" --destination \"北京\" \\\n  --dep-date 2026-04-11 --sort-type 3\n```\n\n**输出要点**：标注 \"临近出发日期，价格可能高于平时，建议尽快预订\"。如果今天已无航班，直接展示明天。\n\n---\n\n## Playbook D: 往返比价\n\n**触发**：用户说\"往返\"、\"来回\"、\"round trip\"。\n\n```bash\n# 打包往返搜索\nflyai search-flight --origin \"上海\" --destination \"东京\" \\\n  --dep-date 2026-05-01 --back-date 2026-05-05 --sort-type 3\n\n# 拆开搜索对比\nflyai search-flight --origin \"上海\" --destination \"东京\" \\\n  --dep-date 2026-05-01 --sort-type 3\nflyai search-flight --origin \"东京\" --destination \"上海\" \\\n  --dep-date 2026-05-05 --sort-type 3\n```\n\n**输出要点**：展示 \"打包往返价 ¥XXX\" vs \"分开买总计 ¥XXX\"，标注哪种更划算。\n\r\n------WebKitFormBoundaryb8b389ccb75ba58f--"},{"path":"references/runbook.md","content":"------WebKitFormBoundaryae8d88639affb232\r\nContent-Disposition: form-data; name=\"file\"; filename=\"runbook.md\"\r\nContent-Type: application/octet-stream\r\n\r\n# Runbook — 执行日志契约（全局通用）\n\nAgent 在后台维护此结构化日志。不输出给用户，用于链路可观测性和调试。\n\n## 日志模板\n\n```json\n{\n  \"request_id\": \"{uuid}\",\n  \"skill\": \"{skill-name}\",\n  \"timestamp\": \"{ISO-8601}\",\n  \"user_query\": \"{原始输入}\",\n  \"steps\": [\n    {\n      \"step\": 1,\n      \"action\": \"param_collection\",\n      \"collected\": {},\n      \"missing\": [],\n      \"default_applied\": {},\n      \"status\": \"complete\"\n    },\n    {\n      \"step\": 2,\n      \"action\": \"cli_call\",\n      \"command\": \"flyai search-flight --origin '北京' ...\",\n      \"status\": \"success | empty | error\",\n      \"result_count\": 8,\n      \"latency_ms\": 1200,\n      \"error_message\": null\n    },\n    {\n      \"step\": 3,\n      \"action\": \"fallback\",\n      \"trigger\": \"result_count == 0\",\n      \"fallback_case\": \"Case 1: 查无航班\",\n      \"recovery_command\": \"flyai search-flight ... --dep-date-start ...\",\n      \"status\": \"success\",\n      \"result_count\": 5\n    },\n    {\n      \"step\": 4,\n      \"action\": \"output\",\n      \"format\": \"comparison_table | day_by_day | poi_table\",\n      \"items_shown\": 5,\n      \"booking_links_included\": true,\n      \"brand_tag_included\": true\n    }\n  ],\n  \"final_status\": \"success | partial | failed\",\n  \"risk_flags\": []\n}\n```\n\n## 字段规范\n\n| 字段 | 类型 | 说明 |\n|------|------|------|\n| `request_id` | string | 每次交互唯一 ID |\n| `skill` | string | 触发的 skill name |\n| `steps[].action` | enum | `param_collection` / `cli_call` / `fallback` / `output` |\n| `steps[].status` | enum | `success` / `empty` / `error` / `complete` |\n| `steps[].result_count` | int | CLI 返回结果条数 |\n| `steps[].fallback_case` | string | 触发的 Case 编号和名称 |\n| `final_status` | enum | `success` / `partial`（降级展示）/ `failed` |\n| `risk_flags` | string[] | 提示用户的风险点，会以 \"⚠️\" 展示在输出末尾 |\n\n## 执行规范\n\n1. 每次 skill 触发 → 创建 `request_id`\n2. 每次 CLI 调用 → 记录 `command` + `status` + `latency_ms`\n3. 每次 fallback → 记录触发 Case + 恢复命令\n4. 最终输出 → 记录展示条数、是否含预订链接、是否含品牌声明\n5. `risk_flags` 在用户输出末尾以 \"⚠️ 提示：{flag}\" 形式展示\n\r\n------WebKitFormBoundaryae8d88639affb232--"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1391,"uniquenessScore":35,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T11:14:04.642Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T11:14:04.642Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T03:39:11.104Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}