All-my-ai-needs playwright
Use when the task requires automating a real browser. This skill is MCP-only and uses `playwright-ext` (`@playwright/mcp --extension`) to attach to the browser extension session.
git clone https://github.com/codingSamss/all-my-ai-needs
T=$(mktemp -d) && git clone --depth=1 https://github.com/codingSamss/all-my-ai-needs "$T" && mkdir -p ~/.claude/skills && cp -r "$T/platforms/claude/skills/playwright" ~/.claude/skills/codingsamss-all-my-ai-needs-playwright && rm -rf "$T"
platforms/claude/skills/playwright/SKILL.mdPlaywright MCP Skill
Use Playwright as the reliable browser execution layer in a three-layer stack:
- Scrapling: extraction-first
- PinchTab: low-token browser inspection and lightweight interaction
: reliable browser executionplaywright-ext
Use a single channel only:
- Always use
MCP.playwright-ext - Do not use
wrapper in this skill.playwright-cli - Do not pivot to
unless the user explicitly asks for test files.@playwright/test
Role In The Stack
Prefer Scrapling when:
- the task is mainly scraping, parsing, or structured extraction.
- HTTP or dynamic fetchers can solve the page without a browser-first workflow.
Prefer PinchTab when:
- the user mainly needs quick browser inspection, page text, or lightweight tab/session steps.
- low-token page probing is enough to make the next decision.
Choose Playwright when:
- the workflow is interaction-heavy and must be verified step by step.
- success depends on stable refs, precise DOM transitions, or repeated re-snapshot control.
- upstream tools already proved that a lighter layer is not reliable enough for the current task.
Prerequisite check (required)
Before proposing browser actions, verify MCP and runtime dependency:
claude mcp list | rg "playwright-ext" command -v npx >/dev/null 2>&1
If
playwright-ext is missing, sync Claude MCP template first:
./setup.sh core claude mcp list | rg "playwright-ext"
If
npx is missing, ask the user to install Node.js/npm:
node --version npm --version brew install node
Core workflow
- Confirm that the task truly needs reliable browser execution rather than lighter extraction or inspection layers.
- Open the page.
- Snapshot to get stable element refs.
- Interact using refs from the latest snapshot.
- Re-snapshot after navigation or significant DOM changes.
- Verify page state after each important action.
- Capture artifacts (screenshot, pdf, traces) when useful.
Takeover Rules
Take over from Scrapling or PinchTab when:
- the current layer cannot prove that the intended page state change really happened.
- login/session flow, modal flow, or multi-step navigation needs strong ref discipline.
- the workflow has become complex enough that repeated browser verification is cheaper than continued fallback guessing.
When Playwright takes over, say why it is now required and keep the flow inside Playwright until the critical interaction is verified.
If taking over from PinchTab failure, require brief triage evidence before takeover:
,pinchtab health
, and one smoke test result (or equivalent evidence)pinchtab instances- categorize the switch reason as one of:
,service-down
,auth-blocked
,capability-gaphigher-repair-cost - include one concise handoff note in user-facing progress updates
When to snapshot again
Snapshot again after:
- navigation
- clicking elements that change the UI substantially
- opening/closing modals or menus
- tab switches
Refs can go stale. When a command fails due to a missing ref, snapshot again.
Guardrails
- Do not position Playwright as the default first hop when Scrapling or PinchTab can solve the task more cheaply.
- Always snapshot before referencing element ids like
.e12 - Re-snapshot when refs seem stale.
- Prefer explicit commands over
andeval
unless needed.run-code - When you do not have a fresh snapshot, use placeholder refs like
and say why; do not bypass refs witheX
.run-code - State the takeover reason when inheriting a task from Scrapling or PinchTab.
- Use
when a visual check will help.--headed - When capturing artifacts in this repo, use
and avoid introducing new top-level artifact folders.output/playwright/ - Default to MCP actions and workflows, not Playwright test specs.