{
  "schemaVersion": "1.0",
  "item": {
    "slug": "browser-automation-ultra",
    "name": "Browser Automation Ultra",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/swaylq/browser-automation-ultra",
    "canonicalUrl": "https://clawhub.ai/swaylq/browser-automation-ultra",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/browser-automation-ultra",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=browser-automation-ultra",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/anti-detection.md",
      "scripts/browser-lock.sh",
      "scripts/examples/publish-behance.js",
      "scripts/examples/publish-deviantart.js",
      "scripts/examples/publish-pinterest.js"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/browser-automation-ultra"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/browser-automation-ultra",
    "agentPageUrl": "https://openagent3.xyz/skills/browser-automation-ultra/agent",
    "manifestUrl": "https://openagent3.xyz/skills/browser-automation-ultra/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/browser-automation-ultra/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Browser Automation Ultra",
        "body": "Explore → Record → Replay → Fix. Convert expensive browser-tool interactions into zero-token Playwright scripts that reuse OpenClaw's Chrome session (cookies/login intact)."
      },
      {
        "title": "Prerequisites",
        "body": "Install Playwright (once per machine):\n\nnpm install -g playwright\n# or in workspace: npm init -y && npm install playwright\n\nNo browser download needed — scripts connect to OpenClaw's existing Chrome via CDP."
      },
      {
        "title": "Architecture",
        "body": "Chrome user-data: ~/.openclaw/browser/openclaw/user-data\n       ↕ shared cookies/login (mutually exclusive CDP)\n┌──────────────┐    ┌──────────────────┐\n│ browser tool │ OR │ Playwright script │\n│ (explore)    │    │ (zero token)      │\n└──────────────┘    └──────────────────┘\n       ↕ managed by browser-lock.sh\n\nOnly one CDP client can connect at a time. browser-lock.sh handles the mutex."
      },
      {
        "title": "Setup",
        "body": "Copy scripts/browser-lock.sh to your workspace scripts/ directory\nCopy scripts/utils/human-like.js to your workspace scripts/browser/utils/\nchmod +x scripts/browser-lock.sh\nCreate scripts/browser/ for your automation scripts"
      },
      {
        "title": "1. Explore (browser tool, costs tokens)",
        "body": "Use the OpenClaw browser tool (snapshot/act) to figure out a workflow. Note selectors, page flow, key waits."
      },
      {
        "title": "2. Record (write a Playwright script)",
        "body": "Convert steps into a script. Save to scripts/browser/<verb>-<target>.js. Use the template pattern:\n\nconst { chromium } = require('playwright');\nconst { humanDelay, humanClick, humanType, humanThink, humanBrowse } = require('./utils/human-like');\n\nfunction discoverCdpUrl() {\n  try {\n    const { execSync } = require('child_process');\n    const ps = execSync(\"ps aux | grep 'remote-debugging-port' | grep -v grep\", { encoding: 'utf8' });\n    const match = ps.match(/remote-debugging-port=(\\d+)/);\n    return `http://127.0.0.1:${match ? match[1] : '18800'}`;\n  } catch { return 'http://127.0.0.1:18800'; }\n}\n\nasync function main() {\n  const browser = await chromium.connectOverCDP(discoverCdpUrl());\n  const context = browser.contexts()[0]; // reuse existing context (cookies/login)\n  const page = await context.newPage();\n  try {\n    // automation here — use human-like functions\n    await page.goto('https://example.com', { waitUntil: 'networkidle', timeout: 30000 });\n    await humanBrowse(page); // simulate looking at the page\n    await humanClick(page, 'button.submit');\n    await humanType(page, 'input[name=\"title\"]', 'Hello World');\n  } finally {\n    await page.close(); // NEVER browser.close() — kills entire Chrome\n  }\n}\nmain().then(() => process.exit(0)).catch(e => { console.error('❌', e.message); process.exit(1); });"
      },
      {
        "title": "3. Replay (zero tokens)",
        "body": "./scripts/browser-lock.sh run scripts/browser/my-task.js [args]\n./scripts/browser-lock.sh run --timeout 120 scripts/browser/my-task.js"
      },
      {
        "title": "4. Fix (on error)",
        "body": "Read script error output\nRe-explore the failing step with browser tool (snapshot) to check current UI\nUpdate script with corrected selectors/logic\nRetry\n\nNever guess fixes blindly. Always re-explore the actual page state."
      },
      {
        "title": "browser-lock.sh",
        "body": "Manages CDP mutex between OpenClaw browser and Playwright scripts.\n\n./scripts/browser-lock.sh run <script.js> [args]    # acquire → run → release (300s default)\n./scripts/browser-lock.sh run --timeout 120 <script> # custom timeout\n./scripts/browser-lock.sh acquire                    # manual: stop OpenClaw browser, start Chrome\n./scripts/browser-lock.sh release                    # manual: kill Chrome, release lock\n./scripts/browser-lock.sh status                     # show state\n\nLock file: /tmp/openclaw-browser.lock. Stale locks auto-recover."
      },
      {
        "title": "Anti-Detection Rules (MANDATORY)",
        "body": "All scripts must use human-like.js. See references/anti-detection.md for the full rule set.\n\nSummary of critical rules:\n\n❌ Banned✅ RequiredwaitForTimeout(3000) fixed delayshumanDelay(2000, 4000) random rangeinput.fill(text) instant fillhumanType(page, sel, text) char-by-char with typoselement.click() teleport clickhumanClick(page, sel) bezier mouse path + hoverDirect page operation after loadhumanBrowse(page) simulate reading firstnativeSetter.call() DOM injectionhumanType() or humanFillContentEditable()Fixed cron schedulejitterWait(1, 10) random offset\n\nException: setInputFiles() for file uploads is allowed (no human simulation possible), but add random delays before/after."
      },
      {
        "title": "human-like.js API",
        "body": "FunctionPurposehumanDelay(min, max)Random wait (ms)humanThink(min, max)Longer pause before form fillshumanClick(page, sel)Bezier mouse move → hover → click with press/release jitterhumanType(page, sel, text, opts)Char-by-char typing, normal distribution speed, 3% typo ratehumanFillContentEditable(page, sel, text)For contenteditable divs (line-by-line Enter + humanType)humanBrowse(page, opts)Simulate page reading (scroll + mouse wander, 2-5s)humanScroll(page, opts)Random scroll with occasional reversejitterWait(minMin, maxMin)Random delay in minutes for cron tasks"
      },
      {
        "title": "Script Naming Convention",
        "body": "<verb>-<target>.js — e.g. publish-deviantart.js, read-inbox.js, reply-comment.js"
      },
      {
        "title": "Example Scripts",
        "body": "Production-tested scripts in scripts/examples/. Copy to your workspace scripts/browser/ and adapt.\n\nScriptPlatformFunctionpublish-deviantart.jsDeviantArtUpload image, fill title/desc/tags, submitpublish-xiaohongshu.js小红书Publish image note with topic tag association via recommend listpublish-pinterest.jsPinterestCreate pin with title/desc, select boardpublish-behance.jsBehanceUpload project with title/desc/tags/categoriesread-proton-latest.jsProton MailRead inbox, output JSON list of emailsread-xhs-comments.js小红书Read notification comments, output JSON with reply button indexreply-xhs-comment.js小红书Reply to a specific comment by index\n\nUsage pattern:\n\n# Copy examples to workspace\ncp scripts/examples/*.js scripts/browser/\ncp scripts/utils/human-like.js scripts/browser/utils/\n\n# Run\n./scripts/browser-lock.sh run scripts/browser/publish-deviantart.js image.png \"Title\" \"Description\" \"tag1,tag2\"\n./scripts/browser-lock.sh run scripts/browser/read-xhs-comments.js --limit 10\n./scripts/browser-lock.sh run scripts/browser/reply-xhs-comment.js 0 \"回复文字\"\n\nAll example scripts already use human-like.js for anti-detection."
      },
      {
        "title": "Cron Integration",
        "body": "cd /path/to/workspace && ./scripts/browser-lock.sh run scripts/browser/task.js\n\nAdd jitterWait() at script start to randomize execution time."
      },
      {
        "title": "Troubleshooting",
        "body": "ProblemFixLock held by PID xxx./scripts/browser-lock.sh releaseCDP connection timeoutEnsure acquire was called / Chrome is runningLogin expiredUse browser tool to re-login, then run scriptSelector not foundRe-explore with browser tool, update scriptScript timeoutIncrease with --timeout flag"
      },
      {
        "title": "Environment Variables",
        "body": "VarDefaultDescriptionCDP_PORTauto-discoverOverride CDP portCHROME_BINauto-detectChrome binary pathHEADLESSautotrue/false to force headless"
      }
    ],
    "body": "Browser Automation Ultra\n\nExplore → Record → Replay → Fix. Convert expensive browser-tool interactions into zero-token Playwright scripts that reuse OpenClaw's Chrome session (cookies/login intact).\n\nPrerequisites\n\nInstall Playwright (once per machine):\n\nnpm install -g playwright\n# or in workspace: npm init -y && npm install playwright\n\n\nNo browser download needed — scripts connect to OpenClaw's existing Chrome via CDP.\n\nArchitecture\nChrome user-data: ~/.openclaw/browser/openclaw/user-data\n       ↕ shared cookies/login (mutually exclusive CDP)\n┌──────────────┐    ┌──────────────────┐\n│ browser tool │ OR │ Playwright script │\n│ (explore)    │    │ (zero token)      │\n└──────────────┘    └──────────────────┘\n       ↕ managed by browser-lock.sh\n\n\nOnly one CDP client can connect at a time. browser-lock.sh handles the mutex.\n\nSetup\nCopy scripts/browser-lock.sh to your workspace scripts/ directory\nCopy scripts/utils/human-like.js to your workspace scripts/browser/utils/\nchmod +x scripts/browser-lock.sh\nCreate scripts/browser/ for your automation scripts\nCore Workflow\n1. Explore (browser tool, costs tokens)\n\nUse the OpenClaw browser tool (snapshot/act) to figure out a workflow. Note selectors, page flow, key waits.\n\n2. Record (write a Playwright script)\n\nConvert steps into a script. Save to scripts/browser/<verb>-<target>.js. Use the template pattern:\n\nconst { chromium } = require('playwright');\nconst { humanDelay, humanClick, humanType, humanThink, humanBrowse } = require('./utils/human-like');\n\nfunction discoverCdpUrl() {\n  try {\n    const { execSync } = require('child_process');\n    const ps = execSync(\"ps aux | grep 'remote-debugging-port' | grep -v grep\", { encoding: 'utf8' });\n    const match = ps.match(/remote-debugging-port=(\\d+)/);\n    return `http://127.0.0.1:${match ? match[1] : '18800'}`;\n  } catch { return 'http://127.0.0.1:18800'; }\n}\n\nasync function main() {\n  const browser = await chromium.connectOverCDP(discoverCdpUrl());\n  const context = browser.contexts()[0]; // reuse existing context (cookies/login)\n  const page = await context.newPage();\n  try {\n    // automation here — use human-like functions\n    await page.goto('https://example.com', { waitUntil: 'networkidle', timeout: 30000 });\n    await humanBrowse(page); // simulate looking at the page\n    await humanClick(page, 'button.submit');\n    await humanType(page, 'input[name=\"title\"]', 'Hello World');\n  } finally {\n    await page.close(); // NEVER browser.close() — kills entire Chrome\n  }\n}\nmain().then(() => process.exit(0)).catch(e => { console.error('❌', e.message); process.exit(1); });\n\n3. Replay (zero tokens)\n./scripts/browser-lock.sh run scripts/browser/my-task.js [args]\n./scripts/browser-lock.sh run --timeout 120 scripts/browser/my-task.js\n\n4. Fix (on error)\nRead script error output\nRe-explore the failing step with browser tool (snapshot) to check current UI\nUpdate script with corrected selectors/logic\nRetry\n\nNever guess fixes blindly. Always re-explore the actual page state.\n\nbrowser-lock.sh\n\nManages CDP mutex between OpenClaw browser and Playwright scripts.\n\n./scripts/browser-lock.sh run <script.js> [args]    # acquire → run → release (300s default)\n./scripts/browser-lock.sh run --timeout 120 <script> # custom timeout\n./scripts/browser-lock.sh acquire                    # manual: stop OpenClaw browser, start Chrome\n./scripts/browser-lock.sh release                    # manual: kill Chrome, release lock\n./scripts/browser-lock.sh status                     # show state\n\n\nLock file: /tmp/openclaw-browser.lock. Stale locks auto-recover.\n\nAnti-Detection Rules (MANDATORY)\n\nAll scripts must use human-like.js. See references/anti-detection.md for the full rule set.\n\nSummary of critical rules:\n\n❌ Banned\t✅ Required\nwaitForTimeout(3000) fixed delays\thumanDelay(2000, 4000) random range\ninput.fill(text) instant fill\thumanType(page, sel, text) char-by-char with typos\nelement.click() teleport click\thumanClick(page, sel) bezier mouse path + hover\nDirect page operation after load\thumanBrowse(page) simulate reading first\nnativeSetter.call() DOM injection\thumanType() or humanFillContentEditable()\nFixed cron schedule\tjitterWait(1, 10) random offset\n\nException: setInputFiles() for file uploads is allowed (no human simulation possible), but add random delays before/after.\n\nhuman-like.js API\nFunction\tPurpose\nhumanDelay(min, max)\tRandom wait (ms)\nhumanThink(min, max)\tLonger pause before form fills\nhumanClick(page, sel)\tBezier mouse move → hover → click with press/release jitter\nhumanType(page, sel, text, opts)\tChar-by-char typing, normal distribution speed, 3% typo rate\nhumanFillContentEditable(page, sel, text)\tFor contenteditable divs (line-by-line Enter + humanType)\nhumanBrowse(page, opts)\tSimulate page reading (scroll + mouse wander, 2-5s)\nhumanScroll(page, opts)\tRandom scroll with occasional reverse\njitterWait(minMin, maxMin)\tRandom delay in minutes for cron tasks\nScript Naming Convention\n\n<verb>-<target>.js — e.g. publish-deviantart.js, read-inbox.js, reply-comment.js\n\nExample Scripts\n\nProduction-tested scripts in scripts/examples/. Copy to your workspace scripts/browser/ and adapt.\n\nScript\tPlatform\tFunction\npublish-deviantart.js\tDeviantArt\tUpload image, fill title/desc/tags, submit\npublish-xiaohongshu.js\t小红书\tPublish image note with topic tag association via recommend list\npublish-pinterest.js\tPinterest\tCreate pin with title/desc, select board\npublish-behance.js\tBehance\tUpload project with title/desc/tags/categories\nread-proton-latest.js\tProton Mail\tRead inbox, output JSON list of emails\nread-xhs-comments.js\t小红书\tRead notification comments, output JSON with reply button index\nreply-xhs-comment.js\t小红书\tReply to a specific comment by index\n\nUsage pattern:\n\n# Copy examples to workspace\ncp scripts/examples/*.js scripts/browser/\ncp scripts/utils/human-like.js scripts/browser/utils/\n\n# Run\n./scripts/browser-lock.sh run scripts/browser/publish-deviantart.js image.png \"Title\" \"Description\" \"tag1,tag2\"\n./scripts/browser-lock.sh run scripts/browser/read-xhs-comments.js --limit 10\n./scripts/browser-lock.sh run scripts/browser/reply-xhs-comment.js 0 \"回复文字\"\n\n\nAll example scripts already use human-like.js for anti-detection.\n\nCron Integration\ncd /path/to/workspace && ./scripts/browser-lock.sh run scripts/browser/task.js\n\n\nAdd jitterWait() at script start to randomize execution time.\n\nTroubleshooting\nProblem\tFix\nLock held by PID xxx\t./scripts/browser-lock.sh release\nCDP connection timeout\tEnsure acquire was called / Chrome is running\nLogin expired\tUse browser tool to re-login, then run script\nSelector not found\tRe-explore with browser tool, update script\nScript timeout\tIncrease with --timeout flag\nEnvironment Variables\nVar\tDefault\tDescription\nCDP_PORT\tauto-discover\tOverride CDP port\nCHROME_BIN\tauto-detect\tChrome binary path\nHEADLESS\tauto\ttrue/false to force headless"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/swaylq/browser-automation-ultra",
    "publisherUrl": "https://clawhub.ai/swaylq/browser-automation-ultra",
    "owner": "swaylq",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/browser-automation-ultra",
    "downloadUrl": "https://openagent3.xyz/downloads/browser-automation-ultra",
    "agentUrl": "https://openagent3.xyz/skills/browser-automation-ultra/agent",
    "manifestUrl": "https://openagent3.xyz/skills/browser-automation-ultra/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/browser-automation-ultra/agent.md"
  }
}