swiggy-prava-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Swiggy Prava Skill

Swiggy Prava 技能

Use this skill to keep the user in the chat-driven flow while the agent handles Swiggy discovery, cart setup, Prava authorization, browser checkout, and card payment. Never ask the user for raw card details, seed phrases, bank credentials, or OTPs in chat.
使用本技能可让用户全程处于聊天驱动的流程中,由Agent处理Swiggy商品发现、购物车设置、Prava授权、浏览器结账及卡支付操作。切勿在聊天中向用户索要原始卡信息、助记词、银行凭证或一次性验证码(OTP)。

Required References

必要参考文档

  • Read setup.md when Swiggy MCP or Prava is not already configured, or when the user asks to install/setup the flow.
  • Read checkout-protocol.md before adding to cart, creating a Prava session, or entering tokenized card details into Swiggy.
  • 当Swiggy MCP或Prava尚未配置,或用户要求安装/设置该流程时,请阅读setup.md
  • 在添加商品到购物车、创建Prava会话或在Swiggy中输入令牌化卡凭证之前,请阅读checkout-protocol.md

Operating Rules

操作规则

  1. Keep the user in chat for decisions. Do not send them to the Swiggy app/website for manual search, cart editing, or checkout unless browser/MCP access is unavailable.
  2. Use Swiggy MCP for address discovery, restaurant/menu search, cart updates, and cart reads.
  3. Treat MCP checkout as incomplete for Prava/card payments. Swiggy MCP can add/review carts and may place pay-on-delivery orders, but Prava card payment requires browser automation.
  4. Ask for browser automation access before creating the Prava session. Prefer the Codex in-app browser. If the user is already logged in elsewhere, ask for permission to control that browser/session in the current environment.
  5. Use Prava only after the cart, cap, and browser path are confirmed. The Prava session amount is the user-approved cap or exact cart total, in INR unless the user approves another currency.
  6. Use browser automation only for checkout steps Swiggy MCP does not expose, especially selecting card payment and entering Prava tokenized credentials.
  7. Stop and ask before transmitting tokenized card credentials to Swiggy unless the user has already explicitly confirmed that exact payment action in the current flow.
  8. Do not save the card on Swiggy unless the user explicitly requests it. If "save/secure this card" is selected by default, uncheck it before paying when possible. Prefer any "continue without saving" path.
  9. If Swiggy or the payment gateway offers multiple charge currencies, choose the currency the user approved for Prava.
  10. Follow payment gateway screens after the user has approved the payment, but pause for OTP/3DS/passkey/user-auth challenges. Do not ask the user to paste OTPs into chat.
  11. After checkout, report only non-sensitive facts: order id, merchant, items, total, payment status, address label, and ETA. Never print the full token or cryptogram.
  1. 让用户全程通过聊天进行决策。除非浏览器/MCP访问不可用,否则不要引导用户前往Swiggy应用/网站进行手动搜索、编辑购物车或结账操作。
  2. 使用Swiggy MCP进行地址查询、餐厅/菜单搜索、购物车更新及购物车查看。
  3. 对于Prava/卡支付而言,MCP结账流程并不完整。Swiggy MCP可添加/查看购物车,也可处理货到付款订单,但Prava卡支付需要浏览器自动化操作。
  4. 在创建Prava会话之前,需请求浏览器自动化访问权限。优先使用Codex内置浏览器。如果用户已在其他地方登录,需请求许可以在当前环境中控制该浏览器/会话。
  5. 仅在购物车、支付上限及浏览器路径确认后,方可使用Prava。Prava会话金额为用户批准的上限或购物车精确总价,默认使用印度卢比(INR),除非用户批准使用其他货币。
  6. 仅对Swiggy MCP未开放的结账步骤使用浏览器自动化,尤其是选择卡支付方式和输入Prava令牌化凭证的步骤。
  7. 除非用户在当前流程中已明确确认该具体支付操作,否则在向Swiggy传输令牌化卡凭证前需暂停并询问用户。
  8. 除非用户明确要求,否则不要在Swiggy上保存卡片信息。如果默认选中“保存/安全存储此卡”选项,尽可能在付款前取消勾选。优先选择“不保存继续”的路径。
  9. 如果Swiggy或支付网关提供多种收费货币,请选择用户批准用于Prava的货币。
  10. 用户批准支付后,遵循支付网关的界面流程,但遇到OTP/3DS/密钥/用户身份验证挑战时需暂停。切勿要求用户在聊天中粘贴OTP。
  11. 结账完成后,仅报告非敏感信息:订单ID、商家名称、商品明细、总价、支付状态、地址标签及预计送达时间(ETA)。切勿打印完整令牌或密码。

Workflow

工作流程

1. First-time setup

1. 首次设置

