lobstercash

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Lobster Cash CLI Skill

Lobster Cash CLI Skill

The Lobster Cash CLI (
lobstercash
) gives AI agents payment tools — a blockchain wallet, virtual cards for buying anything online, cloud browser automation for browsing sites and completing checkout, and x402 protocol support for paying APIs — all with human approval in the loop. Use
lobstercash <command> --help
for full flag details on any command.
Lobster Cash CLI(
lobstercash
)为AI agents提供支付工具:区块链钱包、可用于线上购买任意商品的虚拟卡、用于浏览网站和完成结账的云浏览器自动化能力,以及支持x402协议的API支付能力,全程都有人工审批环节。对任意命令使用
lobstercash <command> --help
可查看完整的参数说明。

Installation

安装

Install globally:
bash
npm install -g @crossmint/lobster-cli
After installation, all commands are available via the
lobstercash
binary.
全局安装:
bash
npm install -g @crossmint/lobster-cli
安装完成后,所有命令都可以通过
lobstercash
二进制文件调用。

Steps to use this skill

使用此skill的步骤

1. Version check (automatic)

1. 版本检查(自动执行)

The CLI automatically checks for updates on every API call. If an update notice appears in the command output, tell the user and offer to run
npm update -g @crossmint/lobster-cli
. If the notice says the update is required, you must also update the skill from https://www.lobster.cash/install before continuing. Do not run separate version-check commands.
CLI每次调用API时都会自动检查更新。如果命令输出中出现更新提示,告知用户并主动提供运行
npm update -g @crossmint/lobster-cli
的选项。如果提示说明更新是必需的,你还必须先从https://www.lobster.cash/install 更新skill之后才能继续操作。不要单独运行版本检查命令。

2. Select lobstercash agent to use

2. 选择要使用的lobstercash agent

Every lobstercash command operates on the active agent. Before doing anything else, make sure the right agent is selected.
bash
lobstercash agents list
Then follow this decision tree:
  1. You see yourself in the list and it says
    (active)
    → You're good. Move on.
  2. You see yourself in the list but it's NOT active → Run
    lobstercash agents set-active <agentId>
    with the matching ID, then move on.
  3. No agent matches you (or the list is empty) → Register a new one. Read the agents reference for how to register one.
How to recognize yourself: Match by name. If you are Claude Code, look for an agent named "Claude Code" or similar. Same for Cursor, Codex, Gemini, etc. If you aren't sure, ask the user which agent to use.
所有lobstercash命令都作用于活跃agent。在执行任何其他操作前,请确保已选中正确的agent。
bash
lobstercash agents list
然后按照以下决策树操作:
  1. 你在列表中,且状态显示为
    (active)
    → 无需操作,进入下一步。
  2. 你在列表中,但不是活跃状态 → 使用匹配的ID运行
    lobstercash agents set-active <agentId>
    ,然后进入下一步。
  3. 列表中没有匹配你的agent(或列表为空)→ 注册新的agent。阅读agents参考文档了解注册方式。
如何识别你自己: 通过名称匹配。如果你是Claude Code,就查找名为“Claude Code”或类似名称的agent。Cursor、Codex、Gemini等同理。如果你不确定,询问用户要使用哪个agent。

3. Route based on the user's intent

3. 根据用户意图分流

Determine which scenario applies and follow the corresponding section:
  • A) Buy something online (product, subscription, domain, service) → Buy with a card
  • B) Pay for a paid API endpoint (x402 protocol) → Pay an API with x402
  • C) Anything else (check balance, send crypto, view status, link wallet, browse examples) → Other actions

判断适用的场景,按照对应的章节操作:
  • A) 在线购买商品(产品、订阅、域名、服务)→ 用卡购买
  • B) 支付付费API接口费用(x402协议)→ 用x402支付API费用
  • C) 其他场景(查询余额、发送加密货币、查看状态、关联钱包、浏览示例)→ 其他操作

A) Buy something with a card

A) 用卡购买商品

