mcp-playwright
Browser automation via Playwright MCP — navigate, interact, screenshot, and inspect web pages headlessly. Use for: 'scrape this page', 'fill out a web form', 'take a screenshot of a URL', 'check if a site is up'. Use when no browser session exists.
What this skill does
<objective> Automate browser interactions through the Playwright MCP server via mcporter CLI. Navigate to URLs, click elements, fill forms, take screenshots, and read page content — all headless by default. Use this when you need to interact with web pages, verify UI, scrape content, or test web flows. **Playwright MCP vs Claude-in-Chrome**: Use Playwright MCP for headless/CI/server automation where no browser window exists. Use Claude-in-Chrome MCP tools for interactive browser sessions where the user has Chrome open with the extension. </objective> <process> ## Call Syntax ```bash # Colon-delimited mcporter call playwright.TOOL_NAME key:value --output json # Function-call style mcporter call 'playwright.TOOL_NAME(key: "value")' --output json ``` ## Tool Reference ### Navigation | Tool | Parameters | Description | |------|-----------|-------------| | `browser_navigate` | `url` | Navigate to a URL | | `browser_navigate_back` | — | Go back to previous page | | `browser_close` | — | Close the current page | ### Observation | Tool | Parameters | Description | |------|-----------|-------------| | `browser_snapshot` | — | Accessibility snapshot of the page (primary observation tool) | | `browser_take_screenshot` | — | Capture a PNG screenshot | | `browser_console_messages` | — | Get browser console output | | `browser_network_requests` | — | List network requests made by the page | ### Interaction | Tool | Parameters | Description | |------|-----------|-------------| | `browser_click` | `element`, `ref` | Click an element (use ref from snapshot) | | `browser_type` | `element`, `ref`, `text` | Type text into an input | | `browser_select_option` | `element`, `ref`, `values` | Select dropdown options | | `browser_hover` | `element`, `ref` | Hover over an element | | `browser_drag` | `startElement`, `startRef`, `endElement`, `endRef` | Drag and drop | | `browser_press_key` | `key` | Press a keyboard key | ### Forms | Tool | Parameters | Description | |------|-----------|-------------| | `browser_fill_form` | `fields` | Fill multiple form fields at once | ### JavaScript | Tool | Parameters | Description | |------|-----------|-------------| | `browser_evaluate` | `expression` | Run a JavaScript expression in the page | | `browser_run_code` | `code` | Run a Playwright code snippet | ### Tabs, Waiting & Dialogs | Tool | Parameters | Description | |------|-----------|-------------| | `browser_tabs` | — | List open tabs | | `browser_wait_for` | `text` or `timeout` | Wait for text to appear or a timeout | | `browser_handle_dialog` | `accept` | Accept or dismiss a dialog | | `browser_file_upload` | `paths` | Upload files to a file input | ### Setup | Tool | Parameters | Description | |------|-----------|-------------| | `browser_install` | — | Install the browser binary if missing | ## Common Workflows ### Scrape Page Content ```bash # Navigate and get accessibility tree mcporter call 'playwright.browser_navigate(url: "https://example.com")' --output json mcporter call playwright.browser_snapshot --output json # Extract specific data via JavaScript mcporter call 'playwright.browser_evaluate(expression: "document.querySelector(\"h1\").textContent")' --output json ``` ### Fill and Submit a Form ```bash # Navigate and inspect mcporter call 'playwright.browser_navigate(url: "https://example.com/login")' --output json mcporter call playwright.browser_snapshot --output json # Use refs from snapshot to interact mcporter call 'playwright.browser_type(element: "Username field", ref: "e3", text: "[email protected]")' --output json mcporter call 'playwright.browser_type(element: "Password field", ref: "e5", text: "password")' --output json mcporter call 'playwright.browser_click(element: "Submit button", ref: "e7")' --output json ``` ### Take a Screenshot ```bash mcporter call 'playwright.browser_navigate(url: "https://example.com")' --output json mcporter call playwright.browser_take_screenshot --output json ``` ### Debug a Page ```bash mcporter call 'playwright.browser_navigate(url: "https://example.com")' --output json mcporter call playwright.browser_console_messages --output json mcporter call playwright.browser_network_requests --output json ``` </process> <tips> - Discover all tools and parameters: `mcporter list playwright --all-parameters` - **Headless by default**: The server runs `--headless` since Claude operates in a terminal. No display server needed. - **First call is slower**: npx downloads `@playwright/mcp` on the first invocation. Subsequent calls reuse the cached package. - **Use `browser_snapshot` as your primary observation tool** — it returns an accessibility tree with element refs that you use for `browser_click`, `browser_type`, etc. - **Element refs**: After a `browser_snapshot`, use the `ref` values (e.g., `"e3"`) to target elements in interaction tools. - **Empty accessibility tree?** Use `browser_wait_for` with a timeout or text selector to wait for dynamic content to load, then retry `browser_snapshot`. - No authentication required — this server runs locally via npx. - **Install browser if needed**: If Playwright browsers aren't installed, call `browser_install` first. - Extended capabilities: Pass `--caps` flags when configuring the server for vision mode, PDF generation, or testing features. - Use `--output json` for machine-readable results. </tips>
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.