// Automated feature verification using Playwright MCP and Claude Code CLI. Use when verifying UI features, running acceptance tests, checking feature completion status, or validating features.json verification steps. Integrates with agentic-development workflow for progress tracking.
| name | playwright-verification |
| description | Automated feature verification using Playwright MCP and Claude Code CLI. Use when verifying UI features, running acceptance tests, checking feature completion status, or validating features.json verification steps. Integrates with agentic-development workflow for progress tracking. |
Automated browser-based verification of features.json using Microsoft's Playwright MCP server and Claude Code CLI.
# In Claude Code CLI
claude
> /project:verify p6-sound-list # Verify single feature
> /project:verify-all # Verify all incomplete features
# One-time setup
npm install -D @playwright/test
npx playwright install chromium
# Add MCP to Claude Code (per-project)
claude mcp add playwright -- npx @playwright/mcp@latest --headless
features.json Claude Code Playwright MCP
โ โ โ
โ verification: [ โ โ
โ "Click X", โ Parse steps โ
โ "Panel opens" โโโโโโโโโโโโโโโโโโโโโโโโโ>โ
โ ] โ โ
โ โ browser_click("X") โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโ>โ
โ โ โ Execute
โ โ browser_snapshot() โ
โ โ<โโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โ passes: true โ Update JSON โ
โ<โโโโโโโโโโโโโโโโโโโโโโ โ
Map plain English verification steps to Playwright MCP actions:
| Step Pattern | Playwright Action | Example |
|---|---|---|
| "Click X button/toggle" | browser_click | "Click Sound Browser toggle" |
| "Panel opens/closes" | browser_snapshot + assert | "Panel opens showing categories" |
| "X visible/shown" | browser_snapshot + find element | "Search input visible" |
| "X hidden/not visible" | browser_snapshot + assert absent | "Panel closes on click-away" |
| "Typing X filters Y" | browser_type + browser_snapshot | "Typing filters samples" |
| "Persists via localStorage" | browser_evaluate | "Theme persists via localStorage" |
| "Shortcut X does Y" | browser_press_key + verify | "Escape stops all audio" |
| "Works when X not focused" | browser_click outside + action | "Works when REPL not focused" |
| "Double-click X" | browser_click with count:2 | "Double-click inserts name" |
Features with dependencies are skipped if dependencies haven't passed:
{
"id": "p6-sound-search",
"dependencies": ["p6-sound-list"], // Must pass first
"passes": false
}
Verification order respects dependency graph automatically.
Verify a single feature by ID.
Usage:
/project:verify p6-sound-list
Process:
Output:
=== Verifying: p6-sound-list ===
โ Click Sound Browser toggle button
โ Panel opens showing sample categories
โ Each category expands to show sample names
โ Sample count displayed per category
โ Panel closes on toggle or click-away
Result: 4/5 passed - FAIL
Verify all incomplete features in current phase.
Usage:
/project:verify-all
Process:
Output:
=== Phase 6 Verification Summary ===
Passing: 3/16
โโโ p6-sound-list โ
โโโ p6-shortcut-halt โ
โโโ p6-hud-fps โ
Failed: 1/16
โโโ p6-sound-search โ (step 3)
Skipped: 2/16 (dependencies not met)
โโโ p6-sound-preview
โโโ p6-sound-insert
Next priority: p6-sound-search
Available tools when Playwright MCP is connected:
| Tool | Purpose |
|---|---|
browser_navigate | Go to URL |
browser_click | Click element by name/role |
browser_type | Type into focused element |
browser_press_key | Press keyboard key |
browser_snapshot | Get accessibility tree |
browser_evaluate | Run JavaScript in page |
browser_scroll | Scroll page/element |
browser_wait | Wait for condition |
Playwright MCP uses accessibility tree, not screenshots. Element identification via:
button, textbox, heading, etc.checked, expanded, disabledExample snapshot fragment:
- button "Sound Browser" [ref=btn1]
- region "Sound Panel" [ref=panel1]
- heading "Drums"
- list
- listitem "bd" [ref=item1]
- listitem "sd" [ref=item2]
basilisk-av/
โโโ .claude/
โ โโโ settings.json # MCP config
โ โโโ commands/
โ โโโ verify.md # Single feature command
โ โโโ verify-all.md # Batch command
โโโ features.json # Feature definitions
โโโ claude-progress.txt # Session tracking
โโโ init.sh # Dev startup
{
"meta": {
"project": "basilisk-av",
"currentPhase": 6,
"lastUpdated": "2025-12-12"
},
"features": [
{
"id": "p6-feature-name",
"phase": 6,
"category": "category-name",
"description": "What it does",
"priority": "high|medium|low",
"dependencies": ["p6-other-feature"],
"verification": [
"Step 1 in plain English",
"Step 2 in plain English"
],
"passes": false
}
]
}
Rules:
passes field during verification# Remove headless flag
claude mcp remove playwright
claude mcp add playwright -- npx @playwright/mcp@latest
# Now browser window visible during verification
claude
> /mcp
# Should list: playwright
claude
> Use playwright to navigate to localhost:5173 and take a snapshot
| Issue | Solution |
|---|---|
| MCP not found | claude mcp add playwright -- npx @playwright/mcp@latest |
| Browser won't launch | npx playwright install chromium |
| Element not found | Check accessibility tree with browser_snapshot |
| Timeout | Increase wait, check dev server running |
| WSL display issues | Use --headless or set DISPLAY=:0 |
This skill extends the agentic-development workflow:
init.sh shows feature status/project:verify <id> runs automated checksclaude-progress.txt updated automatically# Start session
./init.sh
# Check what to work on
# โ Shows: "Next incomplete: p6-sound-list"
# Implement feature...
# Verify implementation
claude
> /project:verify p6-sound-list
# If passing, move to next
> /project:verify p6-sound-search
# End session - progress auto-tracked
Good:
"verification": [
"Click Sound Browser toggle button",
"Panel opens showing sample categories",
"Click 'Drums' category header",
"Category expands showing sample names",
"Click toggle button again",
"Panel closes"
]
Bad:
"verification": [
"Sound browser works",
"Categories load from Strudel API and render in React state",
"UX is intuitive"
]
# .github/workflows/verify.yml
name: Feature Verification
on: [push]
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npx playwright install chromium
- run: npm run dev &
- run: sleep 5
- run: |
# Run verification via Playwright test file
npx playwright test verify.spec.ts