Browser Automate
Drive the user's real, logged-in Chrome to accomplish a task: navigate, search, fill forms, click, shop. Runs in a dedicated "Frevana" browser tab — it never hijacks the tab the user is on. Uses the Chrome Extension-backed Frevana MCP tool frevana_automate.
Purpose
This skill performs interactive browser automation via frevana_automate. Elements are addressed by an integer [ref] from a snapshot, never by CSS selector. Use it for tasks that require clicking through a UI (search a site, fill a form, add to cart, go to checkout) — as opposed to just fetching data (use Authenticated Fetch) or generating a collector (use Site Data Collector).
What This Skill Needs
- bundled
scripts/setup.shwrapper, which downloads and runs the latest official Frevana setup script - Frevana local daemon running after setup, default port
12306 - Chrome connected through the Frevana Chrome Extension
curl,bash,python3
This is a Chrome Extension skill. It uses the local daemon and Chrome Extension session.
How it works — perceive → act loop
Call scripts/automate.sh repeatedly:
- First call: pass
--urlto open the page plus a singlesnapshotstep. The result lists interactable elements as[ref] role "name".bash <skill-path>/scripts/automate.sh --url "https://duckduckgo.com/" --steps '[{"op":"snapshot"}]' - Read the snapshot, then call again without
--url(reuses the same tab) with action steps that reference the[ref]s you saw, ending in asnapshotto see the new state:bash <skill-path>/scripts/automate.sh --steps '[{"op":"type","ref":2,"text":"frevana","submit":true},{"op":"wait","ms":1500},{"op":"snapshot"}]' - Repeat until the task is done.
Step ops: navigate{url} · snapshot · click{ref} · type{ref,text,submit?} · select{ref,value} · scroll{to:"ref|top|bottom",ref?} · pressKey{key} · waitFor{for:"navigation|idle|ref",ref?} · assert{ref,exists?} · extract{ref,as} · getHtml{ref,as?} · wait{ms}.
Optional flags: --allow-domains '["amazon.com"]' (restrict navigation to these domains), --timeout <ms>.
PAYMENT / CHALLENGE SAFETY (critical)
Clicking a pay / place-order control is blocked by default. When the result contains NEEDS HUMAN (payment) (or needHuman:"payment"), STOP acting — never retry the submit on your own. There is exactly one sanctioned path to place the order: the user's explicit confirmation flow below. Captcha / login challenges (needHuman:"login"/"captcha") always hand off to the user — no override exists for those.
Placing an order — requires the user's explicit confirmation in chat
- Drive the flow normally (search → add to cart → checkout) until a step returns
NEEDS HUMAN (payment). - Present an order summary in chat, extracted from the CURRENT page (latest snapshot; use
extract/getHtmlon specific refs if needed): item name(s), quantity, total price, and — if visible — shipping address and payment method. - Ask the user to confirm and WAIT for their reply, e.g.: "已到下单确认页:〈商品〉× N,总价 ¥X。回复「确认下单」我就提交订单。" Never proceed on silence or on your own judgment.
- Only after the user explicitly confirms (e.g. "确认下单" / "confirm order"): take a FRESH snapshot (refs go stale), then send ONE call with
--confirm-paymentcontaining exactly one mutating step — the singleclickon the place-order control — pluswaitFor+snapshot. The CLI refuses a confirmed call with anynavigate/type/select/pressKeyor a second click, so do not pack extra actions in; if the confirmed page still needs a form filled, do that in a NORMAL (un-confirmed) call first, then confirm only the final click. - Verify order state before you conclude — and NEVER re-submit on a guess. The post-click snapshot is often taken before the order POST settles (single-page checkouts return "loaded" immediately), so a still-visible "Place order" button does not mean it failed. Just as important: a tool result of
ok:falsedoes NOT prove the click failed — the order may have gone through while a latersnapshot/waitForstep errored. So never infer "not placed" from the tool result alone. Once the confirmed click has been sent, treat the order as possibly placed regardless of what the result line says. Before saying anything to the user — and before ever re-asking to confirm — independently check order state: navigate to the order-history / "my orders" page, or look for a confirmation banner / order number / emptied cart. Report what you found. If state is inconclusive, tell the user the order may already be placed and to check their account — do not silently send a second--confirm-paymentcall. Only re-submit if you have positively verified the order did NOT go through and the user confirms again.
Never pass --confirm-payment in any other situation: not on your own initiative, not because a step failed, not to save a round trip, not to re-try an ambiguous submit. The user's explicit go-ahead authorizes exactly one place-order click.
Execution Order
- Let the script run bundled
scripts/setup.shbefore every tool call. - If setup reports Chrome disconnected, stop and tell the user to open Chrome, connect the Frevana extension, and retry.
- Start with
--url <page>+[{"op":"snapshot"}]. Read the snapshot. - Act by
[ref]from the LATEST snapshot only — never reuse stale refs; always end an action batch with{"op":"snapshot"}before deciding the next step. - On
NEEDS HUMAN (payment)→ follow "Placing an order" above (summary → explicit user confirmation → single--confirm-paymentcall). On login / captcha → STOP and hand off to the user. - When done, give a short plain-text summary of what you did and the final state.
Commands
Open a page and snapshot it
bash <skill-path>/scripts/automate.sh --url "https://www.amazon.com/" --steps '[{"op":"snapshot"}]'
Act on the current page (reuse the tab)
bash <skill-path>/scripts/automate.sh --steps '[{"op":"click","ref":13},{"op":"waitFor","for":"navigation"},{"op":"snapshot"}]'
Submit a HUMAN-CONFIRMED order (one-shot; only after the user explicitly confirmed in chat)
bash <skill-path>/scripts/automate.sh --confirm-payment --steps '[{"op":"click","ref":42},{"op":"waitFor","for":"navigation"},{"op":"snapshot"}]'