playwright-mcp-skill
Playwright MCP Skill
Use this skill to run Playwright MCP operations through uxc using fixed stdio endpoints.
Reuse the uxc skill for generic protocol discovery, auth/error handling, and envelope parsing rules.
Prerequisites
uxcis installed and available inPATH.npxis available inPATH(Node.js installed).- Network access for first-time
@playwright/mcppackage fetch. - Browser runtime can start locally (headless mode is default in this skill).
Core Workflow (Playwright-Specific)
Endpoint candidate inputs before finalizing:
- Raw package form from docs:
npx @playwright/mcp@latest - Reliable non-interactive form:
npx -y @playwright/mcp@latest - Isolated/headless stable form (default for this skill):
npx -y @playwright/mcp@latest --headless --isolated- Shared-profile headless form (for persistent login state):
npx -y @playwright/mcp@latest --headless --user-data-dir ~/.uxc/playwright-profile- Shared-profile headed form (for interactive debug with same login state):
npx -y @playwright/mcp@latest --user-data-dir ~/.uxc/playwright-profile
- Verify protocol/path from official source and probe:
- Official source:
https://github.com/microsoft/playwright-mcp - probe candidate endpoints with:
uxc "npx -y @playwright/mcp@latest --headless --isolated" -h
- Confirm protocol is MCP stdio (
protocol == "mcp"in envelope).
- Official source:
- Detect auth requirement explicitly:
- Run host help or a minimal read call and inspect envelope.
@playwright/mcpdefault flow is no OAuth/API key for local stdio use.
- Use fixed link command by default:
command -v playwright-mcp-cli- If missing, create it:
uxc link playwright-mcp-cli "npx -y @playwright/mcp@latest --headless --isolated"
- Optional shared-profile dual command setup for persistent sessions:
command -v playwright-mcp-headlesscommand -v playwright-mcp-uiuxc link --daemon-exclusive ~/.uxc/playwright-profile playwright-mcp-headless "npx -y @playwright/mcp@latest --headless --user-data-dir ~/.uxc/playwright-profile"uxc link --daemon-exclusive ~/.uxc/playwright-profile playwright-mcp-ui "npx -y @playwright/mcp@latest --user-data-dir ~/.uxc/playwright-profile"
playwright-mcp-cli -h- If command conflict is detected and cannot be safely reused, stop and ask skill maintainers to pick another fixed command name.
- Inspect operation schema before execution:
playwright-mcp-cli browser_navigate -hplaywright-mcp-cli browser_snapshot -hplaywright-mcp-cli browser_click -h
- Prefer read-first interaction:
- Start with navigation/snapshot before mutating page state.
- Execute actions with explicit confirmation when impact is high:
- Confirm before form submission, checkout, delete/destructive actions, or irreversible multi-step flows.
Guardrails
- Keep automation on JSON output envelope; do not rely on
--text. - Parse stable fields first:
ok,kind,protocol,data,error. - Use
playwright-mcp-clias default command path. playwright-mcp-cli <operation> ...is equivalent touxc "npx -y @playwright/mcp@latest --headless --isolated" <operation> ....- Use direct
uxc "<endpoint>" ...only as temporary fallback when link setup is unavailable. - If browser profile conflict appears, keep
--isolatedin endpoint and retry via the same fixed link command. - When using shared
--user-data-dir, run headless/headed links serially (not concurrently). - To enable seamless switching between headed UI login and headless CLI automation using the same profile directory, set a daemon exclusive key:
- Prefer link-level setup (recommended above), or set
UXC_DAEMON_EXCLUSIVE=~/.uxc/playwright-profilefor ad-hoc runs. - If the profile is still busy (another session is actively running), fallback:
uxc daemon stop
- Prefer link-level setup (recommended above), or set
- Prefer
browser_snapshotover screenshots for model-action loops.
References
- Invocation patterns:
references/usage-patterns.md
More from holon-run/uxc
chrome-devtools-mcp-skill
Use Chrome DevTools MCP through UXC over local stdio for page navigation, DOM/a11y snapshots, network inspection, console inspection, and performance tooling, with a live-browser autoConnect default and optional browserUrl or isolated fallback modes.
53uxc
Discover and call remote schema-exposed interfaces with UXC. Use when an agent or skill needs to list operations, inspect operation schemas, and execute OpenAPI, GraphQL, gRPC, MCP, or JSON-RPC calls via one CLI contract.
44linear-graphql-skill
Operate Linear workspace issues, projects, and teams through Linear GraphQL API using UXC. Use when tasks require querying or creating issues, managing projects, or interacting with Linear workflow. Supports both Personal API Key and OAuth authentication.
25notion-mcp-skill
Operate Notion workspace content through Notion MCP using the UXC CLI, including search, fetch, users/teams lookup, page/database creation and updates, and comments. Use when tasks require calling Notion tools over MCP with OAuth (authorization_code + PKCE), especially when safe write controls and JSON-envelope parsing are required.
11thegraph-token-mcp-skill
Use The Graph Token API MCP through UXC for token metadata, wallet balances, transfers, holders, pools, and market data with help-first inspection and Token API specific JWT bearer auth binding.
10discord-openapi-skill
Operate Discord HTTP API through UXC with Discord OpenAPI schema. Bot token recommended for full API access including messages and server management. OAuth2 user authentication available for limited profile operations only.
9