amazon

TotalClaw 作者 totalclaw

使用浏览器自动化在亚马逊上购买和退货。用于采购、重新订购、检查订单历史记录和处理退货。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw skills install shop:totalclaw:totalclaw~brennerspear-amazon-shopper
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~brennerspear-amazon-shopper/file -o brennerspear-amazon-shopper.md
# Amazon Ordering

## Prerequisites

- `agent-browser` CLI installed
- Chrome running with `--remote-debugging-port=9222` (see [Starting the browser](#starting-the-browser-if-not-running))
- Logged into Amazon — if logged out, retrieve password from your password manager
- If running headless (Linux/VNC), forward the VNC port to verify visually: `ssh -L 6080:localhost:6080 <host>` → http://localhost:6080/vnc.html

## Setup

Set these environment variables or configure your defaults:

```bash
# Your default shipping address (verify on checkout)
export AMAZON_SHIPPING_ADDRESS="Your shipping address"
# Your preferred payment method description (verify on checkout)
export AMAZON_PAYMENT_METHOD="Your preferred card"
# Your preferred return drop-off location
export AMAZON_RETURN_DROPOFF="Whole Foods"
```

Always verify shipping address and payment method are correct before placing an order.

## Returns

### Default Answers (use unless user specifies otherwise)
- **Return reason:** "Changed Mind" → "My needs changed"
- **Packaging opened:** Yes
- **Item in original packaging:** Yes
- **Have you used the item:** Yes
- **Signs of use:** None
- **Battery leaks/overheating:** No
- **All accessories included:** Yes
- **Refund type:** Refund to original payment method (not replacement, not gift card)
- **Drop-off location:** Use `AMAZON_RETURN_DROPOFF` or Whole Foods

### Return Flow
1. Orders → Find item → "Return or replace items"
2. Select "Changed Mind" → "My needs changed" → Continue
3. Answer condition questions with defaults above
4. Continue past "Get Product Support" suggestions
5. Select "Refund to original payment method"
6. Select drop-off location
7. Confirm return
8. Done — QR code will be emailed

### Communication Style
- **Do NOT narrate each step** — just execute the whole return silently
- **Only message the user once it's confirmed** with a brief summary:
  - Item name
  - Refund amount
  - Drop-off location & deadline
- If something goes wrong or needs clarification, then ask

## Ordering Rules

### Reorders (items ordered before)
- Go directly to order history, search for item
- Click "Buy it again"
- Verify address and payment method
- **Place order without confirmation** — no screenshot needed

### New Items (never ordered before)
- Search or navigate to product
- **Send screenshot of product page** (scroll so price + product image visible, skip nav bars)
- Wait for user confirmation before adding to cart
- Verify address and payment method
- Place order after confirmation

## Workflow

### Connect to browser
```bash
agent-browser connect 9222
```

**Always open a new tab** — other sessions share the same Chrome. Use `--new-tab` on every `open` command.

### Search order history
```bash
agent-browser open "https://www.amazon.com/gp/your-account/order-history"
agent-browser snapshot -i
# Find search box, fill with item name, click search
```

### Reorder flow
```bash
# From order history search results
agent-browser click @[buy-it-again-ref]
# Wait for checkout page
agent-browser snapshot
# Verify correct address and payment method are selected
agent-browser click @[place-order-ref]
```

### Screenshot tips
- Scroll past nav bars before screenshotting
- Ensure price and product image are both visible
- Save screenshots to a temporary directory
- Send via message tool with caption

## Starting the browser (if not running)

**macOS** (opens a visible Chrome window):
```bash
open -na "Google Chrome" --args --user-data-dir=$HOME/.config/chrome-agent --no-first-run --remote-debugging-port=9222 https://www.amazon.com
```

**Linux** (headless with Xvfb/VNC):
```bash
DISPLAY=:99 google-chrome --user-data-dir=$HOME/.config/chrome-agent --no-first-run --remote-debugging-port=9222 https://www.amazon.com &
```

**Linux** (desktop/GUI session):
```bash
google-chrome --user-data-dir=$HOME/.config/chrome-agent --no-first-run --remote-debugging-port=9222 https://www.amazon.com &
```

## Notes

- Browser profile persists login at `$HOME/.config/chrome-agent`
- On headless Linux, VNC display is typically `:99` on port 5999 (noVNC on 6080)
- Order confirmations go to the email on your Amazon account
- CAPTCHAs or 2FA may require manual intervention — if the browser window is visible (macOS or Linux desktop), ask the user to solve it in the Chrome window

---

## 中文说明

# Amazon Ordering

## 前提条件

- 已安装 `agent-browser` CLI
- Chrome 以 `--remote-debugging-port=9222` 运行(参见[启动浏览器](#starting-the-browser-if-not-running))
- 已登录亚马逊——如果已登出,请从你的密码管理器中获取密码
- 如果以无头模式运行(Linux/VNC),请转发 VNC 端口以便进行可视化验证:`ssh -L 6080:localhost:6080 <host>` → http://localhost:6080/vnc.html

## 设置

设置以下环境变量或配置你的默认值:

```bash
# Your default shipping address (verify on checkout)
export AMAZON_SHIPPING_ADDRESS="Your shipping address"
# Your preferred payment method description (verify on checkout)
export AMAZON_PAYMENT_METHOD="Your preferred card"
# Your preferred return drop-off location
export AMAZON_RETURN_DROPOFF="Whole Foods"
```

在下单前,请始终验证收货地址和付款方式是否正确。

## 退货

### 默认答案(除非用户另有指定,否则使用)
- **退货原因:** "Changed Mind" → "My needs changed"
- **包装是否已打开:** 是
- **商品是否在原包装中:** 是
- **是否使用过该商品:** 是
- **使用痕迹:** 无
- **电池泄漏/过热:** 否
- **是否包含所有配件:** 是
- **退款类型:** 退回原付款方式(非换货、非礼品卡)
- **投递地点:** 使用 `AMAZON_RETURN_DROPOFF` 或 Whole Foods

### 退货流程
1. Orders → 找到商品 → "Return or replace items"
2. 选择 "Changed Mind" → "My needs changed" → Continue
3. 用上述默认答案回答状况问题
4. 跳过 "Get Product Support" 建议继续
5. 选择 "Refund to original payment method"
6. 选择投递地点
7. 确认退货
8. 完成——二维码将通过电子邮件发送

### 沟通风格
- **不要叙述每一步**——只需静默执行整个退货流程
- **仅在退货确认后**向用户发送一条简短的摘要消息:
  - 商品名称
  - 退款金额
  - 投递地点和截止日期
- 如果出现问题或需要澄清,则再行询问

## 下单规则

### 重新订购(之前订购过的商品)
- 直接前往订单历史记录,搜索商品
- 点击 "Buy it again"
- 验证地址和付款方式
- **无需确认即可下单**——无需截图

### 新商品(从未订购过)
- 搜索或导航到商品
- **发送商品页面截图**(滚动以使价格 + 商品图片可见,跳过导航栏)
- 在添加到购物车之前等待用户确认
- 验证地址和付款方式
- 确认后下单

## 工作流程

### 连接到浏览器
```bash
agent-browser connect 9222
```

**始终打开一个新标签页**——其他会话共享同一个 Chrome。在每个 `open` 命令上使用 `--new-tab`。

### 搜索订单历史
```bash
agent-browser open "https://www.amazon.com/gp/your-account/order-history"
agent-browser snapshot -i
# Find search box, fill with item name, click search
```

### 重新订购流程
```bash
# From order history search results
agent-browser click @[buy-it-again-ref]
# Wait for checkout page
agent-browser snapshot
# Verify correct address and payment method are selected
agent-browser click @[place-order-ref]
```

### 截图提示
- 在截图前滚动越过导航栏
- 确保价格和商品图片都可见
- 将截图保存到临时目录
- 通过消息工具发送并附上说明文字

## 启动浏览器(如果尚未运行)

**macOS**(打开一个可见的 Chrome 窗口):
```bash
open -na "Google Chrome" --args --user-data-dir=$HOME/.config/chrome-agent --no-first-run --remote-debugging-port=9222 https://www.amazon.com
```

**Linux**(使用 Xvfb/VNC 的无头模式):
```bash
DISPLAY=:99 google-chrome --user-data-dir=$HOME/.config/chrome-agent --no-first-run --remote-debugging-port=9222 https://www.amazon.com &
```

**Linux**(桌面/GUI 会话):
```bash
google-chrome --user-data-dir=$HOME/.config/chrome-agent --no-first-run --remote-debugging-port=9222 https://www.amazon.com &
```

## 注意事项

- 浏览器配置文件在 `$HOME/.config/chrome-agent` 处保持登录状态
- 在无头 Linux 上,VNC 显示通常为端口 5999 上的 `:99`(noVNC 在 6080 上)
- 订单确认会发送到你亚马逊账户上的电子邮箱
- 验证码(CAPTCHA)或双重验证(2FA)可能需要手动干预——如果浏览器窗口可见(macOS 或 Linux 桌面),请让用户在 Chrome 窗口中解决它