Use this skill for real browser tasks: JS-rendered pages, multi-step forms, screenshots or PDFs, UI debugging, Playwright test authoring, MCP-driven browser control, and structured extraction from rendered pages.
Prefer it when static fetch is insufficient or when the task depends on browser events, visible DOM state, authentication context, uploads or downloads, or user-facing rendering.
If the user mainly wants the agent to drive a browser with simple actions like navigate, click, fill, screenshot, download, or extract, treat MCP as a first-class path.
Use direct Playwright for scripts and tests. Use MCP when browser tools are already in the loop, the user explicitly wants MCP, or the fastest path is browser actions rather than writing new automation code.
Primary fit is repo-owned browser work: tests, debugging, repros, screenshots, and deterministic automation. Treat rendered-page extraction as a secondary use case, not the default identity.
This skill is instruction-only. It does not create local memory, setup folders, or persistent profiles by default.
Load only the smallest reference file needed for the task. Keep auth state temporary unless the repository already standardizes it and the user explicitly wants browser-session reuse.
bash
npx @playwright/mcp --headless
Use this path when the agent already has browser tools available or the user wants browser automation without writing new Playwright code.
Typical Playwright MCP tool actions include:
browser_navigate for opening a pagebrowser_click and browser_press for interactionbrowser_type and browser_select_option for formsbrowser_snapshot and browser_evaluate for inspection and extractionbrowser_choose_file for uploadsGoalTypical MCP-style actionOpen and inspect a sitenavigate, wait, inspect, screenshotComplete a formnavigate, click, fill, select, submitCapture evidencescreenshot, PDF, download, tracePull structured page datanavigate, wait for rendered state, extractReproduce a UI bugheaded run, trace, console or network inspection
bash
npx playwright test
npx playwright test --headed
npx playwright test --trace on
bash
npx playwright codegen https://example.com
javascript
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({ headless: true });
const page = await browser.newPage();
await page.goto('https://example.com');
await page.screenshot({ path: 'page.png', fullPage: true });
await browser.close();
})();
TopicFileSelector strategy and frame handlingselectors.mdFailure analysis, traces, logs, and headed runsdebugging.mdTest architecture, mocks, auth, and assertionstesting.mdCI defaults, retries, workers, and failure artifactsci-cd.mdRendered-page extraction, pagination, and respectful throttlingscraping.md
SituationBest pathWhyStatic HTML or a simple HTTP response is enoughUse a cheaper fetch path firstFaster, cheaper, less brittleYou need a reliable first draft of selectors or flowsStart with codegen or a headed exploratory runFaster than guessing selectors from source or stale DOMLocal app, staging app, or repo-owned E2E suiteUse @playwright/testBest fit for repeatable tests and assertionsOne-off browser automation, screenshots, downloads, or rendered extractionUse direct Playwright APISimple, explicit, and easy to debug in codeAgent/browser-tool workflow already depends on browser_* tools or the user wants no-code browser controlUse Playwright MCPFastest path for navigate-click-fill-screenshot workflowsCI failures, flake, or environment driftStart with debugging.md and ci-cd.mdTraces and artifacts matter more than new code
codegen, headed mode, or traces to discover stable locators instead of guessing from source or stale DOM.first(), last(), or nth() unless position is the actual behavior under test.expect, URL waits, response waits, and explicit app-ready signals over generic timing guesses.first(), last(), or nth() to silence ambiguity -> the automation works once and then flakes.force: true before understanding overlays, disabled state, or actionability -> the test hides a real bug.networkidle for chatty SPAs -> analytics, polling, or sockets keep the page "busy" even when the UI is ready.EndpointData SentPurposeUser-requested web originsBrowser requests, form input, cookies, uploads, and page interactions required by the taskAutomation, testing, screenshots, PDFs, and rendered extractionhttps://registry.npmjs.orgPackage metadata and tarballs during optional installationInstall Playwright or Playwright MCP
No other data is sent externally.
Data that leaves your machine:
Data that stays local:
This skill does NOT:
By using this skill, browser requests go to the websites you automate and optional package downloads go through npm. Only install if you trust those services and the sites involved in your workflow.
Install with clawhub install <slug> if user confirms:
web - HTTP-first investigation before escalating to a real browser.scrape - Broader extraction workflows when browser automation is not the main challenge.screenshots - Capture and polish visual artifacts after browser work.multi-engine-web-search - Find and shortlist target pages before automating them.clawhub star playwrightclawhub sync