Use when the user wants to purchase a product, subscription, domain, or any item from an online store checkout.
Virtual cards are backed by the user's credit card — no USDC or wallet funding needed. This is the fastest payment path.
当用户需要购买产品、订阅、域名或任何在线商店的商品时使用此流程。
虚拟卡由用户的信用卡提供支持,无需USDC或钱包充值,是最快的支付路径。
Step 1: Request a virtual card
步骤1:申请虚拟卡
bash
lobstercash cards request --amount <amount> --description "<what it's for>"
Extract the amount and description from context — don't ask if the user already told you (e.g. "buy me a $25 AWS credit" →
--amount 25 --description "AWS credits"
).
This command handles everything — if the wallet isn't configured yet, it bundles setup automatically.
bash
lobstercash cards request --amount <amount> --description "<what it's for>"
从上下文提取金额和描述,如果用户已经告知就不要重复询问(比如用户说“给我买一张25美元的AWS充值卡” →
--amount 25 --description "AWS credits"
)。
这个命令会处理所有流程,如果钱包还未配置,它会自动打包完成设置。
Step 2: Get user approval
步骤2:获取用户审批
The command outputs an
approvalUrl
. Show it to the user:
To create this card I need your approval. Open this link:
[approvalUrl]
Come back here when you've approved it.
Do not proceed until the user confirms they approved. Do not poll.
命令会输出一个
approvalUrl
,展示给用户:
我需要你的审批才能创建这张卡,请打开此链接:
[approvalUrl]
审批完成后回到这里。
在用户确认完成审批前不要继续操作,不要轮询检查状态。
Step 3: Verify and get card credentials
步骤3:验证并获取卡凭证
After approval, list cards and get the credentials for checkout:
bash
lobstercash cards list
lobstercash cards reveal --card-id <id> --merchant-name "<store>" --merchant-url "<https://...>" --merchant-country <XX>
The
card-id
comes from the
cards list
output. Merchant details must be real — extract from the purchase context, don't invent them.
Product discovery with browser: When the user wants to buy something (e.g. "buy me running socks"), do NOT guess product URLs or category paths from your training data. Instead, discover real URLs first:
  1. Web search to find the right page: search for "running socks site:nike.com" or "best running socks to buy online" to get real, current URLs
  2. Open the best result:
    lobstercash browser open "https://nike.com/w/running-socks-7ny3qzy7ok"
    (use the URL from the search result, not a guess)
  3. Extract products from the page:
    lobstercash browser extract "product names, prices, and links"
  4. Present the real results to the user and let them pick
If the user hasn't specified a merchant, web search to find good options first. If no good search results, fall back to opening the merchant's homepage and navigating from there:
bash
lobstercash browser open "https://nike.com"
lobstercash browser act "search for running socks"
Never invent URLs or paths from your training data. Always get URLs from web search results or by navigating the site's own UI. URL structures differ across every site and change frequently.
Once the user picks something (or if they came in already knowing what they want), route to one of the branches below.
审批通过后,列出卡片并获取结账所需的凭证:
bash
lobstercash cards list
lobstercash cards reveal --card-id <id> --merchant-name "<store>" --merchant-url "<https://...>" --merchant-country <XX>
card-id
来自
cards list
的输出。商户信息必须真实,从购买场景的上下文中提取,不要虚构。
浏览器商品发现: 当用户想要购买某样东西时(比如“给我买跑步袜”),不要根据你的训练数据猜测商品URL或分类路径,而是先找到真实的URL:
  1. 网页搜索找到正确的页面:搜索“running socks site:nike.com”或者“best running socks to buy online”获取真实有效的最新URL
  2. 打开最佳搜索结果
    lobstercash browser open "https://nike.com/w/running-socks-7ny3qzy7ok"
    (使用搜索结果的URL,不要猜测)
  3. 从页面提取商品信息
    lobstercash browser extract "product names, prices, and links"
  4. 把真实的结果展示给用户,让他们选择。
如果用户没有指定商户,先通过网页搜索找到合适的选项。如果没有合适的搜索结果,退而求其次打开商户首页,从首页开始导航:
bash
lobstercash browser open "https://nike.com"
lobstercash browser act "search for running socks"
永远不要根据训练数据虚构URL或路径,始终从网页搜索结果或者网站本身的UI导航获取URL。每个网站的URL结构都不一样,而且经常变动。
用户选好商品后(或者用户已经明确知道自己要买什么),进入以下分支之一。
Step 4: Complete the purchase
步骤4:完成购买
Use the revealed card number, CVC, and expiry to fill in the checkout form. Treat these values as sensitive — don't log them unnecessarily.
See cards request reference for full output format, and cards reference for listing, revealing, and card phases.

