Add case study: Playwright MCP best practices for Claude Code CLI#1285
Add case study: Playwright MCP best practices for Claude Code CLI#1285
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #1284
This case study investigates the best practices for using Playwright with Claude Code CLI, comparing two primary approaches: - MCP (Model Context Protocol): claude mcp add playwright npx @playwright/mcp@latest - CLI + Skills: playwright-cli install --skills Key findings: - MCP approach is recommended for most users (simplest setup) - CLI + Skills offers ~33% token savings for high-throughput scenarios - Both approaches are valid and can be used together - No --tool claude flag exists (commands work independently) Includes: - Comparative analysis with feature table - Configuration examples and best practices - Security recommendations and troubleshooting guide - Comprehensive research sources with 15+ external references Resolves #1284 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This reverts commit 5dbe9b8.
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
In latest versions of Claude Code there new plugins suggestions. Are they are better than Playwright MCP, how it all work? I know plugin uses playwright-cli, instead of MCP server of Are these commands are correct? Can we support both Give me summary of current situation and proposed solutions. |
|
🤖 AI Work Session Started Starting automated work session at 2026-03-14T13:59:21.342Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
Address PR feedback about Claude Code plugins vs Playwright MCP: - Document three approaches: MCP server, official plugin, community skill - Clarify frontend-design plugin is NOT related to Playwright - Correct plugin install command syntax - Analyze MCP and plugin coexistence options - Add updated recommendations for 2026-03 - Add new research sources for plugin ecosystem Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary: Claude Code Plugins vs Playwright MCP (2026-03)Answering your questions:1. Are Claude Code plugins better than Playwright MCP? The official Playwright plugin ( The community Playwright Skill (lackeyjb/playwright-skill) takes a different approach — Claude writes and executes Playwright code directly instead of using MCP tools. It's more token-efficient (~314 lines of instructions) but designed for "scriptable manual testing", not CI/CD. 2. The 3. Correct plugin install commands:
Syntax: 4. Can both Playwright MCP and Playwright Plugin coexist?
5. Recommended setup: # Simplest: official plugin
/plugin install playwright@claude-plugins-official
npx playwright install
# Optional: add community skill for script-based testing
/plugin marketplace add lackeyjb/playwright-skill
/plugin install playwright-skill@playwright-skillAll findings have been added to the case study in Sources: Claude Code Plugins Docs · Discover Plugins Docs · Official Playwright Plugin Source · Frontend Design Plugin · Playwright Skill HN |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (attempt 1)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. Will continue until PR becomes mergeable. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🔄 Auto-restart-until-mergeable Log (iteration 1)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
Summary
This PR adds a comprehensive case study investigating Playwright MCP best practices for Claude Code CLI (Issue #1284).
Key Findings
Three Approaches to Playwright in Claude Code (2026):
claude mcp add playwright npx @playwright/mcp@latest/plugin install playwright@claude-plugins-official(wraps the same MCP server)lackeyjb/playwright-skill(Claude writes and executes Playwright code directly)The
frontend-designplugin is NOT related to Playwright — it's an Anthropic design aesthetics skill (324K+ installs)Correct plugin install commands:
claude plugin install @anthropic/frontend-design/plugin install frontend-design@anthropics-claude-code/plugin install frontend-design@claude-plugins-official/plugin install playwright@claude-plugins-officialMCP and Plugin can coexist — the official plugin wraps the same MCP server, so choose one. The community Playwright Skill (approach 3) IS complementary and can be used alongside either.
Files Changed
docs/case-studies/issue-1284/README.md- Comprehensive case study with:docs/case-studies/issue-1284/research-sources.md- All 20+ research sources consulted.changeset/playwright-mcp-best-practices.md- Changeset for version bumpRecommendations
For most Claude Code CLI users (simplest path):
For advanced users wanting both MCP tools AND efficient scripted testing:
Test Plan
docs/case-studies/.mcp.jsonsource)SKILL.mdsource)Fixes #1284
🤖 Generated with Claude Code