Xpersona
T

travel-city-game(旅行游戏副本生成器)

CLAWHUB · Unverified

根据用户输入的城市名,自动调用 flyai 搜索该城市的景点、体验、美食产品, 然后生成一个游戏化的3节点叙事行程 H5 页面。每个节点包含 AI 生成的故事文案 和飞猪真实预订链接。使用方式: /travel-city-game 城市名。 当用户提到 "travel-city-game"、"生成行程"、"旅行叙... Skill: travel-city-game(旅行游戏副本生成器) Owner: hongweisong1999 Summary: 根据用户输入的城市名,自动调用 flyai 搜索该城市的景点、体验、美食产品, 然后生成一个游戏化的3节点叙事行程 H5 页面。每个节点包含 AI 生成的故事文案 和飞猪真实预订链接。使用方式: /travel-city-game 城市名。 当用户提到 "travel-city-game"、"生成行程"、"旅行叙... Tags: latest:1.0.9 Version history: v1.0.12 | 2026-04-08T03:44:20.750Z | user No functional changes; documentation update only. - 移除了“内置测试 Key”自动补充和相关安全说明,要求用户自行设置 FLYAI_API_KEY。 - 精简并调整“API 限

62
Rank
84
Safety
1.2k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.2K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17fc8h4ges10gps564npmtf4x8426ej:travel-city-game
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-hongweisong1999-travel-city-game/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

88,905 characters of source documentation, loaded on request.

Extracted files

2 files captured from the source.

SKILL.md

---
name: travel-city-game
description: >
  根据用户输入的城市名,自动调用 flyai 搜索该城市的景点、体验、美食产品,
  然后生成一个游戏化的3节点叙事行程 H5 页面。每个节点包含 AI 生成的故事文案
  和飞猪真实预订链接。使用方式: /travel-city-game 城市名。
  当用户提到 "travel-city-game"、"生成行程"、"旅行叙事"、"游戏化行程"、
  想要为某个城市创建探索路线、或者想把旅游景点串成故事线时使用此 Skill。
  即使用户只是说"帮我生成XX城市的旅行路线"也应触发。
compatibility:
  requires:
    skills:
      - name: flyai
        install_hint: "Install from https://clawhub.ai/yealexchen/flyai or run: claude skill install flyai"
    bins:
      - python3
      - node
      - flyai
---

# City Game — AI 叙事行程生成器

将任意城市的真实旅游产品串联成一条游戏化叙事路线。玩家逐步解锁节点、预订真实飞猪产品、收集奖励,体验"剧情驱动"的旅行方式。

## 输入

用户提供一个城市名,如 `长沙`、`大理`、`厦门` 等。从用户消息中提取城市名,赋值给变量 `CITY`。

## 完整工作流程

### Step 0: 验证 flyai CLI 已就绪

本 Skill 依赖 `flyai` Skill 提供的 CLI 工具。`flyai` 必须由用户预先安装(不在运行时自动安装,以避免供应链安全风险)。

执行以下命令确认 flyai 可用:

```bash
flyai --help
```

如果命令不存在(返回 "command not found"),**停止执行并提示用户**:

> ⚠️ 未检测到 flyai CLI。请先安装 flyai Skill:
> - 方式一:访问 https://clawhub.ai/yealexchen/flyai 安装
> - 方式二:在终端执行 `claude skill install flyai`
>
> 安装完成后重新运行本 Skill。

**绝对不能在 Skill 流程中自动执行 `npm install` 安装 flyai**——这会引入未经用户确认的第三方代码,存在供应链安全风险。同样,**绝对不能跳过 flyai 搜索直接编造数据。**

#### API 限流处理

在后续 Step 1 的搜索过程中,如果 flyai 返回了限流相关的错误(如 HTTP 429、"rate limit"、"quota exceeded" 或返回结果为空且提示频率过高),**停止继续请求并提示用户获取专属 API Key**:

> ⚠️ flyai API 请求被限流,免费额度可能已用尽。请按以下步骤获取 API Key:
> 1. 登录 https://flyai.open.fliggy.com/
> 2. 注册/登录后在控制台获取你的专属 API Key
> 3. 将 API Key 配置到环境变量:`export FLYAI_API_KEY="你的Key"`
> 4. 配置完成后重新运行本 Skill

设置好 API Key 后,flyai CLI 会自动使用该 Key 进行认证,不再受公共限流约束。

### Step 1: 用 flyai CLI 搜索 3 类旅游产品

#### 安全执行 flyai 命令(避免 Shell 注入)

⚠️ **严禁直接将 CITY 变量拼接到 Bash 命令字符串中执行**。必须使用以下安全方式:

**方式一:使用 Python 子进程调用(推荐,最安全)**

用 Python 执行 flyai 命令,参数作为列表传递(不经过 Shell 解析):

```python
import subprocess, json

def flyai_search(args):
    """安全调用 flyai CLI,参数作为列表传入,Shell 无法解析特殊字符"""
    result = subprocess.run(
        ["flyai"] + args,
        capture_output=True, text=True, timeout=30
    )
    if result.returncode != 0:
        print(f"Error: {result.stderr}")
        return None
    return json.loads(result.stdout)

# 示例:搜索历史古迹
data = flyai_search(["search-poi", "--city-name", CITY, "--category", "历史古迹"])
```

**方式二:如果必须用 Bash,使用单引号包裹所有变量**

```bash
# 使用单引号包裹 CITY 和其他参数值,防止 Shell 解析
flyai search-poi --city-name 'CITY' --category '历史古迹'
```

> ⚠️ 方式二仍有风险(如果 CITY 本身包含单引号),优先使用方式一。

**绝对禁止的做法**:
```bash
# ❌ 危险!CITY 如果包含 " 或 ; 等字符会导致命令注入
flyai search-poi --city-name "CITY" --category "历史古迹"
```

---

使用上述安全方式执行以下 flyai 搜索。每条命令返回 JSON 到 stdout。

**重要:两种命令的返回结构不同:**

- `search-poi` 返回: `data.itemList[].{name, address, mainPic, jumpUrl, ticketInfo.ticketName}`
- `keyword-search` 返回: `data.itemList[].info.{title, picUrl, jumpUrl, price, tags}`

---

**搜索 A — 节点1(文化探索):历史/文化景点**

首选命令(使用单引号):
```bash
flyai search-poi --city-name 'CITY' --category '历史古迹'
```

如果返回结果少于 2 个,依次尝试:
```bash
flyai search-poi --city-name 'CITY' --category '人文古迹'
flyai search-poi --city-name 'CITY' --category '博物馆'
flyai keyword-search --query 'CITY 著名景点门票

_meta.json

{
  "ownerId": "kn736s8m0we8tvvk1y1zbp23xx842jt3",
  "slug": "travel-city-game",
  "version": "1.0.12",
  "publishedAt": 1775619860750
}

Sponsored

Ads related to travel-city-game(旅行游戏副本生成器) and adjacent AI workflows.