简介
异步购物助手,利用1Password安全自动填充跨站比价并自动结账,主对话保持流畅不卡顿
原始描述
Asynchronous shopping research + checkout using secure-autofill (1Password-backed browser filling) with results recorded to workspace artifacts.
通过你的 Agent 添加
安装目录:secure-shopper/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
secure-shopper 是一款面向在线购物场景的异步 AI 代理技能,专为需要跨平台比价、筛选并最终完成安全结账的用户设计。其核心工作流程分为四个阶段:
- 任务接收与配置覆盖 — 用户描述购物需求(如"找一款50美元以下的蓝牙耳机"),运行时指令可覆盖预设配置
- 异步浏览与候选采集 — 通过
sessions_spawn启动子代理,在 Amazon、Walmart、Target 等配置站点并行搜索,每个站点提取 3-5 个候选商品 - 人机确认门控 — 汇总候选商品(价格、评分、配送信息)后,强制要求用户以 "Accept A / Deny B" 格式明确决策
- 安全自动结账 — 用户二次确认后,调用 secure-autofill 技能(1Password 背书)自动填充支付/配送信息完成下单
关键技术特性
- 上下文安全浏览:强制使用
compact=true 快照、搜索优先入口(而非首页)、增量提取(每轮3条),防止电商大页面触发 token 溢出
- 1Password 集成:凭证填充通过
vault_suggest / vault_fill 工具完成,代理全程不接触明文密码
- 状态机驱动:JSON 产物记录
phase 状态(candidates_found → awaiting_accept_deny → awaiting_checkout_confirm → ordered),确保流程可审计、可恢复
显著优点
- 隐私优先设计:支付信息由 1Password 本地 vault 管理,符合零信任架构
- 非阻塞体验:浏览任务异步执行,用户可同时与主会话交互
- 防冲动消费机制:双重确认门控(候选接受 + 结账确认)避免误操作
- 上下文智能保护:多层防御(搜索优先、紧凑快照、渐进提取、溢出回退)应对电商网站的"无限滚动"陷阱
潜在局限与风险
局限
说明
站点兼容性
依赖非 headless Chrome,部分网站(如 Costco、部分银行支付页)可能阻止自动化
MFA 中断
结账时的短信/邮件二次验证需人工介入,无法完全自动化
价格漂移
异步浏览期间(数分钟级)价格或库存可能变化,产物以快照时间为准
地区锁定
配送地址与站点区域需匹配(如 Amazon.com vs Amazon.co.jp),配置错误会导致结账失败
1Password 依赖
若用户未配置 secure-autofill 或未登录 1Password,整个结账流程阻断
适合人群
- 注重隐私的频繁网购者:不愿将信用卡信息存储在浏览器或电商账户中
- 比价型买家:需在多平台间权衡价格、配送速度、评分
- AI 辅助决策接受者:愿意让代理完成信息收集,但坚持最终决策权
常规风险
- 配置泄露风险:
config.json 中的位置信息(zip code)若未妥善权限管理,可能暴露用户大致地理区域
- 会话劫持:虽然密码由 1Password 填充,但登录后的 session cookie 仍可能被恶意扩展读取(标准浏览器风险,非本技能特有)
- 产物残留:购物历史 JSON 存储于本地 workspace,多用户系统需确保文件权限隔离
compact=true 快照、搜索优先入口(而非首页)、增量提取(每轮3条),防止电商大页面触发 token 溢出vault_suggest / vault_fill 工具完成,代理全程不接触明文密码phase 状态(candidates_found → awaiting_accept_deny → awaiting_checkout_confirm → ordered),确保流程可审计、可恢复- 隐私优先设计:支付信息由 1Password 本地 vault 管理,符合零信任架构
- 非阻塞体验:浏览任务异步执行,用户可同时与主会话交互
- 防冲动消费机制:双重确认门控(候选接受 + 结账确认)避免误操作
- 上下文智能保护:多层防御(搜索优先、紧凑快照、渐进提取、溢出回退)应对电商网站的"无限滚动"陷阱
潜在局限与风险
局限
说明
站点兼容性
依赖非 headless Chrome,部分网站(如 Costco、部分银行支付页)可能阻止自动化
MFA 中断
结账时的短信/邮件二次验证需人工介入,无法完全自动化
价格漂移
异步浏览期间(数分钟级)价格或库存可能变化,产物以快照时间为准
地区锁定
配送地址与站点区域需匹配(如 Amazon.com vs Amazon.co.jp),配置错误会导致结账失败
1Password 依赖
若用户未配置 secure-autofill 或未登录 1Password,整个结账流程阻断
适合人群
- 注重隐私的频繁网购者:不愿将信用卡信息存储在浏览器或电商账户中
- 比价型买家:需在多平台间权衡价格、配送速度、评分
- AI 辅助决策接受者:愿意让代理完成信息收集,但坚持最终决策权
常规风险
- 配置泄露风险:
config.json 中的位置信息(zip code)若未妥善权限管理,可能暴露用户大致地理区域
- 会话劫持:虽然密码由 1Password 填充,但登录后的 session cookie 仍可能被恶意扩展读取(标准浏览器风险,非本技能特有)
- 产物残留:购物历史 JSON 存储于本地 workspace,多用户系统需确保文件权限隔离
| 局限 | 说明 |
|---|---|
| 站点兼容性 | 依赖非 headless Chrome,部分网站(如 Costco、部分银行支付页)可能阻止自动化 |
| MFA 中断 | 结账时的短信/邮件二次验证需人工介入,无法完全自动化 |
| 价格漂移 | 异步浏览期间(数分钟级)价格或库存可能变化,产物以快照时间为准 |
| 地区锁定 | 配送地址与站点区域需匹配(如 Amazon.com vs Amazon.co.jp),配置错误会导致结账失败 |
| 1Password 依赖 | 若用户未配置 secure-autofill 或未登录 1Password,整个结账流程阻断 |
- 注重隐私的频繁网购者:不愿将信用卡信息存储在浏览器或电商账户中
- 比价型买家:需在多平台间权衡价格、配送速度、评分
- AI 辅助决策接受者:愿意让代理完成信息收集,但坚持最终决策权
常规风险
- 配置泄露风险:
config.json 中的位置信息(zip code)若未妥善权限管理,可能暴露用户大致地理区域
- 会话劫持:虽然密码由 1Password 填充,但登录后的 session cookie 仍可能被恶意扩展读取(标准浏览器风险,非本技能特有)
- 产物残留:购物历史 JSON 存储于本地 workspace,多用户系统需确保文件权限隔离
config.json 中的位置信息(zip code)若未妥善权限管理,可能暴露用户大致地理区域技能正文
name: secure-shopper
description: Asynchronous shopping research + checkout using secure-autofill (1Password-backed browser filling) with results recorded to workspace artifacts.
metadata:
openclaw:
emoji: "🛒"
secure-shopper 🛒
Find items across one or more shopping sites, summarize candidates, and (optionally) place the order using secure-autofill.
This skill is asynchronous: spawn a sub-agent for browsing so the main chat stays responsive.
Prerequisites
Required skills / plugin
- The secure-autofill skill exists at:
~/.openclaw/skills/secure-autofill/ - The secure-autofill plugin tools are available:
vault_suggestvault_fill
Inherit secure-autofill prerequisites
- A working non-headless Chrome (many shops block headless)
- Gateway environment has required env vars (per secure-autofill)
Concrete check:
command -v google-chrome || command -v google-chrome-stable
Configuration (portable)
Skill-local config files:
- Example (shareable, do not edit):
~/.openclaw/skills/secure-shopper/config.json.example - Real (machine-specific, written by onboarding):
~/.openclaw/skills/secure-shopper/config.json
Config keys:
goToSites[]: list of default shopping sites (e.g. Amazon, Walmart)location.ziporlocation.address: used for shipping/availability contextpreferences.priority: one of:relevancycheaperfasterreviews
preferences.maxCandidatesPerSite: cap per site (default 5)preferences.safeBrowsing: guardrails to avoid oversized pages / context overflow (applies to all sites)startFromSearch:true|false(default true) — prefer a site’s search results page over the homepage/product pagesmaxCandidatesPerPass: number (default 3) — extract a few items at a time (then paginate/scroll)snapshot: limits forbrowser.snapshotcompact: boolean (default true)depth: number (default 6)maxChars: number (default 12000)
fallback: what to do oncontext_length_exceededretryWithTighterSnapshot: boolean (default true)switchToSearchUrl: boolean (default true)
Initialization / installation / onboarding
Preferred (chat-first)
Ask Boss and then write config.json:
-
Go-to shopping website(s)
- Examples: Amazon, Walmart, Target
- Store into
goToSites[]
-
Zip code OR proximity address
- Store into
location.zipand/orlocation.address
- Store into
-
Preferences
- Ask for priority: relevancy vs cheaper vs faster delivery vs higher review scores
- Store into
preferences.priority(+ optional notes)
After collecting answers, update the real config file.
Optional helper (terminal):
node ~/.openclaw/skills/secure-shopper/scripts/onboard.mjs \
--sites 'Amazon=https://www.amazon.com|Walmart=https://www.walmart.com' \
--zip 46202 \
--priority cheaper
How it works (agent behavior contract)
0) Require a shopping description
The user must provide a description of their shopping task.
- If they didn’t: stop and ask for it.
1) Honor runtime user prompts
Runtime user instructions (the user’s message for this run) override stored config.
Examples of runtime overrides:
- “Use Target instead of Amazon.”
- “Only show Prime-eligible.”
- “Budget under $50.”
2) Login via secure-autofill (skip if already logged in)
- Use the configured go-to sites, unless the runtime prompt specifies a site.
- If the site session appears already authenticated: skip login.
- Otherwise, use secure-autofill login flow:
browser.snapshot to get refs
vault_suggest/vault_fill to fill credentials
3) Make the browsing asynchronous
browser.snapshotto get refsvault_suggest/vault_fillto fill credentials
Immediately after accepting the task, respond with something like:
I’m en route to the stores. I’ll notify you when I find the best matches.
Then spawn a sub-agent so the main session is not interrupted.
Implementation note:
- Use
sessions_spawnwith a task that includes the shopping description and any runtime overrides.
4) Browse + identify candidates
The sub-agent browses each chosen site, searches, filters, and identifies candidates that fit the user description.
Context-safe browsing (ALL shopping sites)
Many shopping sites can produce extremely large pages/snapshots. To avoid context_length_exceeded failures:
- Prefer starting from a search results URL (or the site’s search box) rather than the homepage.
- Use small snapshots:
browser.snapshot(..., compact=true)- keep
depthmodest (e.g., 4–8) - set
maxCharsand/or target a specific container when possible
- Extract incrementally:
- grab top ~3 candidates, record them, then paginate/scroll and repeat until
maxCandidatesPerSiteis met
- grab top ~3 candidates, record them, then paginate/scroll and repeat until
- If a snapshot still overflows:
- retry with a tighter snapshot (smaller depth / smaller region)
- switch to a search URL (
/search?q=...) and re-extract
- Do not “reason through” massive dumps. If the page is huge, reduce the page slice first.
Record results to:
/home/miles/.openclaw/workspace/artifacts/secure_shopping/{timestamp}_shopping_task.json
JSON requirements:
- Record:
userPrompt(shopping description)startTimeendTimephase(required):candidates_found|awaiting_accept_deny|awaiting_checkout_confirm|ordered
candidates[]
- Candidates for the same request must live under the same parent task.
- Each candidate must include:
price(string)reviewScore(string/number)urlverdict(short)status:pending|accepted|denied|shopped
Suggested candidate shape:
{
"site": "Amazon",
"title": "...",
"price": "$39.99",
"reviewScore": "4.6 (12,345)",
"url": "https://...",
"verdict": "Best value under $50; good reviews; ships tomorrow",
"status": "pending"
}
Helper module (optional): scripts/task_io.mjs.
5) Notify user + REQUIRE accept/deny (hard gate)
When browsing is done, you must:
- Set JSON
phase = "awaiting_accept_deny". - Translate the JSON into a human-friendly summary.
- In the same message, require an ACCEPT/DENY decision. Do not end the turn without the prompt.
Mandatory message template (copy this structure):
- Recommended pick: — — — <1-line why>
- Other options: (optional, 1–5 bullets)
- Choose: Reply with
A=accept/deny, B=accept/deny, ...(or “Accept A” / “Deny B”). - Next step: “If you accept one: do you want me to checkout, or stop at ready-to-buy?”
Hard rule:
- If you listed candidates/links but did not include an explicit Choose (ACCEPT/DENY) line, the output is invalid and must be rewritten before sending.
6) Apply accept/deny updates
Once the user replies:
- Update each candidate
statustoacceptedordenied. - Confirm the accepted candidate(s).
- Set JSON
phase:awaiting_checkout_confirmif at least one is accepted and checkout is not yet confirmed- keep
awaiting_accept_denyif the user’s response is ambiguous / incomplete
7) Checkout (only after explicit confirmation)
Before you click any “Place order” / “Submit” equivalent:
- Ask for a clear confirmation like: “Confirm checkout for A? (yes/no)”
- Set JSON
phase = "awaiting_checkout_confirm"until confirmed.
If the user confirms checkout:
- Navigate to the accepted candidate’s URL
- Add to cart / proceed to checkout
- Use secure-autofill to input payment/shipping info and submit
If secure-autofill reports an error:
- Do not guess.
- Pass the error back to the user.
8) Mark as shopped
If the order is successfully placed:
- update that candidate’s
statustoshopped - set JSON
phase = "ordered"
Notes / guardrails
- Never paste secrets.
- Checkout flows often require MFA / SMS verification; ask the user when needed.
- Prefer fewer high-quality candidates over a long list.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。