使用解密得到的卡号、CVC和有效期填写结账表单。这些属于敏感信息,不要不必要地输出日志。
查看卡片申请参考文档了解完整的输出格式,查看卡片参考文档了解卡片列表、解密和卡片状态的相关内容。

B) Pay an API with x402

B) 用x402支付API费用

Use when the user wants to call a paid API endpoint that uses the x402 payment protocol. The CLI handles the payment negotiation automatically: the server returns HTTP 402, the CLI pays with USDC from the agent wallet, and the server returns the content.
当用户需要调用使用x402支付协议的付费API接口时使用此流程。CLI会自动处理支付协商:服务器返回HTTP 402,CLI使用agent钱包中的USDC支付,然后服务器返回内容。

Step 1: Ensure the wallet has funds

步骤1:确认钱包有足够余额

bash
lobstercash status
Route based on the result:
  • Wallet configured + has enough funds → proceed to step 2.
  • Wallet configured + insufficient funds → run
    lobstercash crypto deposit --amount <needed> --description "<description>"
    to top up, show the approval URL, wait for user confirmation, then proceed.
  • Wallet not configured → run
    lobstercash crypto deposit --amount <needed> --description "<description>"
    (bundles wallet creation + deposit). Show the approval URL, wait for user confirmation, verify with
    lobstercash status
    , then proceed.
The
--description
must explain what the agent will spend the funds on — derive it from the user's task, not generic filler like "top up wallet".
See deposit reference for the full deposit flow.
bash
lobstercash status
根据结果分流:
  • 钱包已配置 + 余额充足 → 进入步骤2。
  • 钱包已配置 + 余额不足 → 运行
    lobstercash crypto deposit --amount <needed> --description "<description>"
    充值,展示审批URL,等待用户确认,然后继续。
  • 钱包未配置 → 运行
    lobstercash crypto deposit --amount <needed> --description "<description>"
    (会自动完成钱包创建+充值流程)。展示审批URL,等待用户确认,用
    lobstercash status
    验证后继续。
--description
必须说明agent会把资金用在什么地方,从用户的任务中推导,不要用“给钱包充值”这类通用描述。
查看充值参考文档了解完整的充值流程。

Step 2: Fetch the paid endpoint

步骤2:请求付费接口

bash
lobstercash crypto x402 fetch <url>
For POST requests add
--json '{"key": "value"}'
. For custom headers add
--header "Authorization: Bearer <token>"
.
Show the approval URL to the user, wait for them to confirm they approved, then list cards to get the card ID. See request card reference for details and cards reference for listing/revealing credentials.
bash
lobstercash crypto x402 fetch <url>
对于POST请求添加
--json '{"key": "value"}'
。对于自定义请求头添加
--header "Authorization: Bearer <token>"
向用户展示审批URL,等待他们确认审批,然后列出卡片获取卡片ID。查看申请卡参考文档了解详情,查看卡片参考文档了解列出/解密凭证的相关内容。

Completing checkout with the browser

使用浏览器完成结账

After the card is created, use browser commands to complete the purchase. This is the recommended approach — the user can watch the browser session live via the provided URL.
  1. Open the merchant site (if not already in a browser session):
    bash
    lobstercash browser open "https://merchant.com/checkout"
    Share the
    Live view
    URL with the user so they can watch along.
  2. Navigate to checkout using natural-language actions:
    bash
    lobstercash browser act "add the item to cart"
    lobstercash browser act "go to checkout"
  3. Fill the payment form — card credentials are handled server-side and never reach the agent:
    bash
    lobstercash browser fill-card \
      --card-id <id> \
      --merchant-name "<name>" \
      --merchant-url "https://..." \
      --merchant-country US
  4. Fill shipping/billing details and review order:
    bash
    lobstercash browser act "fill in shipping address: ..."
    lobstercash browser screenshot
    Show the screenshot or ask the user to check the live view before placing the order.
  5. Place the order only after user confirms:
    bash
    lobstercash browser act "click place order"
  6. Close the session when done:
    bash
    lobstercash browser close
