[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77XCR1DV8ZQK2NHWKVY4EWX":3,"skill-same:01M77XCR1DV8ZQK2NHWKVY4EWX":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M77XCR1DV8ZQK2NHWKVY4EWX","x402",null,"Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — \"just use it\" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing touches your codebase) or \"build it in\" (install the SDK and write the key + code into your project). Walks through wallet setup, funding, .env, and a ~$1 test run. Use when the user asks about x402, pay-per-use, USDC payments, or wants Browser Use Cloud without an API key. For the free-tier signup (reverse-CAPTCHA → API key), use `browser-use cloud signup` or the `cloud` skill instead.","Reihantt6\u002Fsns-myagent","Reihantt6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F219822095?v=4","01M77KK94PV8B7C2D9XWXNS8DJ","Mohamad Reihan tegar prasetya","01M77KK958QFMTHYXGXFV7KZ79",2,"MIT","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx402\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\ndescription: \"Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — \\\"just use it\\\" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing touches your codebase) or \\\"build it in\\\" (install the SDK and write the key + code into your project). Walks through wallet setup, funding, .env, and a ~$1 test run. Use when the user asks about x402, pay-per-use, USDC payments, or wants Browser Use Cloud without an API key. For the free-tier signup (reverse-CAPTCHA → API key), use `browser-use cloud signup` or the `cloud` skill instead.\"\n---\n# Browser Use Cloud — pay with x402 (crypto wallet)\n\nThis is a scripted flow. Follow the steps in order. x402 only works through the **SDK** (`browser-use-sdk` for Python, the `browser-use` npm package for TS) — there is no `browser-use` CLI command for it, so every step runs a short SDK script.\n\n## How to use this script\n\n- Lines under **Say:** are spoken to the user **word for word.** Don't paraphrase, add, or drop anything.\n- `\u003Clike this>` inside a Say block is a fill-in — replace it with the real value, keep the rest exact.\n- Lines under **Ask:** use the AskUserQuestion tool. Use the question and option text exactly as written.\n- **To show an explanation before a question, put it inside the AskUserQuestion `question` field** (it renders above the options). Don't send it as separate chat text before calling the tool — that text gets dropped when the question UI opens. So: explanation + the actual question both go in the `question` field, in one tool call.\n- Lines under **Do:** are your actions. Don't read them out.\n- Track two facts as you go: `SETUP` (A or B, from Step 1) and `MODE` (A or B, from Step 2).\n- **`SETUP`, `MODE`, and the Path A\u002FB\u002FC names are internal labels for you only. Never say them to the user.** Describe choices in plain words instead (e.g. \"top up your account\" \u002F \"accountless wallet\"), never \"Mode B\" or \"Path A\".\n\n---\n\n## Step 1 — Open and pick the setup\n\n**Ask:** (header: `Use x402`) — put the explanation and the question both in the `question` field, exactly:\n\n> x402 is a protocol from Coinbase that, instead of presenting an API key, allows you to use crypto to pay for API requests. x402 lets you pay Browser Use per request from a crypto wallet with USDC on Base — no signup, API key, or credit card needed, just a wallet. Setup takes a few minutes: get or make a wallet, add funds, save the key in `.env`, and test it.\n>\n> How do you want to use x402?\n- **Just use it** — Run Browser Use tasks, paid from your wallet, here in terminal by asking me. I set up the wallet and key.\n- **Build it in** — You're coding an app and want x402 in it. I will help you install the SDK, save the key to your project's `.env`, and add code.\n\n**Do:** \"Just use it\" → `SETUP = A`. \"Build it in\" → `SETUP = B`.\n\n---\n\n## Step 2 — Find the account (check before asking)\n\n**Do:** Look for an existing Browser Use API key, in this order. Don't say anything yet.\n1. `BROWSER_USE_API_KEY` in the environment\n2. a `BROWSER_USE_API_KEY=` line in `.\u002F.env`\n3. `~\u002F.browser-use\u002Fconfig.json` (saved by `browser-use cloud login` \u002F `signup`)\n4. `browser-use doctor` output, if the CLI is installed\n\n**If no key is found anywhere:**\n\n**Say:**\n> No Browser Use key found, so I'll set this up accountless: the wallet is your identity, and the first payment makes a project named after it.\n\n**Do:** `MODE = A`. Go to Step 3.\n\n**If a key is found:**\n\n**Ask:** (header: `Account`) — question: `I found a Browser Use API key in \u003Clocation>. Where should the USDC credits go?`\n- **Top up that account** — Credits go to your existing API key's project. Good if your free credits ran out, or you'd rather pay with crypto than a card.\n- **Accountless wallet** — The wallet is a separate identity. The first payment makes a fresh project named after the wallet, apart from your existing account.\n\n**Do:** \"Top up that account\" → `MODE = B`. \"Accountless wallet\" → `MODE = A`.\n\n---\n\n## Step 3 — Wallet\n\n**Ask:** (header: `Wallet`) — question: `Do you have a wallet ready, or should I set one up?`\n- **I have a funded wallet** — An EVM wallet (MetaMask, Rabby, Coinbase Wallet, Frame, Phantom, …) with USDC on Base mainnet.\n- **Walk me through it** — I'll guide you through making a wallet, adding Base, and buying USDC.\n- **Make a fresh one** — I'll generate a throwaway wallet for automation. You'll still need to fund it.\n\nBranch on the answer.\n\n### Path A — \"I have a funded wallet\"\n\n**Do:** Check `.env` is in `.gitignore`; add it if missing.\n\n**Ask:** (header: `Add key`) — put the note and the question both in the `question` field:\n> Your wallet's private key needs to go into `.env`. You can paste it here and I'll add it for you, or add it yourself. Heads up: anything pasted in chat is saved in the transcript, so for a high-value wallet, adding it yourself is a bit safer. How do you want to do it?\n\n- **Paste it here** — Paste your private key in the chat and I'll write it to `.env` for you.\n- **I'll add it myself** — You add it to `.env`, then send me just your public address.\n\n**If \"Paste it here\":**\n\n**Do:** Write `BROWSER_USE_X402_PRIVATE_KEY=\u003Cpasted key>` to `.env` (create the file if needed; make sure `.env` is gitignored). Never echo the key back or print it anywhere.\n\n**Say:**\n> Saved your key to `.env` — I won't print it back.\n\n**Do:** Go to Step 4.\n\n**If \"I'll add it myself\":**\n\n**Say:**\n> Add this line to your `.env`, then send me your wallet's public address (the `0x…` one — safe to share):\n> ```\n> BROWSER_USE_X402_PRIVATE_KEY=\u003Cyour private key>\n> ```\n\n**Do:** When they send the address, check it matches `^0x[0-9a-fA-F]{40}$`.\n\n**Say:**\n> Got it: `\u003Caddress>`. That's a valid address.\n\n**Do:** Go to Step 4.\n\n### Path B — \"Walk me through it\"\n\n**Say:**\n> 1. Install MetaMask (or Rabby, Coinbase Wallet, Frame, Trust Wallet, Phantom, …) from the official site only: https:\u002F\u002Fmetamask.io. Make a wallet, save the seed phrase offline, set a password.\n> 2. Add Base as a network. Open https:\u002F\u002Fchainlist.org\u002Fchain\u002F8453 → \"Connect Wallet\" → \"Add to MetaMask\", then approve it in your wallet.\n> 3. Click \"Buy\" in your wallet. Pick USDC, network Base, pay with card \u002F Apple Pay \u002F bank. The USDC lands straight in your wallet.\n> 4. Get the private key: account menu → Account details → Show private key → enter password → copy.\n> 5. Add it to your `.env` (make sure `.env` is gitignored):\n> ```\n> BROWSER_USE_X402_PRIVATE_KEY=\u003Cyour private key>\n> ```\n> 6. Send me your wallet's public address (the `0x…` one) so I can check it.\n\n**Do:** Then follow Path A from the address check onward.\n\n### Path C — \"Make a fresh one\"\n\n**Do:** Generate a wallet. Save the key to `.env`. Show the address only.\n\nPython:\n```bash\npip install eth-account\n```\n```python\nfrom eth_account import Account\nacc = Account.create()\nprint(\"Address:\", acc.address)\nprint(\"Private key:\", acc.key.hex())\n```\n\nTypeScript:\n```bash\nnpm install viem\n```\n```typescript\nimport { generatePrivateKey, privateKeyToAccount } from \"viem\u002Faccounts\";\nconst key = generatePrivateKey();\nconsole.log(\"Address:\", privateKeyToAccount(key).address);\nconsole.log(\"Private key:\", key);\n```\n\n**Say:**\n> Made a fresh wallet. Your public address is `\u003Caddress>`, and I've saved the private key to `.env`. Now it needs funds.\n\n**Do:** Go to Step 4 (funding).\n\n---\n\n## Step 4 — Add funds\n\n**If Path A or B (already funded):**\n\n**Say:**\n> Your wallet's already funded, so we'll skip ahead to the test.\n\n**Do:** Go to Step 5.\n\n**If Path C:**\n\n**Say:**\n> Two ways to get USDC into your wallet on Base:\n> - In-wallet Buy button (easiest): click \"Buy\", pick USDC, set the network to Base, pay with a card. No exchange needed.\n> - From an exchange: send USDC to `\u003Caddress>` and pick \"Base\" as the network — not Ethereum, which costs $5–$20 in fees.\n>\n> Add at least $20: that covers the $1 test plus a few real tasks. I'll watch the balance and tell you when it lands.\n\n**Do:** Check the on-chain balance every 5s with Base's public RPC:\n```bash\nPADDED=$(printf \"%064s\" \"${WALLET_ADDR:2}\" | tr ' ' '0')\ncurl -s https:\u002F\u002Fmainnet.base.org \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d \"{\\\"jsonrpc\\\":\\\"2.0\\\",\\\"method\\\":\\\"eth_call\\\",\\\"params\\\":[{\\\"to\\\":\\\"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\\\",\\\"data\\\":\\\"0x70a08231${PADDED}\\\"},\\\"latest\\\"],\\\"id\\\":1}\"\n```\nRead `result` as a hex number; divide by `1_000_000` (USDC has 6 decimals). Stop once it's $20 or more.\n\n**Say:**\n> Funded — I see $\u003Camount> on Base. Next, a quick test.\n\n---\n\n## Step 5 — Test run (~$1)\n\n**Do:** If `SETUP = A`, make sure the SDK is installed where you'll run scripts (default Python). If `SETUP = B`, install it into the project in the project's language — work out the language from the cwd (`package.json`\u002F`tsconfig.json` → TypeScript; `pyproject.toml`\u002F`requirements.txt`\u002F`*.py` → Python; ask only if you can't tell):\n```bash\n# Python (needs 3.10+ for the x402 extra)\npip install \"browser-use-sdk[x402]\"\n# TypeScript\nnpm install browser-use-sdk @x402\u002Ffetch @x402\u002Fevm viem\n```\n\n**Ask:** (header: `Test run`) — question: `Ready to test? This spends exactly $1 USDC from your wallet to check payment + run work end to end.`\n- **Use the default task** — \"Go to example.com and tell me the heading text.\" (~5 seconds, cheap)\n- **I'll give you a task** — Tell me a short task to run instead.\n- **Skip the test** — Skip the test and go straight to using x402.\n\n**Do:**\n- \"I'll give you a task\" → **Say:** `What's the task? Keep it short.` Wait for it.\n- \"Skip the test\" → go to Step 6.\n- Otherwise use the default task.\n\n**Do:** Run the test. Use the raw x402 client with `max_value` of $1.50 so it pays $1, not the $5 the SDK uses by default:\n```python\nimport asyncio, os\nfrom decimal import Decimal\nfrom x402 import x402Client\nfrom x402.http.clients import x402HttpxClient\nfrom x402.mechanisms.evm import EthAccountSigner\nfrom x402.mechanisms.evm.exact.register import register_exact_evm_client\nfrom eth_account import Account\n\nasync def main():\n    client = x402Client()\n    register_exact_evm_client(\n        client,\n        EthAccountSigner(Account.from_key(os.environ[\"BROWSER_USE_X402_PRIVATE_KEY\"])),\n    )\n    # max_value caps the spend per request — picks the $1 option over the $5 default.\n    async with x402HttpxClient(client, max_value=Decimal(\"1.5\"), timeout=180.0) as http:\n        resp = await http.post(\n            \"https:\u002F\u002Fx402.api.browser-use.com\u002Fapi\u002Fv3\u002Fsessions\",\n            json={\"task\": \"\u003Cthe task>\"},\n        )\n        print(resp.status_code, resp.json())\n\nasyncio.run(main())\n```\nIf `MODE = B`, add the API key header, or the $1 goes to a new wallet project instead of the one being topped up:\n```python\nasync with x402HttpxClient(\n    client, max_value=Decimal(\"1.5\"), timeout=180.0,\n    headers={\"X-Browser-Use-API-Key\": os.environ[\"BROWSER_USE_API_KEY\"]},\n) as http:\n    ...\n```\nIf the installed `x402` lib has no `max_value`, **Say:** `That x402 version can't force a $1 charge, so the test will cost $5 instead. Want me to go ahead?` — wait for a yes before running.\n\n**Say:**\n> Paid. On-chain proof: https:\u002F\u002Fbasescan.org\u002Faddress\u002F\u003Caddress>#tokentxns — look for a USDC transfer out of exactly $1.000000.\n\n**Do:** Read the balance. If `MODE = A` (needs `browser-use-sdk` ≥ 3.8.0; if older, say to run `pip install -U \"browser-use-sdk[x402]\"` or skip this):\n```python\nimport asyncio, os\nfrom browser_use_sdk.v3 import get_wallet_balance\n\nasync def main():\n    bal = await get_wallet_balance(os.environ[\"BROWSER_USE_X402_PRIVATE_KEY\"])\n    print(bal['total_credits_usd'])\n\nasyncio.run(main())\n```\nIf `MODE = B`, skip `get_wallet_balance` (it returns 404 — the credits sit in the API key's project, that's normal, don't show it as an error) and read it the normal way:\n```python\nfrom browser_use_sdk.v3 import AsyncBrowserUse\nclient = AsyncBrowserUse(api_key=os.environ[\"BROWSER_USE_API_KEY\"])\nacct = await client.billing.account()\nprint(acct.total_credits_balance_usd)\n```\n\n**Say:**\n> Done. Your Browser Use balance is now $\u003Cbalance> (the test cost about $\u003Ccost>). Tasks draw from this, and the SDK adds another $5 when it runs out.\n\n---\n\n## Step 6 — Wrap up\n\n**If `SETUP = A`:**\n\n**Say:**\n> All set. Ask me to run any browser task and I'll run it through the SDK, paid from your wallet.\n\n**Do:** When they ask for a task, write a throwaway script (in `\u002Ftmp`, or a background job for long ones), run it, report the result, and delete it — don't leave files in their cwd. The SDK reads `BROWSER_USE_X402_PRIVATE_KEY` and finds the x402 endpoint on its own:\n```python\nimport asyncio, os\nfrom browser_use_sdk.v3 import AsyncBrowserUse\n\nasync def main():\n    client = AsyncBrowserUse()  # Mode B: AsyncBrowserUse(api_key=os.environ[\"BROWSER_USE_API_KEY\"])\n    result = await client.run(task=\"\u003Cthe task>\")\n    print(result.output)\n\nasyncio.run(main())\n```\n\n**If `SETUP = B`:**\n\n**Say:**\n> All set. Here's the client to use in your code — it reads the key and endpoint from your `.env`:\n\n**Do:** Add the client in the project's language and point them at the `cloud` skill \u002F SDK docs for the rest:\n```python\nfrom browser_use_sdk.v3 import AsyncBrowserUse\n\nclient = AsyncBrowserUse()                                  # Mode A (accountless)\n# client = AsyncBrowserUse(api_key=\"bu_...\")                # Mode B (top up existing account)\n```\n\n(x402 needs the **async** client — the sync `BrowserUse` won't run when the x402 env var is set.)\n\n---\n\n## TypeScript equivalents\n\n| Python | TypeScript |\n|---|---|\n| `from browser_use_sdk.v3 import AsyncBrowserUse` | `import { BrowserUse } from \"browser-use-sdk\u002Fv3\"` |\n| `AsyncBrowserUse()` | `new BrowserUse()` |\n| `await client.run(task=...)` → `.output` | `await client.run({ task })` → `.output` |\n| `get_wallet_balance(key)` | `getWalletBalance(key)` (`from \"browser-use-sdk\u002Fv3\"`) |\n| `pip install \"browser-use-sdk[x402]\"` | `npm install browser-use-sdk @x402\u002Ffetch @x402\u002Fevm viem` |\n\nBoth SDKs read `BROWSER_USE_X402_PRIVATE_KEY` from the env.\n\n## Rules\n\n- **Follow the script in order. Say the Say blocks word for word.**\n- **Never spend the user's USDC without a clear yes** (the Step 5 question is that yes).\n- **Always offer both ways to add the key**: paste it in chat (you write it to `.env`) or the user adds it themselves. If they paste it, write it straight to `.env` and never echo it back or store it anywhere else.\n- **Add `.env` to `.gitignore` before saving keys.**\n- **Wallets hold real money.** Keep keys out of source control, logs, and screenshots; only add what you can afford to lose if it leaks.\n\n## Reference\n\n- x402 user docs: https:\u002F\u002Fdocs.browser-use.com\u002Fcloud\u002Fguides\u002Fx402\n- Claude Code + Browser Use Cloud: https:\u002F\u002Fdocs.browser-use.com\u002Fcloud\u002Ftutorials\u002Fintegrations\u002Fclaude-code\n- x402 protocol: https:\u002F\u002Fwww.x402.org\n- USDC on Base contract: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`\n- Base RPC: https:\u002F\u002Fmainnet.base.org · Basescan: https:\u002F\u002Fbasescan.org\n","# Browser Use Cloud — pay with x402 (crypto wallet)\n\nThis is a scripted flow. Follow the steps in order. x402 only works through the **SDK** (`browser-use-sdk` for Python, the `browser-use` npm package for TS) — there is no `browser-use` CLI command for it, so every step runs a short SDK script.\n\n## How to use this script\n\n- Lines under **Say:** are spoken to the user **word for word.** Don't paraphrase, add, or drop anything.\n- `\u003Clike this>` inside a Say block is a fill-in — replace it with the real value, keep the rest exact.\n- Lines under **Ask:** use the AskUserQuestion tool. Use the question and option text exactly as written.\n- **To show an explanation before a question, put it inside the AskUserQuestion `question` field** (it renders above the options). Don't send it as separate chat text before calling the tool — that text gets dropped when the question UI opens. So: explanation + the actual question both go in the `question` field, in one tool call.\n- Lines under **Do:** are your actions. Don't read them out.\n- Track two facts as you go: `SETUP` (A or B, from Step 1) and `MODE` (A or B, from Step 2).\n- **`SETUP`, `MODE`, and the Path A\u002FB\u002FC names are internal labels for you only. Never say them to the user.** Describe choices in plain words instead (e.g. \"top up your account\" \u002F \"accountless wallet\"), never \"Mode B\" or \"Path A\".\n\n---\n\n## Step 1 — Open and pick the setup\n\n**Ask:** (header: `Use x402`) — put the explanation and the question both in the `question` field, exactly:\n\n> x402 is a protocol from Coinbase that, instead of presenting an API key, allows you to use crypto to pay for API requests. x402 lets you pay Browser Use per request from a crypto wallet with USDC on Base — no signup, API key, or credit card needed, just a wallet. Setup takes a few minutes: get or make a wallet, add funds, save the key in `.env`, and test it.\n>\n> How do you want to use x402?\n- **Just use it** — Run Browser Use tasks, paid from your wallet, here in terminal by asking me. I set up the wallet and key.\n- **Build it in** — You're coding an app and want x402 in it. I will help you install the SDK, save the key to your project's `.env`, and add code.\n\n**Do:** \"Just use it\" → `SETUP = A`. \"Build it in\" → `SETUP = B`.\n\n---\n\n## Step 2 — Find the account (check before asking)\n\n**Do:** Look for an existing Browser Use API key, in this order. Don't say anything yet.\n1. `BROWSER_USE_API_KEY` in the environment\n2. a `BROWSER_USE_API_KEY=` line in `.\u002F.env`\n3. `~\u002F.browser-use\u002Fconfig.json` (saved by `browser-use cloud login` \u002F `signup`)\n4. `browser-use doctor` output, if the CLI is installed\n\n**If no key is found anywhere:**\n\n**Say:**\n> No Browser Use key found, so I'll set this up accountless: the wallet is your identity, and the first payment makes a project named after it.\n\n**Do:** `MODE = A`. Go to Step 3.\n\n**If a key is found:**\n\n**Ask:** (header: `Account`) — question: `I found a Browser Use API key in \u003Clocation>. Where should the USDC credits go?`\n- **Top up that account** — Credits go to your existing API key's project. Good if your free credits ran out, or you'd rather pay with crypto than a card.\n- **Accountless wallet** — The wallet is a separate identity. The first payment makes a fresh project named after the wallet, apart from your existing account.\n\n**Do:** \"Top up that account\" → `MODE = B`. \"Accountless wallet\" → `MODE = A`.\n\n---\n\n## Step 3 — Wallet\n\n**Ask:** (header: `Wallet`) — question: `Do you have a wallet ready, or should I set one up?`\n- **I have a funded wallet** — An EVM wallet (MetaMask, Rabby, Coinbase Wallet, Frame, Phantom, …) with USDC on Base mainnet.\n- **Walk me through it** — I'll guide you through making a wallet, adding Base, and buying USDC.\n- **Make a fresh one** — I'll generate a throwaway wallet for automation. You'll still need to fund it.\n\nBranch on the answer.\n\n### Path A — \"I have a funded wallet\"\n\n**Do:** Check `.env` is in `.gitignore`; add it if missing.\n\n**Ask:** (header: `Add key`) — put the note and the question both in the `question` field:\n> Your wallet's private key needs to go into `.env`. You can paste it here and I'll add it for you, or add it yourself. Heads up: anything pasted in chat is saved in the transcript, so for a high-value wallet, adding it yourself is a bit safer. How do you want to do it?\n\n- **Paste it here** — Paste your private key in the chat and I'll write it to `.env` for you.\n- **I'll add it myself** — You add it to `.env`, then send me just your public address.\n\n**If \"Paste it here\":**\n\n**Do:** Write `BROWSER_USE_X402_PRIVATE_KEY=\u003Cpasted key>` to `.env` (create the file if needed; make sure `.env` is gitignored). Never echo the key back or print it anywhere.\n\n**Say:**\n> Saved your key to `.env` — I won't print it back.\n\n**Do:** Go to Step 4.\n\n**If \"I'll add it myself\":**\n\n**Say:**\n> Add this line to your `.env`, then send me your wallet's public address (the `0x…` one — safe to share):\n> ```\n> BROWSER_USE_X402_PRIVATE_KEY=\u003Cyour private key>\n> ```\n\n**Do:** When they send the address, check it matches `^0x[0-9a-fA-F]{40}$`.\n\n**Say:**\n> Got it: `\u003Caddress>`. That's a valid address.\n\n**Do:** Go to Step 4.\n\n### Path B — \"Walk me through it\"\n\n**Say:**\n> 1. Install MetaMask (or Rabby, Coinbase Wallet, Frame, Trust Wallet, Phantom, …) from the official site only: https:\u002F\u002Fmetamask.io. Make a wallet, save the seed phrase offline, set a password.\n> 2. Add Base as a network. Open https:\u002F\u002Fchainlist.org\u002Fchain\u002F8453 → \"Connect Wallet\" → \"Add to MetaMask\", then approve it in your wallet.\n> 3. Click \"Buy\" in your wallet. Pick USDC, network Base, pay with card \u002F Apple Pay \u002F bank. The USDC lands straight in your wallet.\n> 4. Get the private key: account menu → Account details → Show private key → enter password → copy.\n> 5. Add it to your `.env` (make sure `.env` is gitignored):\n> ```\n> BROWSER_USE_X402_PRIVATE_KEY=\u003Cyour private key>\n> ```\n> 6. Send me your wallet's public address (the `0x…` one) so I can check it.\n\n**Do:** Then follow Path A from the address check onward.\n\n### Path C — \"Make a fresh one\"\n\n**Do:** Generate a wallet. Save the key to `.env`. Show the address only.\n\nPython:\n```bash\npip install eth-account\n```\n```python\nfrom eth_account import Account\nacc = Account.create()\nprint(\"Address:\", acc.address)\nprint(\"Private key:\", acc.key.hex())\n```\n\nTypeScript:\n```bash\nnpm install viem\n```\n```typescript\nimport { generatePrivateKey, privateKeyToAccount } from \"viem\u002Faccounts\";\nconst key = generatePrivateKey();\nconsole.log(\"Address:\", privateKeyToAccount(key).address);\nconsole.log(\"Private key:\", key);\n```\n\n**Say:**\n> Made a fresh wallet. Your public address is `\u003Caddress>`, and I've saved the private key to `.env`. Now it needs funds.\n\n**Do:** Go to Step 4 (funding).\n\n---\n\n## Step 4 — Add funds\n\n**If Path A or B (already funded):**\n\n**Say:**\n> Your wallet's already funded, so we'll skip ahead to the test.\n\n**Do:** Go to Step 5.\n\n**If Path C:**\n\n**Say:**\n> Two ways to get USDC into your wallet on Base:\n> - In-wallet Buy button (easiest): click \"Buy\", pick USDC, set the network to Base, pay with a card. No exchange needed.\n> - From an exchange: send USDC to `\u003Caddress>` and pick \"Base\" as the network — not Ethereum, which costs $5–$20 in fees.\n>\n> Add at least $20: that covers the $1 test plus a few real tasks. I'll watch the balance and tell you when it lands.\n\n**Do:** Check the on-chain balance every 5s with Base's public RPC:\n```bash\nPADDED=$(printf \"%064s\" \"${WALLET_ADDR:2}\" | tr ' ' '0')\ncurl -s https:\u002F\u002Fmainnet.base.org \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d \"{\\\"jsonrpc\\\":\\\"2.0\\\",\\\"method\\\":\\\"eth_call\\\",\\\"params\\\":[{\\\"to\\\":\\\"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\\\",\\\"data\\\":\\\"0x70a08231${PADDED}\\\"},\\\"latest\\\"],\\\"id\\\":1}\"\n```\nRead `result` as a hex number; divide by `1_000_000` (USDC has 6 decimals). Stop once it's $20 or more.\n\n**Say:**\n> Funded — I see $\u003Camount> on Base. Next, a quick test.\n\n---\n\n## Step 5 — Test run (~$1)\n\n**Do:** If `SETUP = A`, make sure the SDK is installed where you'll run scripts (default Python). If `SETUP = B`, install it into the project in the project's language — work out the language from the cwd (`package.json`\u002F`tsconfig.json` → TypeScript; `pyproject.toml`\u002F`requirements.txt`\u002F`*.py` → Python; ask only if you can't tell):\n```bash\n# Python (needs 3.10+ for the x402 extra)\npip install \"browser-use-sdk[x402]\"\n# TypeScript\nnpm install browser-use-sdk @x402\u002Ffetch @x402\u002Fevm viem\n```\n\n**Ask:** (header: `Test run`) — question: `Ready to test? This spends exactly $1 USDC from your wallet to check payment + run work end to end.`\n- **Use the default task** — \"Go to example.com and tell me the heading text.\" (~5 seconds, cheap)\n- **I'll give you a task** — Tell me a short task to run instead.\n- **Skip the test** — Skip the test and go straight to using x402.\n\n**Do:**\n- \"I'll give you a task\" → **Say:** `What's the task? Keep it short.` Wait for it.\n- \"Skip the test\" → go to Step 6.\n- Otherwise use the default task.\n\n**Do:** Run the test. Use the raw x402 client with `max_value` of $1.50 so it pays $1, not the $5 the SDK uses by default:\n```python\nimport asyncio, os\nfrom decimal import Decimal\nfrom x402 import x402Client\nfrom x402.http.clients import x402HttpxClient\nfrom x402.mechanisms.evm import EthAccountSigner\nfrom x402.mechanisms.evm.exact.register import register_exact_evm_client\nfrom eth_account import Account\n\nasync def main():\n    client = x402Client()\n    register_exact_evm_client(\n        client,\n        EthAccountSigner(Account.from_key(os.environ[\"BROWSER_USE_X402_PRIVATE_KEY\"])),\n    )\n    # max_value caps the spend per request — picks the $1 option over the $5 default.\n    async with x402HttpxClient(client, max_value=Decimal(\"1.5\"), timeout=180.0) as http:\n        resp = await http.post(\n            \"https:\u002F\u002Fx402.api.browser-use.com\u002Fapi\u002Fv3\u002Fsessions\",\n            json={\"task\": \"\u003Cthe task>\"},\n        )\n        print(resp.status_code, resp.json())\n\nasyncio.run(main())\n```\nIf `MODE = B`, add the API key header, or the $1 goes to a new wallet project instead of the one being topped up:\n```python\nasync with x402HttpxClient(\n    client, max_value=Decimal(\"1.5\"), timeout=180.0,\n    headers={\"X-Browser-Use-API-Key\": os.environ[\"BROWSER_USE_API_KEY\"]},\n) as http:\n    ...\n```\nIf the installed `x402` lib has no `max_value`, **Say:** `That x402 version can't force a $1 charge, so the test will cost $5 instead. Want me to go ahead?` — wait for a yes before running.\n\n**Say:**\n> Paid. On-chain proof: https:\u002F\u002Fbasescan.org\u002Faddress\u002F\u003Caddress>#tokentxns — look for a USDC transfer out of exactly $1.000000.\n\n**Do:** Read the balance. If `MODE = A` (needs `browser-use-sdk` ≥ 3.8.0; if older, say to run `pip install -U \"browser-use-sdk[x402]\"` or skip this):\n```python\nimport asyncio, os\nfrom browser_use_sdk.v3 import get_wallet_balance\n\nasync def main():\n    bal = await get_wallet_balance(os.environ[\"BROWSER_USE_X402_PRIVATE_KEY\"])\n    print(bal['total_credits_usd'])\n\nasyncio.run(main())\n```\nIf `MODE = B`, skip `get_wallet_balance` (it returns 404 — the credits sit in the API key's project, that's normal, don't show it as an error) and read it the normal way:\n```python\nfrom browser_use_sdk.v3 import AsyncBrowserUse\nclient = AsyncBrowserUse(api_key=os.environ[\"BROWSER_USE_API_KEY\"])\nacct = await client.billing.account()\nprint(acct.total_credits_balance_usd)\n```\n\n**Say:**\n> Done. Your Browser Use balance is now $\u003Cbalance> (the test cost about $\u003Ccost>). Tasks draw from this, and the SDK adds another $5 when it runs out.\n\n---\n\n## Step 6 — Wrap up\n\n**If `SETUP = A`:**\n\n**Say:**\n> All set. Ask me to run any browser task and I'll run it through the SDK, paid from your wallet.\n\n**Do:** When they ask for a task, write a throwaway script (in `\u002Ftmp`, or a background job for long ones), run it, report the result, and delete it — don't leave files in their cwd. The SDK reads `BROWSER_USE_X402_PRIVATE_KEY` and finds the x402 endpoint on its own:\n```python\nimport asyncio, os\nfrom browser_use_sdk.v3 import AsyncBrowserUse\n\nasync def main():\n    client = AsyncBrowserUse()  # Mode B: AsyncBrowserUse(api_key=os.environ[\"BROWSER_USE_API_KEY\"])\n    result = await client.run(task=\"\u003Cthe task>\")\n    print(result.output)\n\nasyncio.run(main())\n```\n\n**If `SETUP = B`:**\n\n**Say:**\n> All set. Here's the client to use in your code — it reads the key and endpoint from your `.env`:\n\n**Do:** Add the client in the project's language and point them at the `cloud` skill \u002F SDK docs for the rest:\n```python\nfrom browser_use_sdk.v3 import AsyncBrowserUse\n\nclient = AsyncBrowserUse()                                  # Mode A (accountless)\n# client = AsyncBrowserUse(api_key=\"bu_...\")                # Mode B (top up existing account)\n```\n\n(x402 needs the **async** client — the sync `BrowserUse` won't run when the x402 env var is set.)\n\n---\n\n## TypeScript equivalents\n\n| Python | TypeScript |\n|---|---|\n| `from browser_use_sdk.v3 import AsyncBrowserUse` | `import { BrowserUse } from \"browser-use-sdk\u002Fv3\"` |\n| `AsyncBrowserUse()` | `new BrowserUse()` |\n| `await client.run(task=...)` → `.output` | `await client.run({ task })` → `.output` |\n| `get_wallet_balance(key)` | `getWalletBalance(key)` (`from \"browser-use-sdk\u002Fv3\"`) |\n| `pip install \"browser-use-sdk[x402]\"` | `npm install browser-use-sdk @x402\u002Ffetch @x402\u002Fevm viem` |\n\nBoth SDKs read `BROWSER_USE_X402_PRIVATE_KEY` from the env.\n\n## Rules\n\n- **Follow the script in order. Say the Say blocks word for word.**\n- **Never spend the user's USDC without a clear yes** (the Step 5 question is that yes).\n- **Always offer both ways to add the key**: paste it in chat (you write it to `.env`) or the user adds it themselves. If they paste it, write it straight to `.env` and never echo it back or store it anywhere else.\n- **Add `.env` to `.gitignore` before saving keys.**\n- **Wallets hold real money.** Keep keys out of source control, logs, and screenshots; only add what you can afford to lose if it leaks.\n\n## Reference\n\n- x402 user docs: https:\u002F\u002Fdocs.browser-use.com\u002Fcloud\u002Fguides\u002Fx402\n- Claude Code + Browser Use Cloud: https:\u002F\u002Fdocs.browser-use.com\u002Fcloud\u002Ftutorials\u002Fintegrations\u002Fclaude-code\n- x402 protocol: https:\u002F\u002Fwww.x402.org\n- USDC on Base contract: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`\n- Base RPC: https:\u002F\u002Fmainnet.base.org · Basescan: https:\u002F\u002Fbasescan.org\n",{"description":7},"main","58843b159d7a4050d6b785a98b908cce505c0b92","agent\u002Fskills\u002Fx402",0,"https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent","https:\u002F\u002Fgithub.com\u002FReihantt6","reihsns.web.id","2026-08-19 20:08:18",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Reihantt6\u002Fsns-myagent --skill x402",{"tool":38,"command":39},"bunx","bunx skills add Reihantt6\u002Fsns-myagent --skill x402",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Reihantt6\u002Fsns-myagent --skill x402","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx402\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M77XDCYZ407XYMF2T4P6F7VT","youtube-transcript","Extract transcripts from YouTube videos. Use when the user asks for a transcript, subtitles, or captions of a YouTube video and provides a YouTube URL (youtube.com\u002Fwatch?v=, youtu.be\u002F, or similar). Supports output with or without timestamps.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-transcript\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M77XD7PBC98J6MXGJJ2TJ8DX","youtube-thumbnail-design","YouTube thumbnail design with specific dimensions, contrast rules, and mobile preview optimization. Covers safe zones, text placement, face expression psychology, and A\u002FB testing. Use for: YouTube thumbnails, video cover images, click-through optimization. Triggers: youtube thumbnail, thumbnail design, video thumbnail, click through rate, ctr optimization, youtube cover, video cover image, thumbnail maker, thumbnail tips, youtube design, video preview image","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-thumbnail-design\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M77XD2541C8HXJ6RHYZP4NGJ","youtube-short-maker","Make YouTube Shorts that hold attention with Pexo — vertical 9:16, fast-paced, hook in the first 3 seconds. Describe your topic and Pexo writes the script, generates the shots, picks the models, and assembles a finished Short with music and captions. Use for YouTube Shorts: \"youtube short\", \"make a youtube short\", \"shorts video\", \"short-form video\". NOT for long-form or landscape video.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fyoutube-short-maker\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M77XCXKVSYK7KTZ3PQBVVGFD","xcode-project-setup","Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fxcode-project-setup\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M77XCMD3R3ZBZQQSW6E0793B","x-twitter-scraper","Build GitHub Copilot workflows with Xquik X API SDKs, REST endpoints, hosted Apify Actor runs, MCP tools, TweetClaw OpenClaw plugin installs, signed webhooks, tweet search, user lookup, follower exports, media actions, and agent automation.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx-twitter-scraper\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M77XCF9JNSRJ49N9Q07VS1Z6","x-ray-a-company","Corporate due-diligence workflow — resolve a brand or website to its registered legal entity, map group structure and beneficial ownership, profile officers and directors, enumerate the digital estate, and screen litigation, insolvency, procurement, sanctions, PEP and adverse media. Use when asked to check out, vet or research a company, verify a supplier or counterparty before signing or paying, or assess whether a business is real. Applies to vendor and third-party risk, KYC and KYB onboarding, M&A and investor diligence, procurement integrity, and shell-company assessment. Reference at useosint.com\u002Fskills\u002Fx-ray-a-company.","https:\u002F\u002Fgithub.com\u002FReihantt6\u002Fsns-myagent\u002Fblob\u002Fmain\u002Fagent\u002Fskills\u002Fx-ray-a-company\u002FSKILL.md",[],[]]