qa
QA — Smart Browser Testing
Automates what a developer does manually: navigate, interact, trigger API calls, verify results. Uses Playwright MCP for interactions and agent-browser for video recording and visual diffs.
Input
Accept either:
- Natural language flow: "Create a recipe with 3 ingredients, verify nutrition calculates"
- URL + instructions:
http://localhost:3000/orders+ "Click New Order, fill supplier, submit"
If no URL provided, default to http://localhost:3000.
Step 1: Prepare
mkdir -p .qa
grep -qxF '.qa/' .gitignore 2>/dev/null || echo '.qa/' >> .gitignore
Check if dev server is running: curl -s -o /dev/null -w "%{http_code}" <url>. If not reachable, ask user to start it.
Step 2: Auth Check
- Navigate to URL via Playwright MCP
browser_navigate browser_snapshotthe page- Look for login form indicators (input[type=password], /login in URL, auth-related text)
- If not logged in: Tell user to log in manually in their browser, then say "done". Re-check after.
- If logged in: Proceed to test execution.
Step 3: Execute Test Flow
Parse the user's flow into numbered steps. Launch a single subagent that uses smart tool selection:
Tool Selection Rules
| Task | Tool | Command |
|---|---|---|
| Start video | agent-browser | agent-browser open <url> then agent-browser record start .qa/recording.webm |
| Navigate | Playwright MCP | browser_navigate |
| Get element refs | Playwright MCP | browser_snapshot (re-snapshot before EVERY interaction) |
| Click / Fill / Select | Playwright MCP | browser_click, browser_fill_form, browser_select_option |
| Wait for response | Playwright MCP | browser_wait_for |
| Check API calls | Playwright MCP | browser_network_requests |
| Check console errors | Playwright MCP | browser_console_messages with level "error" |
| Take screenshot | Playwright MCP | browser_take_screenshot with filename .qa/<NN>-<step>.png |
| Visual before/after diff | agent-browser | agent-browser diff screenshot --baseline .qa/<before>.png |
| Stop video | agent-browser | agent-browser record stop |
Subagent Prompt Template
Execute the following QA test flow at {URL}. Use Playwright MCP tools for all interactions and agent-browser for video recording.
Setup:
agent-browser open {URL}— connect to the pageagent-browser record start .qa/recording.webm— start videoTest steps: {numbered steps from user's flow description}
For EACH step:
browser_snapshotfirst to get fresh element refs- Execute the interaction via Playwright MCP
browser_take_screenshotwith filename.qa/<NN>-<step-name>.pngbrowser_network_requestsafter any action that triggers an API callbrowser_console_messagesto check for new errors- Report: PASS or FAIL with what was observed
Teardown:
agent-browser record stop— save videobrowser_close— close Playwright browseragent-browser close— close agent-browserReport format per step: Step N: Result: PASS/FAIL Observed: API: <method endpoint -> status> (if applicable) Screenshot: .qa/-.png Errors: <console errors or "none">
Step 4: Report
After the subagent completes, output the combined report:
======================================
QA: <flow description>
======================================
Step 1: <description>
PASS — <observation>
Step 2: <description>
PASS — <observation>
API: POST /api/endpoint -> 201
Step 3: <description>
FAIL — Expected X, got Y
Screenshot: .qa/03-step-name.png
Console errors: <list or "none">
Video: .qa/recording.webm
Screenshots: .qa/ (<N> files)
======================================
VERDICT: <ALL PASS | PARTIAL | FAIL> (N/M steps)
======================================
On failure: include exact expected vs actual, reference the screenshot, and note the video has the full recording for debugging.
Auto-trigger Usage
After completing code changes that affect UI, ask the user:
"What flow should I QA? (e.g., 'test the order creation at localhost:3000/orders')"
Then run the full QA flow above.
More from bhagyamudgal/skills
review-pr
Deep, anti-slop review of a GitHub PR. Grounds findings in the linked issue's intent, runs a Claude reviewer (+ conditional silent-failure hunter) in parallel with existing CodeRabbit comments fetched from the PR, then critic-passes the findings before printing. Use when user says "review this pr", pastes a GitHub PR URL, or asks "check this pull request". NOT for local uncommitted changes — use /parallel-review for those.
12fix-pr-review
Triage and fix CodeRabbit / review-pr findings on a GitHub PR, then reply + resolve conversations. Classifies each finding (FIX/DISMISS/DEFER/DISAGREE/NEEDS-INPUT), runs /done, posts specific replies. Use on CodeRabbit review URLs, PR URLs, or local review files. Pairs with /review-pr.
7forge-plan
Use when starting any non-trivial feature or design task that needs the full idea-to-implementation pipeline. Also use when user says "forge", "forge plan", "full pipeline", or wants the complete AI development workflow before shipping.
6harden-plan
Pre-code quality gate that runs /review-pr's anti-slop lens against a written plan BEFORE any code is written. Grounds the plan against the real codebase, runs 11 category checks (security, concurrency, round-trip, control-flow, error-handling, pattern-consistency, plus /review-pr's Q1-Q6), then grills the user one question at a time until the plan is hardened. Use when the user says "harden my plan", "check my plan", "grill my plan before I code", "lint this plan", or invokes `/harden-plan` explicitly. Also invoke proactively after `/superpowers:brainstorm` or `/grill-me` completes with a written plan and before any implementation begins. Do NOT invoke after coding has started — redirect to `/review-pr` / `/fix-pr-review` in that case.
6project-discovery
Deep project discovery and architecture planning. Use when starting a new project, when user says "new project", "let's build", or asks for help architecting/planning a non-trivial application.
5done
MANDATORY post-task verification. Run after EVERY task — no exceptions, no skipping, regardless of task size. Executes type-check, parallel code review, and code simplification in sequence.
4