Important: Always share the live view URL with the user so they can watch the checkout. Before clicking "place order" or equivalent, ask the user to confirm — do not submit orders autonomously. Card credentials never leave the server; the
fill-card
command handles them securely.
See browser reference for all browser commands.
卡片创建完成后,使用浏览器命令完成购买,这是推荐的方式:用户可以通过提供的URL实时观看浏览器会话。
  1. 打开商户网站(如果还没有打开浏览器会话):
    bash
    lobstercash browser open "https://merchant.com/checkout"
    Live view
    URL分享给用户,让他们可以实时观看。
  2. 使用自然语言操作导航到结账页面
    bash
    lobstercash browser act "add the item to cart"
    lobstercash browser act "go to checkout"
  3. 填写支付表单:卡凭证由服务端处理,永远不会发送到agent端:
    bash
    lobstercash browser fill-card \
      --card-id <id> \
      --merchant-name "<name>" \
      --merchant-url "https://..." \
      --merchant-country US
  4. 填写配送/账单信息并核对订单
    bash
    lobstercash browser act "fill in shipping address: ..."
    lobstercash browser screenshot
    在下单前向用户展示截图,或者让用户查看实时预览页面确认。
  5. 仅在用户确认后下单
    bash
    lobstercash browser act "click place order"
  6. 完成后关闭会话
    bash
    lobstercash browser close
重要提示: 始终向用户分享实时预览URL,让他们可以查看结账过程。在点击“下单”或等效按钮前,必须请求用户确认,不要自动提交订单。卡凭证永远不会离开服务器,
fill-card
命令会安全处理这些信息。
查看浏览器参考文档了解所有浏览器命令。

Step 3: Report the result

步骤3:上报结果

Report what the API returned (the
body
field), not the payment mechanics. Only mention the payment if the user asks.
If the fetch fails, add
--debug
and run again. See x402 reference for output format and common failures.

上报API返回的内容(
body
字段),不要上报支付流程的细节。只有当用户询问时才提及支付相关内容。
如果请求失败,添加
--debug
参数重新运行。查看x402参考文档了解输出格式和常见失败原因。

C) Other actions

C) 其他操作

For everything else — checking balances, sending crypto, viewing wallet status, linking a wallet, or browsing examples — use the matching command from the Quick Reference below and read the corresponding reference file for details.
Run the command, report its output. For read-only commands (
crypto balance
,
status
,
examples
), execute them directly and report what they say. Do not pre-check status and construct your own summary — the CLI output already handles unconfigured states with clear messaging. If a command fails with exit code 2 (wallet not set up), tell the user and offer to run
lobstercash setup
or the appropriate setup-bundling command.
Common actions:
  • Check balance:
    lobstercash crypto balance
    balance reference
  • Send tokens:
    lobstercash crypto send --to <addr> --amount <n> --token usdc
    send reference
  • View wallet status:
    lobstercash status
    status reference
  • Browse examples:
    lobstercash examples
    examples reference
  • Link wallet / configure agent (setup only):
    lobstercash setup
    setup reference. Use when the user says "configure", "set up", "link wallet", or similar — and isn't trying to make a purchase.
  • Sign/submit a transaction:
    lobstercash crypto tx create
    tx reference
For crypto operations (
crypto send
,
crypto tx create
), always run
lobstercash status
first to confirm the wallet is configured and has sufficient funds. If not, use
lobstercash crypto deposit --amount <needed> --description "<description>"
to fund it — see deposit reference.
对于所有其他场景:查询余额、发送加密货币、查看钱包状态、关联钱包、浏览示例,使用下方快速参考中的对应命令,阅读对应的参考文档了解详情。
运行命令,上报它的输出。 对于只读命令(
crypto balance
status
examples
),直接执行并上报输出内容。不要提前检查状态自己构建摘要,CLI输出已经针对未配置状态给出了清晰的提示。如果命令退出码为2(钱包未设置),告知用户并主动提供运行
lobstercash setup
或对应打包设置命令的选项。
常见操作:
  • 查询余额:
    lobstercash crypto balance
    余额参考文档
  • 发送代币:
    lobstercash crypto send --to <addr> --amount <n> --token usdc
    发送参考文档
  • 查看钱包状态:
    lobstercash status
    状态参考文档
  • 浏览示例:
    lobstercash examples
    示例参考文档
  • 关联钱包/配置agent(仅设置用):
    lobstercash setup
    设置参考文档。当用户说“配置”、“设置”、“关联钱包”等类似内容,且不是要购买商品时使用。
  • 签署/提交交易:
    lobstercash crypto tx create
    交易参考文档
对于加密货币操作(
crypto send
crypto tx create
),始终先运行
lobstercash status
确认钱包已配置且余额充足。如果不满足条件,使用
lobstercash crypto deposit --amount <needed> --description "<description>"
充值,查看充值参考文档

