Browser Automation

Browser Automation is a skill for building production-grade web automation workflows using Playwright. It covers scraping structured data, filling forms, capturing screenshots/PDFs, managing sessions, and applying anti-detection patterns. It produces Python scripts and data outputs like JSON or CSV.

✨ What it does

  • Provides Playwright-based scraping patterns with selector priority guidance.
  • Includes form filling and multi-step workflow automation patterns.
  • Supports screenshot and PDF capture with full-page and element options.
  • Offers structured data extraction recipes for tables, listings, and nested data.
  • Covers cookie/session management and anti-detection techniques.
  • Includes error handling and retry logic with exponential backoff.

🎯 When to use it

  • Scraping structured data from websites (tables, listings, search results).
  • Automating multi-step browser workflows (login, fill forms, download files).
  • Capturing screenshots or PDFs of web pages.
  • Extracting data from SPAs and JavaScript-heavy sites.
  • Building repeatable browser-based data pipelines.

🚀 How to use

Trigger by asking to automate a browser task, scrape a website, fill forms, capture screenshots, or extract structured data. The skill expects a description of the target site and the data or actions needed. Example prompts:

Scrape product listings from example.com and save to JSON.
Automate login and download the monthly report from my portal.

For code generation, use the provided scripts like scraping_toolkit.py with flags such as --url and --selectors.

📄 Output: Python automation scripts, extracted data files (JSON, CSV, JSONL), screenshots, PDFs, or downloaded files.

📦 Add this skill to Claude Code

# 1. Get the skills repo
git clone --depth 1 https://github.com/alirezarezvani/claude-skills /tmp/claude-skills

# 2. Copy this skill into your project (or ~/.claude/skills for all projects)
mkdir -p .claude/skills
cp -r /tmp/claude-skills/engineering/skills/browser-automation .claude/skills/browser-automation

Skill source: engineering/skills/browser-automation/SKILL.md

⚠️ Good to know

Not for browser testing (use playwright-pro), API testing (use api-test-suite-builder), or load testing (use performance-profiler).

❓ FAQ

What is the recommended selector priority?

Use data-testid or custom data attributes first, then IDs, semantic selectors, class-based, and finally positional selectors as last resort.

How can I avoid detection when scraping?

Remove the WebDriver flag, use a custom user agent, set a realistic viewport, add random delays, and optionally use proxies.

How do I handle pagination?

Use next-button, URL-based, infinite scroll, or load-more patterns. Check for the next button and click it, waiting for new content to load.

🤖 Overview, features, install steps and FAQ were generated from the project's SKILL.md on Sep 4, 2026. Always check the original source before running commands.