Browser Automation
Browser automation powers web testing, scraping, and AI agent interactions. The difference between a flaky script and a reliable system comes down to understanding selectors, waiting strategies, and anti-detection patterns.
This skill covers Playwright (recommended) and Puppeteer, with patterns for testing, scraping, and agentic browser control. Key insight: Playwright won the framework war. Unless you need Puppeteer's stealth ecosystem or are Chrome-only, Playwright is the better choice in 2025.
Critical distinction: Testing automation (predictable apps you control) vs scraping/agent automation (unpredictable sites that fight back). Different problems, different solutions.
When to Use
- User mentions or implies: playwright
- User mentions or implies: puppeteer
- User mentions or implies: browser automation
- User mentions or implies: headless
- User mentions or implies: web scraping
- User mentions or implies: e2e test
- User mentions or implies: end-to-end
- User mentions or implies: selenium
- User mentions or implies: chromium
- User mentions or implies: browser test
Core Workflow
- Confirm the request matches this skill's trigger, scope, and risk profile.
- Use the topic map to identify the relevant pattern, checklist, or example before writing detailed guidance or code.
- Load
references/full-guidance.md when implementation details, examples, anti-patterns, validation checks, or edge cases are needed.
- Apply only the relevant guidance instead of loading or repeating the entire reference by default.
- Verify the result against any validation checks, limitations, security notes, or platform constraints in the reference.
Topic Map
- Principles
- Capabilities
- Scope
- Tooling
- Frameworks
- Stealth_tools
- Cloud_browsers
- Patterns
- Test Isolation Pattern
- Playwright Test Example
- Shared Authentication Pattern
- User-Facing Locator Pattern
- Good Examples (User-Facing)
- Bad Examples (Fragile)
- Filtering and Chaining
- Auto-Wait Pattern
- Wrong - Manual Waits
- Correct - Let Auto-Wait Work
Reference Map
references/full-guidance.md preserves the complete original guidance, including examples and detailed edge cases.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Progressive Loading
Keep this SKILL.md as the compact routing and workflow entrypoint. Load the reference file only when the user task requires the deeper implementation material.
1---2name: browser-automation3description: Browser automation powers web testing, scraping, and AI agent4license: MIT5---67# Browser Automation89Browser automation powers web testing, scraping, and AI agent interactions. The difference between a flaky script and a reliable system comes down to understanding selectors, waiting strategies, and anti-detection patterns.1011This skill covers Playwright (recommended) and Puppeteer, with patterns for testing, scraping, and agentic browser control. Key insight: Playwright won the framework war. Unless you need Puppeteer's stealth ecosystem or are Chrome-only, Playwright is the better choice in 2025.1213Critical distinction: Testing automation (predictable apps you control) vs scraping/agent automation (unpredictable sites that fight back). Different problems, different solutions.1415## When to Use16- User mentions or implies: playwright17- User mentions or implies: puppeteer18- User mentions or implies: browser automation19- User mentions or implies: headless20- User mentions or implies: web scraping21- User mentions or implies: e2e test22- User mentions or implies: end-to-end23- User mentions or implies: selenium24- User mentions or implies: chromium25- User mentions or implies: browser test2627## Core Workflow281. Confirm the request matches this skill's trigger, scope, and risk profile.292. Use the topic map to identify the relevant pattern, checklist, or example before writing detailed guidance or code.303. Load `references/full-guidance.md` when implementation details, examples, anti-patterns, validation checks, or edge cases are needed.314. Apply only the relevant guidance instead of loading or repeating the entire reference by default.325. Verify the result against any validation checks, limitations, security notes, or platform constraints in the reference.3334## Topic Map35- Principles36- Capabilities37- Scope38- Tooling39- Frameworks40- Stealth_tools41- Cloud_browsers42- Patterns43- Test Isolation Pattern44- Playwright Test Example45- Shared Authentication Pattern46- User-Facing Locator Pattern47- Good Examples (User-Facing)48- Bad Examples (Fragile)49- Filtering and Chaining50- Auto-Wait Pattern51- Wrong - Manual Waits52- Correct - Let Auto-Wait Work5354## Reference Map55- `references/full-guidance.md` preserves the complete original guidance, including examples and detailed edge cases.5657## Limitations58- Use this skill only when the task clearly matches the scope described above.59- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.60- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.6162## Progressive Loading63Keep this `SKILL.md` as the compact routing and workflow entrypoint. Load the reference file only when the user task requires the deeper implementation material.