Quick Reference

快速 Reference

bash
lobstercash agents register --name "<name>" --description "<desc>" --image-url "<url>"  # register a new agent
lobstercash agents list                                          # list all agents
lobstercash agents set-active <agentId>                          # set active agent
lobstercash examples                                             # browse working examples
lobstercash status                                               # check status & readiness & wallet address
lobstercash setup                                                # link agent to wallet (no purchase needed)
lobstercash crypto balance                                       # check balances
lobstercash crypto send --to <addr> --amount <n> --token usdc    # send tokens
lobstercash crypto x402 fetch <url>                              # pay for API
lobstercash crypto deposit --amount <n> --description "<desc>"    # request deposit / top up (bundles wallet setup)
lobstercash crypto tx create|approve|status                      # low-level transaction management
lobstercash cards request --amount <n> --description "<desc>"    # request virtual card
lobstercash cards list                                           # list cards (includes card-id)
lobstercash cards reveal --card-id <id> --merchant-name "..." --merchant-url "https://..." --merchant-country US  # checkout credentials
lobstercash browser open <url>                                   # start browser session, navigate to URL
lobstercash browser act "<instruction>"                          # perform action (e.g. "click add to cart")
lobstercash browser extract "<query>"                            # extract data (e.g. "product names and prices")
lobstercash browser observe                                      # list actionable elements on current page
lobstercash browser screenshot                                   # take a screenshot
lobstercash browser fill-card --card-id <id> --merchant-name "..." --merchant-url "https://..." --merchant-country US  # fill payment form (server-side)
lobstercash browser close                                        # close browser session
bash
lobstercash agents register --name "<name>" --description "<desc>" --image-url "<url>"  # register a new agent
lobstercash agents list                                          # list all agents
lobstercash agents set-active <agentId>                          # set active agent
lobstercash examples                                             # browse working examples
lobstercash status                                               # check status & readiness & wallet address
lobstercash setup                                                # link agent to wallet (no purchase needed)
lobstercash crypto balance                                       # check balances
lobstercash crypto send --to <addr> --amount <n> --token usdc    # send tokens
lobstercash crypto x402 fetch <url>                              # pay for API
lobstercash crypto deposit --amount <n> --description "<desc>"    # request deposit / top up (bundles wallet setup)
lobstercash crypto tx create|approve|status                      # low-level transaction management
lobstercash cards request --amount <n> --description "<desc>"    # request virtual card
lobstercash cards list                                           # list cards (includes card-id)
lobstercash cards reveal --card-id <id> --merchant-name "..." --merchant-url "https://..." --merchant-country US  # checkout credentials
lobstercash browser open <url>                                   # start browser session, navigate to URL
lobstercash browser act "<instruction>"                          # perform action (e.g. "click add to cart")
lobstercash browser extract "<query>"                            # extract data (e.g. "product names and prices")
lobstercash browser observe                                      # list actionable elements on current page
lobstercash browser screenshot                                   # take a screenshot
lobstercash browser fill-card --card-id <id> --merchant-name "..." --merchant-url "https://..." --merchant-country US  # fill payment form (server-side)
lobstercash browser close                                        # close browser session

Output Contract

输出约定

  • All commands produce human-readable output to stdout.
  • Errors go to stderr as plain text.
  • Exit 0 = success. Exit 1 = unexpected error. Exit 2 = wallet not set up (use
    cards request
    or
    crypto deposit
    to set up).
  • 所有命令的stdout输出都是人类可读的格式。
  • 错误以纯文本形式输出到stderr。
  • 退出码0 = 成功。退出码1 = 意外错误。退出码2 = 钱包未设置(使用
    cards request
    crypto deposit
    来设置)。

Decision Tree

