From opengov-garden
Implements Cloudflare Turnstile avoidance strategies using human-like browser automation patterns.
How this skill is triggered — by the user, by Claude, or both
Slash command
/opengov-garden:anti-detectionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Implements Cloudflare Turnstile avoidance strategies using human-like browser automation patterns.
Implements Cloudflare Turnstile avoidance strategies using human-like browser automation patterns.
⚠️ CRITICAL: There is NO login CAPTCHA on OpenGov in normal human browsing. Turnstile is a bot detection system that triggers when automation patterns look non-human.
If Turnstile triggers:
anti_bot_turnstile_triggered event with full context# GOOD: Paste URL into address bar, then press Enter
page.get_by_label("Address and search bar").fill(url)
await asyncio.sleep(random.uniform(0.5, 1.5))
page.keyboard.press("Enter")
# BAD: Direct navigation
page.goto(url) # ❌ Triggers detection
import random
# Base delay with jitter
base_delay = 0.5
jitter = random.uniform(0.2, 0.8)
total_delay = base_delay + jitter
await asyncio.sleep(total_delay)
# Move mouse naturally before click
await page.mouse.move(x - 10, y - 10)
await asyncio.sleep(0.1)
await page.mouse.move(x, y)
await asyncio.sleep(0.05)
await page.mouse.click(x, y)
user_agents = [
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36...",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)...",
# ... more diverse user agents
]
context = await browser.new_context(
user_agent=random.choice(user_agents)
)
viewports = [
{"width": 1920, "height": 1080},
{"width": 1366, "height": 768},
{"width": 1440, "height": 900},
]
context = await browser.new_context(
viewport=random.choice(viewports)
)
{
"playwright": {
"headless": false,
"slowMo": 100,
"timeout": 30000,
"antiDetection": {
"randomizeTimings": true,
"minDelay": 200,
"maxDelay": 800,
"jitterRange": 100,
"useNaturalMouseMovements": true,
"rotateUserAgent": true
}
}
}
playwright-navigation.md: Safe navigation patternsplaywright-core-automation.md: Core automation do's and don'tsplaywright-coordinate-control.md: Natural mouse movementsairflow-anti-bot-contract.md: Airflow-level anti-bot enforcementairflow-turnstile-response.md: Response to detection eventslogger.error(
"anti_bot_turnstile_triggered",
extra={
"url": current_url,
"action": "navigation_attempt",
"timestamp": datetime.now().isoformat(),
"user_agent": user_agent,
"session_id": session_id
}
)
turnstile_iframe = page.query_selector('iframe[src*="challenges.cloudflare.com"]')
if turnstile_iframe:
logger.error("Turnstile challenge detected")
raise TurnstileTriggeredException()
page.goto() instead of paste+enternpx claudepluginhub heaney-investments/opengov-garden --plugin opengov-gardenGuides browser automation with Playwright and Puppeteer for testing, scraping, and AI agent control. Covers selectors, anti-detection, and test isolation patterns.
Automates stealth Chromium browsing with pydoll to bypass Cloudflare WAF, Turnstile CAPTCHA, DataDome, and bot detections for scraping protected sites and human-like interactions.
Provides best practices for browser automation using Playwright and Puppeteer in web testing, scraping, and AI agents. Covers selectors, auto-waits, isolation, screenshots, and anti-detection.