If the user asks to set up this flow, or Swiggy/Prava tools are missing, follow setup.md. After installing MCP servers or skills, verify whether the current agent session can see the new tools. If not, use a fresh Codex subprocess or ask the user to restart/open a new agent session.
如果用户要求设置该流程,或Swiggy/Prava工具缺失,请遵循setup.md的指引。安装MCP服务器或技能后,验证当前Agent会话是否能识别新工具。如果不能,请使用新的Codex子进程,或要求用户重启/打开新的Agent会话。

2. Address selection

2. 地址选择

Use Swiggy MCP
get_addresses
. Match the user-provided saved address label exactly when possible. If the user says a nickname like "special person's PG", find the closest saved label and confirm only if there is ambiguity.
使用Swiggy MCP的
get_addresses
接口。尽可能精确匹配用户提供的已保存地址标签。如果用户使用昵称(如“特殊朋友的宿舍”),请查找最接近的已保存标签,仅在存在歧义时向用户确认。

3. Product selection and cart confirmation

3. 商品选择与购物车确认

Use Swiggy MCP search/menu tools to resolve the restaurant, item, variant, quantity, and required customizations. Do not substitute a restaurant, item, size, or variant without asking.
Before payment, show:
  • Address label and restaurant
  • Item(s), quantity, variant/customizations
  • Item total, taxes/fees, delivery fee, and total to pay
  • ETA if available
Ask for confirmation to proceed to browser checkout and Prava if the user has not already approved the cart, cap, and browser access.
使用Swiggy MCP的搜索/菜单工具确定餐厅、商品、规格、数量及所需定制选项。未经询问,不得替换餐厅、商品、尺寸或规格。
付款前,需向用户展示:
  • 地址标签及餐厅名称
  • 商品明细、数量、规格/定制选项
  • 商品总价、税费/服务费、配送费及应付总额
  • 若有,显示预计送达时间(ETA)
如果用户尚未批准购物车、支付上限及浏览器访问权限,请询问用户是否确认进入浏览器结账及Prava支付环节。

4. Browser access preflight

4. 浏览器访问预检

Before creating the Prava session, establish the checkout browser path:
  • Use the Codex in-app browser when available.
  • If the user has a logged-in browser session, ask for permission to control that browser in the current environment.
  • Open
    https://www.swiggy.com/checkout
    and verify the cart/address can be reached.
  • If the browser is not logged in, ask the user to log in inside that browser and continue after they confirm.
Do not create the Prava token until the browser route is ready, because the token is short-lived.
在创建Prava会话之前,需确定结账浏览器路径:
  • 若可用,优先使用Codex内置浏览器。
  • 如果用户已有登录的浏览器会话,需请求许可以在当前环境中控制该浏览器。
  • 打开
    https://www.swiggy.com/checkout
    并验证是否可访问购物车/地址。
  • 如果浏览器未登录,请要求用户在该浏览器中登录,待用户确认后继续操作。
切勿在浏览器路径准备就绪前创建Prava令牌,因为令牌有效期较短。

5. Prava authorization

5. Prava授权

Use Prava CLI to create a Swiggy session after cart confirmation. The merchant fields are:
bash
--merchant-name "Swiggy" \
--merchant-url "https://www.swiggy.com" \
--merchant-country IN
Show the Prava approval URL in chat, then immediately poll. After tokenization, proceed directly to Swiggy checkout because credentials expire quickly.
购物车确认后,使用Prava CLI创建Swiggy会话。商家字段如下:
bash
--merchant-name "Swiggy" \
--merchant-url "https://www.swiggy.com" \
--merchant-country IN
在聊天中展示Prava批准URL,随后立即轮询。令牌化完成后,需直接进入Swiggy结账流程,因为凭证有效期极短。

6. Swiggy card checkout

6. Swiggy卡结账

Open
https://www.swiggy.com/checkout
in the controllable browser. If the user is not logged in, ask them to log in there and continue after they confirm.
Verify the page still shows the same cart, address, and a total that is less than or equal to the Prava cap. Select the delivery address or continue with the already selected address, proceed to payment, choose card/add new card, enter the Prava token as the card number, cryptogram as CVV, and expiry as shown by Prava. Use a reasonable cardholder name from the user's Swiggy account header if visible; otherwise ask.
Before submitting, ensure the card is not saved. Submit payment, choose the user-approved currency if asked, continue through the payment gateway, and wait for either order tracking or an authentication challenge.
在可控浏览器中打开
https://www.swiggy.com/checkout
。如果用户未登录,请要求用户在该浏览器中登录,待用户确认后继续操作。
验证页面是否仍显示相同的购物车、地址,且总价小于等于Prava支付上限。选择配送地址或继续使用已选地址,进入支付环节,选择卡支付/添加新卡,将Prava令牌作为卡号输入,密码作为CVV输入,有效期按Prava显示的填写。如果用户Swiggy账户头像旁显示合理的持卡人姓名,则使用该姓名;否则询问用户。
提交前,确保未勾选保存卡片选项。提交支付,若被询问则选择用户批准的货币,继续完成支付网关流程,等待订单跟踪信息或身份验证挑战。