feat: Replace Playwright MCP with agent-browser CLI

- Remove Playwright MCP server from plugin
- Add new agent-browser skill for CLI-based browser automation
- Rename /playwright-test to /test-browser command
- Update all commands and agents to use agent-browser CLI
- Update README and plugin.json

agent-browser is Vercel's headless browser CLI designed for AI agents.
It uses ref-based selection (@e1, @e2) from accessibility snapshots
and provides a simpler CLI interface compared to MCP tools.

Key benefits:
- No MCP server required
- Simpler Bash-based workflow
- Same ref-based element selection
- Better for quick automation tasks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Kieran Klaassen
2026-01-14 15:56:59 -08:00
parent 012a638d31
commit 31bd85f60b
11 changed files with 398 additions and 152 deletions

View File

@@ -445,8 +445,8 @@ After presenting the Summary Report, offer appropriate testing based on project
**For Web Projects:**
```markdown
**"Want to run Playwright browser tests on the affected pages?"**
1. Yes - run `/playwright-test`
**"Want to run browser tests on the affected pages?"**
1. Yes - run `/test-browser`
2. No - skip
```
@@ -460,7 +460,7 @@ After presenting the Summary Report, offer appropriate testing based on project
**For Hybrid Projects (e.g., Rails + Hotwire Native):**
```markdown
**"Want to run end-to-end tests?"**
1. Web only - run `/playwright-test`
1. Web only - run `/test-browser`
2. iOS only - run `/xcode-test`
3. Both - run both commands
4. No - skip
@@ -470,22 +470,22 @@ After presenting the Summary Report, offer appropriate testing based on project
#### If User Accepts Web Testing:
Spawn a subagent to run Playwright tests (preserves main context):
Spawn a subagent to run browser tests (preserves main context):
```
Task general-purpose("Run /playwright-test for PR #[number]. Test all affected pages, check for console errors, handle failures by creating todos and fixing.")
Task general-purpose("Run /test-browser for PR #[number]. Test all affected pages, check for console errors, handle failures by creating todos and fixing.")
```
The subagent will:
1. Identify pages affected by the PR
2. Navigate to each page and capture snapshots
2. Navigate to each page and capture snapshots (using Playwright MCP or agent-browser CLI)
3. Check for console errors
4. Test critical interactions
5. Pause for human verification on OAuth/email/payment flows
6. Create P1 todos for any failures
7. Fix and retry until all tests pass
**Standalone:** `/playwright-test [PR number]`
**Standalone:** `/test-browser [PR number]`
#### If User Accepts iOS Testing:

View File

@@ -181,11 +181,13 @@ This command takes a work document (plan, specification, or todo file) and execu
bin/dev # Run in background
```
**Step 2: Capture screenshots with Playwright MCP tools**
- `browser_navigate` to go to affected pages
- `browser_resize` to set viewport (desktop or mobile as needed)
- `browser_snapshot` to verify page state
- `browser_take_screenshot` to capture images
**Step 2: Capture screenshots with agent-browser CLI**
```bash
agent-browser open http://localhost:3000/[route]
agent-browser snapshot -i
agent-browser screenshot output.png
```
See the `agent-browser` skill for detailed usage.
**Step 3: Upload using imgup skill**
```bash