Use this skill when the task is browser-only and does not require MagicPay payment/session/secret flows:
- open or attach to a browser;
- inspect the visible page state with observe/act loops;
- navigate directly when the destination URL is known;
- extract structured data from the current page;
- capture screenshots for evidence or debugging;
- close the browser cleanly when the task is done.
Do not use this skill for protected credential or payment-card completion. If
the page reaches a login, identity, or payment form that needs approved stored
secrets, hand off to the magicpay or magicpay-agent skill instead.
Prerequisites
agentbrowseCLI must be available onPATH. If missing, install withnpm i -g @mercuryo-ai/agentbrowse-cli.- Goal-driven
observeand allextractusage require MagicPay gateway configuration. Before using those commands, either:- run
agentbrowse init <apiKey>to save the key in~/.magicpay/config.json, or - set
MAGICPAY_API_KEYand, when needed,MAGICPAY_API_URL.
- run
- The environment must allow browser launch or provide a CDP endpoint for
agentbrowse attach.
Workflow
- Confirm
agentbrowseis available by runningagentbrowse --version. If the command is not found, runnpm i -g @mercuryo-ai/agentbrowse-cli, then verify withagentbrowse --versionagain. - If the task needs goal-focused
observeor anyextract, make sure MagicPay gateway access is configured withagentbrowse init <apiKey>or the corresponding environment variables before continuing. - Establish browser context with
agentbrowse launchoragentbrowse attach <cdp-url>. If the correct browser and page context already exist, continue without restarting. - Drive the visible-state loop:
agentbrowse observe-> decide next action ->agentbrowse act->agentbrowse observe. - Use
agentbrowse navigate <url>when the destination URL is already known. - Use
agentbrowse extract '<schema-json>' [scopeRef]when structured data is needed from the page. - Use
agentbrowse screenshot [--path <file>]when you need a captured image or diagnostic artifact. - Use
agentbrowse browser-statusonly for diagnostics and recovery. - Use
agentbrowse closeonly for browser teardown, not as a substitute for confirming task success.
Ask-User Boundary
Ask the user only when:
- the task reaches a protected login, identity, or payment boundary that this skill must not cross;
- the correct next action is genuinely ambiguous after re-observing the page;
- the environment does not allow browser startup and no attachable browser is available.
Safety
- Do not claim progress unless the visible page state confirms it.
- Re-observe after meaningful page changes instead of reusing stale target refs.
- Do not improvise protected-value entry or approval logic inside this skill.
References
Load additional detail only when needed:
references/workflow.mdfor resume and recovery guidance;references/commands.mdfor the browser-only CLI reference;references/statuses.mdfor common browser/runtime failure categories;references/guardrails.mdfor surface boundaries and escalation rules.
