Claude Code Tools

playwright-bot-bypass

github

Claude Code skill to bypass bot detection (Google CAPTCHA, etc.)

Stars
⭐ 147
License
MIT
Last Updated
2026-05-19
Source
github

playwright-bot-bypass v2.0

Claude Code skill to bypass bot detection using rebrowser-playwright with 8 stealth patches.

Installation

npx skills add greekr4/playwright-bot-bypass

Features

  • Pass bot.sannysoft.com all tests
  • Google search without CAPTCHA
  • Twitter/X scraping without login
  • Real GPU fingerprint (Apple M2, NVIDIA, etc.)
  • 8 fingerprint patches (webdriver, plugins, languages, permissions, canvas, etc.)
  • Human-like behavior simulation (mouse movement, typing delays)
  • Cookie persistence & proxy support
  • Works with Node.js and Python

A/B Test: bluer.co.kr (Real-World Bot Detection)

Tested against Blue Ribbon Survey — a site with active bot protection:

MetricStealth (this skill)Normal Playwright
HTTP Status200 OK403 Forbidden
navigator.webdriverundefinedtrue
navigator.plugins3 (patched)0 (detected)
navigator.languages[ko-KR, ko, en-US, en][en-US]
outerWidth - innerWidth16 (real chrome)0 (headless)
chrome.runtimePresentMissing
WebGL RendererApple M2 (real GPU)SwiftShader (software)
User-AgentClean ChromeHeadlessChrome

bot.sannysoft.com A/B

Standard Playwright (Detected)rebrowser-playwright (Bypassed)
DetectedStealth

Stealth Patches (8 vectors)

#PatchBypasses
1navigator.webdriver removalAll bot detectors
2chrome.runtime objectCloudflare, sannysoft
3navigator.plugins (3 plugins)Cloudflare Bot Management
4navigator.languages (ko-KR, en)Akamai (cross-checks HTTP header)
5Permissions API normalizationPerimeterX
6hardwareConcurrency / deviceMemoryAdvanced fingerprinters
7outerWidth / outerHeight offsetHeadless detection
8Canvas fingerprint noiseCloudflare Turnstile

Plus: --disable-blink-features=AutomationControlled, --no-sandbox, real Chrome via channel: 'chrome'

Quick Start

npm init -y && npm install rebrowser-playwright
import { createStealthBrowser, humanDelay, humanType, simulateMouseMovement } from './scripts/stealth-template.mjs';

const { browser, page } = await createStealthBrowser();

try {
  await page.goto('https://example.com');
  await simulateMouseMovement(page);  // Natural mouse movement
  await humanType(page, 'input', 'query');  // Human-like typing
  await humanDelay(300, 800);
} finally {
  await browser.close();
}

Template options

createStealthBrowser({
  headless: false,              // Required for stealth (default)
  viewport: { width: 1280, height: 800 },
  locale: 'ko-KR',             // Browser locale
  storageState: './session.json',  // Cookie persistence
  proxy: { server: 'http://proxy:8080' }  // Proxy support
});

Manual setup

import { chromium } from 'rebrowser-playwright';

const browser = await chromium.launch({
  headless: false,
  channel: 'chrome',
  args: ['--disable-blink-features=AutomationControlled', '--no-sandbox']
});

const context = await browser.newContext({
  locale: 'ko-KR',
  extraHTTPHeaders: { 'Accept-Language': 'ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7' }
});

await context.addInitScript(() => {
  delete Object.getPrototypeOf(navigator).webdriver;
  // ... see SKILL.md for full patch list
});

const page = await context.newPage();
try {
  await page.goto('https://google.com');
} finally {
  await browser.close();
}

Python

pip install undetected-chromedriver
import undetected_chromedriver as uc

driver = uc.Chrome()  # auto-detects Chrome version
driver.get('https://google.com')

Python playwright-stealth only patches at JS level — WebGL still shows SwiftShader. Use undetected-chromedriver instead.

Test Results

Environmentbot.sannysoft.comGoogle Searchbluer.co.kr
Standard PlaywrightDetectedCAPTCHA403
rebrowser-playwright (this)PassWorks200
playwright-stealth (Python)PassCAPTCHA-
undetected-chromedriverPassWorks-

Scripts Included

skills/playwright-bot-bypass/
  scripts/
    stealth-template.mjs      # Reusable stealth factory (all examples import this)
    bot-detection-test.mjs     # Verify bypass at bot.sannysoft.com
  examples/
    stealth-google-search.mjs  # Google search without CAPTCHA
    ab-test.mjs                # Side-by-side detected vs stealth
    stealth-twitter-scrape.mjs # Twitter/X profile scraping
  package.json                 # Dependencies (type: module)
  marketplace.json
  SKILL.md                     # Full documentation for Claude Code agents

Requirements

  • Node.js 18+ (ESM / .mjs)
  • Google Chrome installed (not just Chromium)
  • Headed mode (display required — headless: false)

Troubleshooting

ProblemFix
ERR_MODULE_NOT_FOUNDRun npm install rebrowser-playwright in your script directory
Browser not openingVerify Chrome: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version
WebGL shows SwiftShaderConfirm import is from rebrowser-playwright, not playwright
Still getting detectedAdd simulateMouseMovement() and humanDelay() between actions
Process hangsEnsure browser.close() is in a finally block

License

MIT