决策树

  • Read examples if the user wants to browse working examples, or has no specific task yet
  • Read status if the user asks about agent status or payment readiness
  • Read balance if the user wants to check token balances
  • Read cards request if the user wants to request a virtual card for a purchase (Credit Card Path)
  • Read deposit if the user wants to deposit USDC, top up their wallet, or fund a crypto operation
  • Read cards if the user needs to list or reveal credentials for an existing virtual card
  • Read browser if the user wants to browse a website, complete a checkout, find products, or interact with a web page
  • Read send if the user wants to send tokens to an address (Crypto Path)
  • Read x402 if the user wants to pay for an API via x402 protocol (Crypto Path)
  • Read tx if the user needs to sign or submit a transaction from an external tool (Crypto Path)
  • Read setup if the user wants to link the agent to a wallet without making a purchase
  • Read agents if the user wants to register, list, or set the active agent
  • 如果用户想要浏览可用的示例,或者还没有明确的任务,阅读示例
  • 如果用户询问agent状态或支付 readiness,阅读状态
  • 如果用户想要查询代币余额,阅读余额
  • 如果用户想要申请虚拟卡用于购买(信用卡路径),阅读卡片申请
  • 如果用户想要存入USDC、给钱包充值,或者为加密货币操作注资,阅读充值
  • 如果用户需要列出或解密已有虚拟卡的凭证,阅读卡片
  • 如果用户想要浏览网站、完成结账、查找商品,或者和网页交互,阅读浏览器
  • 如果用户想要发送代币到某个地址(加密货币路径),阅读发送
  • 如果用户想要通过x402协议支付API费用(加密货币路径),阅读x402
  • 如果用户需要从外部工具签署或提交交易(加密货币路径),阅读交易
  • 如果用户想要关联agent和钱包但不需要购买商品,阅读设置
  • 如果用户想要注册、列出或设置活跃agent,阅读agents

Anti-Patterns

