# Meituan Queue

> |

- **Type:** Skill
- **Install:** `agentstack add skill-texteditorscorpius2015-jinguyuan-dumpling-skill-meituan-queue`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [texteditorscorpius2015](https://agentstack.voostack.com/s/texteditorscorpius2015)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [texteditorscorpius2015](https://github.com/texteditorscorpius2015)
- **Source:** https://github.com/texteditorscorpius2015/jinguyuan-dumpling-skill/tree/main/references/meituan-queue

## Install

```sh
agentstack add skill-texteditorscorpius2015-jinguyuan-dumpling-skill-meituan-queue
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 美团排队

> **Beta** 功能持续迭代中，如遇问题请及时反馈。

> **环境说明**：当前为生产环境配置。

脚本路径：当前 Skill 目录下 `scripts/mt_queue.py`。所有命令返回格式化文案，直接展示给用户即可。

## 鉴权

本 Skill 内嵌了 `meituan-passport-user-auth` Skill，位于 `/references/meituan-passport-user-auth/`。

**鉴权优先级**（从高到低）：

1. **环境变量传入**：通过 `MT_QUEUE_TOKEN=` 环境变量传入已有 token
2. **手动流程**：阅读 `/references/meituan-passport-user-auth/SKILL.md`，按 Step 0 ~ Step 4 完成授权，获取 token 后通过环境变量传入

**手动鉴权参数**：
- `client_id`：`170f5f2dbbde4048bd4a5e4ed28209cc`
- `env`：默认 prod

```bash
MT_QUEUE_TOKEN= python3 /scripts/mt_queue.py  
```

- 同一会话内 Token 可复用，无需每次重新授权。
- 遇到"登录已过期"错误时，重新执行授权流程刷新 Token。

## 命令

### 1. 查询排队状态

```bash
python3 /scripts/mt_queue.py index 
```

返回门店名称、是否支持排队、可选桌型列表（含编号和容量范围）、是否已有订单。

### 2. 取号排队

**前置条件**：必须先调 `index` 获取桌型列表。

#### 桌型与人数确认规则（取号前必须完成）

拿到 index 返回的桌型列表后，根据用户输入按以下规则确定 `--table-type-id` 和 `--people-count`：

1. **用户同时提供了桌型和人数** → 将用户描述匹配到 index 返回的标准桌型编号（如用户说"中桌"，匹配到 `[2] 中桌(3-4人)` → table-type-id=2），直接下单
2. **用户只说了人数，未指定桌型** → 根据人数筛选可容纳的桌型：
   - 只匹配到 1 个桌型 → 自动选择，告知用户
   - 匹配到多个桌型 → 列出选项，请用户确认
3. **用户只说了桌型，未说人数** → 请用户补充就餐人数

⚠️ **重要**：用户说的桌型可能不标准（如"大的"、"小桌子"、"两人桌"），你需要匹配到 index 返回的标准桌型编号后再调用，不要把用户原话当作参数直接传入。

```bash
python3 /scripts/mt_queue.py take_number  --people-count  --table-type-id  [--force]
```

- `--people-count`：就餐人数
- `--table-type-id`：index 返回的标准桌型编号（方括号内的数字）
- `--force`：当该桌型当前无人排队时，脚本会提示确认；加此参数跳过确认直接取号

### 3. 查询订单详情

**前置条件**：需已有排队订单（通过 `take_number` 取号）。

```bash
python3 /scripts/mt_queue.py order_detail 
```

返回排队号、桌型、状态、前方等待桌数等信息。

### 4. 取消排队

**前置条件**：需已有排队订单（通过 `take_number` 取号）。

```bash
python3 /scripts/mt_queue.py order_cancel 
```

## 典型工作流

1. `index` → 获取桌型列表，展示给用户
2. 根据用户输入确认桌型和人数（参见上方"桌型与人数确认规则"）
3. 参数确认后 → `take_number` 取号（若已有订单会自动提示）
4. 需要时 `order_detail` 查进度，`order_cancel` 取消

## 声明

- 本 Skill 以用户自身账号执行排队操作，取号和取消为真实业务行为，请确认后再执行。
- 用户 token 仅用于当次 API 请求，不存储、不上传、不记录到日志。
- 排队状态数据来源于第三方服务，实时性和准确性依赖外部 API，如遇操作失败建议前往美团 App 确认订单状态。

## 错误处理

- "该门店暂不支持在线排队" → 告知用户该门店未开通在线排队，建议到店排队
- "你已有排队订单" → 引导用户用 `order_detail` 查看进度，或 `order_cancel` 取消后重新取号
- "就餐人数与桌型不匹配" → 提示用户调整人数或选择其他桌型
- "登录已过期或 token 无效" → 重新触发 Skill 即可自动刷新 token
- "取号失败：桌型 X 不存在" → 用户选了不存在的桌型编号，需重新查看 `index` 输出的编号
- "当前无排队订单" → 用户尚未取号，需先 `index` 然后 `take_number`
- "当前无人排队...请用 --force 参数确认取号" → 该桌型暂无人排队，用户确认后加 `--force` 重新调用 `take_number`
- 网络超时 / `Connection refused` → 检查网络连接，稍后重试；若持续失败建议前往美团 App 操作

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [texteditorscorpius2015](https://github.com/texteditorscorpius2015)
- **Source:** [texteditorscorpius2015/jinguyuan-dumpling-skill](https://github.com/texteditorscorpius2015/jinguyuan-dumpling-skill)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-texteditorscorpius2015-jinguyuan-dumpling-skill-meituan-queue
- Seller: https://agentstack.voostack.com/s/texteditorscorpius2015
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
