Headless Browser Automation
Integrate Playwright as a skill so agents can navigate single-page applications, click elements, and extract data dynamically.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- Headless Browser Automation
- description
- Integrate Playwright as a skill so agents can navigate single-page applications, click elements, and extract data dynamically.
03 SKILL.md 正文
Headless Browser Automation Instructions
When a user asks you to extract data from a modern web app (React, Vue, SPA) where basic curl commands fail, DO NOT use GUI mouse clicks. Instead, use Playwright via Python.
Workflow
- Write a temporary Python script (
/tmp/playwright_script.py) usingrun_commandthat imports playwright. - The script must launch a headless chromium browser.
- Use Playwright's
page.goto(),page.wait_for_selector(), andpage.locator().inner_text()methods. - Print the extracted data to standard out (
print()). - Run the script using
python3 /tmp/playwright_script.py.
This guarantees robust data extraction without interfering with the user's active desktop environment.
04 同仓库更多 Skills
Web Scraper
Scrape text content from URLs without launching a slow GUI browser.
TDD (Test-Driven Development) Workflow
Enforces a strict Test-Driven Development workflow for new features and bug fixes.
Strict Output Formatting
Enforces strict JSON schemas for any data the agent outputs to ensure reliability across systems.
Session Continuity
Maintains state across multiple agent commands to handle complex, multi-step logins or navigate paginated dashboards.
Plan-Before-Code
A workflow that forces the agent to output a structured implementation plan and identify edge cases before writing any production code.
macOS System Admin
Expert commands and workflows for controlling macOS hardware and system settings via CLI.