反模式

  • Running crypto commands without checking status first: Always run
    lobstercash status
    before
    crypto send
    ,
    crypto x402 fetch
    , or
    crypto tx create
    . If the wallet isn't configured or has insufficient funds, the command will fail with a confusing error. Check first, fund if needed, then execute.
  • Running setup when the user wants to buy something: If the user wants to make a purchase, don't run
    setup
    first — use
    cards request
    or
    crypto deposit
    which bundle setup automatically. Only use
    lobstercash setup
    when the user explicitly wants to link the agent to their wallet without buying anything.
  • Re-running setup when the agent is already configured: If
    lobstercash status
    shows the wallet is already configured, do not generate a new setup session. The existing configuration is valid. Only start a fresh setup if the user explicitly tells you their current configuration is broken and needs to be regenerated.
  • Asking the user for info the CLI can fetch: Check balance before sending. Check status before acting. Read command output before asking questions.
  • Running write commands in loops: One attempt, read the result, then decide. Read operations (
    crypto balance
    ,
    status
    ,
    examples
    ) are idempotent and safe to repeat. Write operations (
    crypto send
    ,
    cards request
    ) are not.
  • Ignoring terminal status: A pending transaction is not a success. All write commands now wait for on-chain confirmation by default.
  • Polling for HITL approval: When a command returns an approval URL, the user must tell you they approved. Do not auto-poll.
  • Running commands before registering an agent: Always ensure an agent exists via
    lobstercash agents list
    before running any other command. If you need to work with a different agent, use
    lobstercash agents set-active
    .
  • Recommending cards for crypto-only integrations: If the integration only uses crypto, don't suggest a virtual card.
  • Requiring USDC for card-supported integrations: Virtual cards are backed by credit cards, not USDC. Don't tell the user to "add funds" when the integration accepts cards.
  • Treating x402/send/tx as separate user flows: They all go through the same Crypto Path. The only split is credit card vs crypto.
  • Suggesting
    crypto deposit
    or
    cards request
    when the user just wants to connect:
    If the user wants to check balance, run a crypto command, or simply link their wallet — without topping up or creating a card — guide them through
    lobstercash setup
    first. Don't jump to
    crypto deposit
    or
    cards request
    unless the user actually wants to fund the wallet or make a purchase.
  • Jumping to readiness checks before showing options: Show what's available first (via
    examples
    ), then check payment readiness only when the user wants to try one.
  • Assuming an integration's payment method: Never guess whether a flow uses cards or crypto. Run
    lobstercash status
    and read the payment methods output before choosing a path.
  • Hallucinating product URLs or paths: Never guess URLs beyond the root domain. You cannot know the correct path structure for any website —
    /w/socks
    ,
    /category/socks
    ,
    /shop/socks
    are all guesses. Always
    browser open
    the homepage (
    https://example.com
    ), then use
    browser act
    to search or navigate the site's own UI to find products.
  • Placing orders without user confirmation: Always ask the user to confirm before clicking "place order" or similar. Show a screenshot or remind them to check the live view URL.
  • Revealing card credentials manually when using browser checkout: Use
    browser fill-card
    instead of
    cards reveal
    . The fill-card command handles credentials server-side so they never reach the agent. Only use
    cards reveal
    when the user needs to manually paste credentials into a site you can't browser-automate.
  • Forgetting to share the live view URL: When opening a browser session, always tell the user the live view URL so they can watch what's happening.
  • Running browser commands without an open session: All browser commands except
    open
    require an active session. If no session exists, run
    browser open
    first.
  • Leaving browser sessions open: Close sessions with
    browser close
    when checkout is done. Sessions consume resources on the provider.
  • 不先检查状态就运行加密货币命令: 始终在运行
    crypto send
    crypto x402 fetch
    crypto tx create
    前运行
    lobstercash status
    。如果钱包未配置或余额不足,命令会返回令人困惑的错误。先检查,需要的话先充值,再执行。
  • 用户想要买东西时运行setup命令: 如果用户要购买商品,不要先运行
    setup
    ,使用
    cards request
    crypto deposit
    ,它们会自动打包完成设置。只有当用户明确想要关联agent和钱包但不需要购买任何东西时才使用
    lobstercash setup
  • agent已经配置时重复运行setup: 如果
    lobstercash status
    显示钱包已经配置,不要生成新的设置会话,现有配置是有效的。只有当用户明确告知当前配置损坏需要重新生成时才重新设置。
  • 向用户询问CLI可以获取的信息: 发送前先查余额,操作前先查状态,询问问题前先读命令输出。
  • 循环运行写操作命令: 尝试一次,读取结果,再做决策。读操作(
    crypto balance
    status
    examples
    )是幂等的,可以安全重复。写操作(
    crypto send
    cards request
    )不是。
  • 忽略终端状态: 待处理的交易不等于成功。所有写操作现在默认会等待链上确认。
  • 轮询检查人工审批状态: 当命令返回审批URL时,必须等用户告知已经审批,不要自动轮询。
  • 注册agent前就运行其他命令: 运行任何其他命令前始终通过
    lobstercash agents list
    确认agent存在。如果需要使用不同的agent,使用
    lobstercash agents set-active
  • 给仅支持加密货币的集成推荐卡片: 如果集成只使用加密货币,不要推荐虚拟卡。
  • 要求支持卡片的集成使用USDC: 虚拟卡由信用卡提供支持,不是USDC。当集成支持卡片时不要告诉用户“充值”。
  • 把x402/send/tx当成不同的用户流程: 它们都走相同的加密货币路径,唯一的分支是信用卡还是加密货币。
  • 用户仅想连接钱包时推荐
    crypto deposit
    cards request
    如果用户想要查询余额、运行加密货币命令,或者只是关联钱包,不需要充值或创建卡,先引导用户完成
    lobstercash setup
    。除非用户确实想要给钱包充值或购买商品,否则不要直接跳转到
    crypto deposit
    cards request
  • 展示选项前就跳转到就绪检查: 先(通过
    examples
    )展示可用的功能,只有当用户想要尝试某个功能时再检查支付就绪状态。
  • 假设集成的支付方式: 永远不要猜测流程使用卡片还是加密货币,先运行
    lobstercash status
    读取支付方式输出再选择路径。
  • 虚构商品URL或路径: 永远不要猜测根域名之外的URL。你不可能知道任何网站的正确路径结构——
    /w/socks
    /category/socks
    /shop/socks
    都是猜测。始终
    browser open
    首页(
    https://example.com
    ),然后使用
    browser act
    搜索或通过网站自身的UI导航找到商品。
  • 未经用户确认就下单: 点击“下单”或等效按钮前始终请求用户确认,展示截图或者提醒用户查看实时预览URL。
  • 使用浏览器结账时手动解密卡凭证: 使用
    browser fill-card
    代替
    cards reveal
    。fill-card命令在服务端处理凭证,永远不会发送到agent端。只有当用户需要手动把凭证粘贴到你无法用浏览器自动化的网站时才使用
    cards reveal
  • 忘记分享实时预览URL: 打开浏览器会话时,始终告知用户实时预览URL,让他们可以查看正在发生的操作。
  • 没有打开会话就运行浏览器命令: 除了
    open
    之外的所有浏览器命令都需要活跃会话。如果没有会话,先运行
    browser open
  • 不关闭浏览器会话: 结账完成后使用
    browser close
    关闭会话,会话会消耗服务商的资源。