← 返回
效率工具 中文

Secure Shopper

Asynchronous shopping research + checkout using secure-autofill (1Password-backed browser filling) with results recorded to workspace artifacts.
异步购物调研 + 使用 1Password 安全自动填充结账,结果记录到工作区产物。
moodykong
效率工具 clawhub v0.1.0 1 版本 100000 Key: 无需
★ 1
Stars
📥 814
下载
💾 11
安装
1
版本
#latest

概述

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_suggest
  • vault_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.zip or location.address: used for shipping/availability context
  • preferences.priority: one of:
  • relevancy
  • cheaper
  • faster
  • reviews
  • 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 pages
  • maxCandidatesPerPass: number (default 3) — extract a few items at a time (then paginate/scroll)
  • snapshot: limits for browser.snapshot
  • compact: boolean (default true)
  • depth: number (default 6)
  • maxChars: number (default 12000)
  • fallback: what to do on context_length_exceeded
  • retryWithTighterSnapshot: boolean (default true)
  • switchToSearchUrl: boolean (default true)

Initialization / installation / onboarding

Preferred (chat-first)

Ask Boss and then write config.json:

1) Go-to shopping website(s)

  • Examples: Amazon, Walmart, Target
  • Store into goToSites[]

2) Zip code OR proximity address

  • Store into location.zip and/or location.address

3) 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

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_spawn with 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 depth modest (e.g., 4–8)
  • set maxChars and/or target a specific container when possible
  • Extract incrementally:
  • grab top ~3 candidates, record them, then paginate/scroll and repeat until maxCandidatesPerSite is met
  • 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)
  • startTime
  • endTime
  • phase (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)
  • url
  • verdict (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:

1) Set JSON phase = "awaiting_accept_deny".

2) Translate the JSON into a human-friendly summary.

3) 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: — <price> — <reviewScore> — <1-line why></li><li><strong>Other options:</strong> (optional, 1–5 bullets)</li><li><strong>Choose:</strong> Reply with <code>A=accept/deny, B=accept/deny, ...</code> (or “Accept A” / “Deny B”).</li><li><strong>Next step:</strong> “If you accept one: do you want me to checkout, or stop at ready-to-buy?”</li></ul><p>Hard rule:</p><ul><li>If you listed candidates/links but did not include an explicit <strong>Choose (ACCEPT/DENY)</strong> line, the output is invalid and must be rewritten before sending.</li></ul><h3>6) Apply accept/deny updates</h3><p>Once the user replies:</p><ul><li>Update each candidate <code>status</code> to <code>accepted</code> or <code>denied</code>.</li><li>Confirm the accepted candidate(s).</li><li>Set JSON <code>phase</code>:</li><li><code>awaiting_checkout_confirm</code> if at least one is accepted and checkout is not yet confirmed</li><li>keep <code>awaiting_accept_deny</code> if the user’s response is ambiguous / incomplete</li></ul><h3>7) Checkout (only after explicit confirmation)</h3><p>Before you click any “Place order” / “Submit” equivalent:</p><ul><li>Ask for a clear confirmation like: <strong>“Confirm checkout for A? (yes/no)”</strong></li><li>Set JSON <code>phase = "awaiting_checkout_confirm"</code> until confirmed.</li></ul><p>If the user confirms checkout:</p><ul><li>Navigate to the accepted candidate’s URL</li><li>Add to cart / proceed to checkout</li><li>Use <strong>secure-autofill</strong> to input payment/shipping info and submit</li></ul><p>If secure-autofill reports an error:</p><ul><li>Do not guess.</li><li>Pass the error back to the user.</li></ul><h3>8) Mark as shopped</h3><p>If the order is successfully placed:</p><ul><li>update that candidate’s <code>status</code> to <code>shopped</code></li><li>set JSON <code>phase = "ordered"</code></li></ul><h2>Notes / guardrails</h2><ul><li>Never paste secrets.</li><li>Checkout flows often require MFA / SMS verification; ask the user when needed.</li><li>Prefer fewer high-quality candidates over a long list.</li></ul></div> </div> </div> <div id="tab-versions" class="detail-content"> <div class="detail-section"> <h2>版本历史</h2> <p style="margin-bottom:12px;font-size:14px;color:#94a3b8;">共 1 个版本</p> <ul class="version-list"> <li> <div> <span class="version-tag">v0.1.0</span> <span style="font-size:11px;color:#5b6abf;margin-left:8px;background:#eef0ff;padding:1px 8px;border-radius:10px;">当前</span> </div> <div style="font-size:12px;color:#94a3b8;"> 2026-03-29 15:16 安全 安全 </div> </li> </ul> </div> </div> <div id="tab-security" class="detail-content"> <div class="detail-section"> <h2>安全检测</h2> <div class="sec-grid"> <div class="sec-card"> <h4>腾讯云安全 (Keen)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://tix.qq.com/search/skill?keyword=904e7d63c28c6c27ad64467c077641f7" target="_blank">查看报告</a> </div> <div class="sec-card"> <h4>腾讯云安全 (Sanbu)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://static.cloudsec.tencent.com/html-report-v2/2026/05/25/399702_72f6dee5b94c4817526e2cb2ae48378f.html?q-sign-algorithm=sha1&q-ak=AKID8JMG1bzBC1dz96qNhssfFftujT1NCoFi&q-sign-time=1781289749%3B1812825749&q-key-time=1781289749%3B1812825749&q-header-list=host&q-url-param-list=&q-signature=799018b8cb2104370dd770266accaca8de6142d6" target="_blank">查看报告</a> </div> </div> </div> </div> <!-- Recommended Skills --> <div style="margin-top:24px;"> <h2 style="font-size:18px;font-weight:600;margin-bottom:16px;">🔗 相关推荐</h2> <div class="rec-grid"> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">productivity</span> <h3><a href="/s/nano-pdf">Nano Pdf</a></h3> <div class="rec-owner">steipete</div> <div class="rec-desc">使用nano-pdf CLI通过自然语言指令编辑PDF</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 275</span> <span style="color:#5b6abf;">📥 114,844</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">productivity</span> <h3><a href="/s/weather">Weather</a></h3> <div class="rec-owner">steipete</div> <div class="rec-desc">获取当前天气和预报(无需API密钥)</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 445</span> <span style="color:#5b6abf;">📥 226,298</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">productivity</span> <h3><a href="/s/word-docx">Word / DOCX</a></h3> <div class="rec-owner">ivangdavila</div> <div class="rec-desc">创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 438</span> <span style="color:#5b6abf;">📥 147,654</span> </div> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded',function(){ document.querySelectorAll('.detail-tab').forEach(function(btn){ btn.addEventListener('click',function(e){ var tab = this.getAttribute('data-tab'); document.querySelectorAll('.detail-tab').forEach(function(b){b.classList.remove('active')}); document.querySelectorAll('.detail-content').forEach(function(c){c.classList.remove('active')}); this.classList.add('active'); var el = document.getElementById('tab-'+tab); if(el) el.classList.add('active'); }); }); }); </script> <div class="footer"> <p>Skill工具集 © 2026</p> </div></body> </html>