browser-automation
What it does
It gives the agent tools and patterns for controlling a browser with Playwright, for collecting data or completing repeated web tasks. It is for people automating web research, data collection or form work.
When to use it
- βWhen you want data collected from a website, such as a table or search results.
- βWhen you need a multi-step web task such as filling in forms or downloading files.
- βWhen you want screenshots or PDFs of web pages captured automatically.
Skill link
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/browser-automation/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI need you to collect the product names and prices from this store listing page into a spreadsheet.β
5 new skills a week. 1 minute to read.
How it works
The agent drives a browser with Playwright, waits for pages to load, extracts the content and saves the results. Helper scripts build scrapers and form flows.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Browser Automation - POWERFUL
Overview
The Browser Automation skill provides comprehensive tools and knowledge for building production-grade web automation workflows using Playwright. This skill covers data extraction, form filling, screenshot capture, session management, and anti-detection patterns for reliable browser automation at scale.
When to use this skill:
- 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
When NOT to use this skill:
- Writing browser tests or E2E test suites β use playwright-pro instead
- Testing API endpoints β use api-test-suite-builder instead
- Load testing or performance benchmarking β use performance-profiler instead
Why Playwright over Selenium or Puppeteer:
- Auto-wait built in β no explicit
sleep()orwaitForElement()needed for most actions - Multi-browser from one API β Chromium, Firefox, WebKit with zero config changes
- Network interception β block ads, mock responses, capture API calls natively
- Browser contexts β isolated sessions without spinning up new browser instances
- Codegen β
playwright codegenrecords your actions and generates scripts - Async-first β Python async/await for high-throughput scraping
Core Competencies
1. Web Scraping Patterns
Selector priority (most to least reliable):
data-testid,data-id, or custom data attributes β stable across redesigns#idselectors β unique but may change between deploys- Semantic selectors:
article,nav,main,sectionβ resilient to CSS changes - Class-based:
.product-card,.priceβ brittle if classes are generated (e.g., CSS modules) - Positional:
nth-child(),nth-of-type()β last resort, breaks on layout changes
Use XPath only when CSS cannot express the relationship (e.g., ancestor traversal, text-based selection).
Pagination strategies: next-button, URL-based (?page=N), infinite scroll, load-more button. See data_extraction_recipes.md for complete pagination handlers and scroll patterns.
2. Form Filling & Multi-Step Workflows
Break multi-step forms into discrete functions per step. Each function fills fields, clicks "Next"/"Continue", and waits for the next step to load (URL change or DOM element).
Key patterns: login flows, multi-page forms, file uploads (including drag-and-drop zones), native and custom dropdown handling. See playwright_browser_api.md for complete API reference on fill(), select_option(), set_input_files(), and expect_file_chooser().
3. Screenshot & PDF Capture
- Full page:
await page.screenshot(path="full.png", full_page=True) - Element:
await page.locator("div.chart").screenshot(path="chart.png") - PDF (Chromium only):
await page.pdf(path="out.pdf", format="A4", print_background=True) - Visual regression: Take screenshots at known states, store baselines in version control with naming:
{page}_{viewport}_{state}.png
See playwright_browser_api.md for full screenshot/PDF options.
4. Structured Data Extraction
Core extraction patterns:
- Tables to JSON β Extract
<thead>headers and<tbody>rows into dictionaries - Listings to arrays β Map repeating card elements using a field-selector map (supports
::attr()for attributes) - Nested/threaded data β Recursive extraction for comments with replies, category trees
See data_extraction_recipes.md for complete extraction functions, price parsing, data cleaning utilities, and output format helpers (JSON, CSV, JSONL).
5. Cookie & Session Management
- Save/restore cookies:
context.cookies()andcontext.add_cookies() - Full storage state (cookies + localStorage):
context.storage_state(path="state.json")to save,browser.new_context(storage_state="state.json")to restore
Best practice: Save state after login, reuse across scraping sessions. Check session validity before starting a long job β make a lightweight request to a protected page and verify you are not redirected to login. See playwright_browser_api.md
FAQ
Is this for testing websites?
No. Browser tests are covered by a different skill, playwright-pro.
Can it handle JavaScript-heavy sites?
Yes. It covers extracting data from single-page apps that load content with JavaScript.
Can it run on several browsers?
Yes. Playwright supports Chromium, Firefox and WebKit from one interface.
Details
Original description by the author
Use for browser automation, scraping, form filling or structured extraction from web pages. Builds scrapers with scraping_toolkit.py and form flows with form_automation_builder.py. Browser testing: playwright-pro.
Popularity
- GitHub stars
- 29k
- Ranking position
- #9577
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
agent-launcher-orchestrator
29kHelps your agent plan, build, test and schedule a Claude managed agent in your own account, step by step, starting from one clear goal.
grade-iterate
29kLets your agent grade a managed AI agent's work against a rubric and improve it in a fixed number of rounds, so it never loops forever.
interview
29kLets your agent interview you about an AI agent idea and turn your answers into a simple build plan before anything is launched.
run-without-you
29kHelps your agent set up a managed AI agent to run on a schedule or when an event happens, with the cron timing checked before launch.
Similar skills
tavily
394kHelps your agent search the web with Tavily and pull the text from specific web pages, with options for depth, domains, and dates.
blogwatcher
394kLets your agent follow blogs and RSS or Atom feeds, check them for new articles, and mark the ones you have read.
data-scraper-agent
280kHelps your agent automatically collect data from any public source. It can be scheduled, enrich information, and save results. Useful for monitoring or tracking online data.