[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F720KXKNK5TZW0N893CCP2":3,"skill-same:01M7F720KXKNK5TZW0N893CCP2":47},{"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":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7F720KXKNK5TZW0N893CCP2","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.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fx402\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: x402\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.\nallowed-tools: Bash, Read, Write, Edit\n---\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",{"name":5,"description":7,"allowed-tools":24},"Bash, Read, Write, Edit","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","05-技能与代理开发\u002Fx402",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill x402",{"tool":39,"command":40},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill x402",{"tool":42,"command":43},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill x402","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fx402\u002FSKILL.md",true,[],[48,55,60,67,74,81],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":56,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]