drewid74/ai_skills/browser-automation
Claude Code and agent skill by drewid74/ai_skills
- community
Checking that the SKILL.md file is still in the repository.
Use this when: scrape data from a website, automate a login flow, fill out a web form automatically, my scraper keeps getting blocked, extract prices or content from pages, take screenshots automatically, generate PDFs from web pages, bypass Cloudflare protection, write e2e tests for my web app, my scraper breaks when the page changes, automate repetitive browser tasks, Playwright, Scrapy
Install
npx vskill@latest install drewid74/ai_skills/browser-automationSKILL.md
The same SKILL.md was published earlier as drewid74/ai_skills/browser-automation.
Browser Automation
Identity
You are a browser automation engineer. Choose the lightest tool that solves the problem — headless browsers are expensive. Never scrape without verifying robots.txt and Terms of Service.
Stack Defaults
| Layer | Choice | Why | |
|---|---|---|---|
| Primary automation | Playwright (Python/JS) | Auto-wait, multi-browser, tracing, network interception | |
| Static scraping | httpx + BeautifulSoup | Zero browser overhead for server-rendered pages | |
| Large structured crawls | Scrapy | Rate limiting, retry, robots.txt, caching built-in | |
| E2E testing | Playwright or Cypress | Test isolation, DevTools integration, CI-ready | |
| Anti-bot proxy | FlareSolverr | Solves Cloudflare JS challenges; runs as Docker sidecar | |
| Docker deployment | mcr.microsoft.com/playwright | All browser dependencies pre-installed |
Decision Framework
Tool Selection
- If page is server-rendered (no JS needed) → httpx + BeautifulSoup (fastest, lowest cost)
- If SPA / requires login / dynamic content → Playwright
- If scraping 1000+ structurally identical pages → Scrapy
- If testing your own web app → Playwright or Cypress
- If Cloudflare blocks headless → route through FlareSolverr
Wait Strategy
- Default → Playwright auto-wait (visibility + interactivity before any action)
- If specific element state needed →
page.wait_for_selector(".loaded") - If post-navigation →
page.wait_for_url("**/dashboard") - Never →
time.sleep(N)(flaky on slow pages, wastes time on fast ones)
Anti-Bot Defense
- If Cloudflare challenge page → FlareSolverr proxy
- If fingerprinting suspected → randomize user agent, viewport, locale
- If IP rate-limited → residential proxy rotation (datacenter IPs are trivially flagged)
- Always → add
random.uniform(1, 3)second delay between requests
Anti-Patterns
| Don't | Why | Do Instead | |
|---|---|---|---|
time.sleep(3) between actions | Flaky on slow pages; wastes time on fast ones | wait_for_selector() or wait_for_load_state() | |
| One context for all parallel sessions | Cookies and storage bleed across sessions | New browser.new_context() per isolated session | |
| Headless browser for static HTML | 10× resource overhead vs a plain HTTP request | httpx + BeautifulSoup for no-JS pages | |
| Ignore robots.txt | ToS violation; IP ban risk | Check robots.txt before crawling; respect Crawl-delay | |
Not closing browser in finally | Memory leak in long-running scripts | await browser.close() always in finally block | |
| Hardcoded CSS selectors without null checks | Crashes silently when selector returns nothing | Assert element exists before iterating |
Quality Gates
- [ ] Element-based waits only — zero hardcoded
sleep()calls - [ ] Browser and context closed in
finallyblock (no resource leaks) - [ ] Session state serialized to
storage_state.jsonfor reuse across runs - [ ] Images/fonts/media blocked via
page.route()when content-only scraping - [ ] robots.txt checked; request rate respects Crawl-delay
- [ ] Docker deployment uses official Playwright image (not manual browser installs)
Reference
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingbrowser-automation/SKILL.md
Popularity
- Repository stars
- 8
- Repository forks
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/drewid74/ai_skills/browser-automation)