Use after fe-review passes to validate user flows end-to-end in the browser.
How this skill is triggered — by the user, by Claude, or both
Slash command
/frontend-react-plugin:fe-e2eThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run end-to-end tests on generated code using agent-browser. Starts a Vite dev server with MSW mocks enabled, then drives browser scenarios defined in plan.json.
Run end-to-end tests on generated code using agent-browser. Starts a Vite dev server with MSW mocks enabled, then drives browser scenarios defined in plan.json.
Tool choice: This skill uses
Agent(notTask) to launch the e2e-test-runner agent. E2E scenarios are sequential — each may depend on prior browser state — soAgentis used for synchronous execution with immediate result inspection.
.claude/frontend-react-plugin.json → extract mockFirst, baseDir, appDirbaseDir is missing, use default value "src"mockFirst is missing, use default value trueappDir is missing, use default value "." (project root)"Frontend React Plugin has not been initialized. Please run
/frontend-react-plugin:fe-initfirst."
Check if docs/specs/{feature}/.implementation/frontend/plan.json exists
"Implementation plan not found." "Please run
/frontend-react-plugin:fe-plan {feature}first."
Read plan.json → extract feature, e2eTests, routes
Read docs/specs/{feature}/.progress/{feature}.json → extract workingLanguage (default: "en"), implementation.status
Language name mapping: en = English, ko = Korean, vi = Vietnamese
Communication language: All user-facing output in this skill must be in {workingLanguage_name}.
Status check — verify implementation.status indicates code has been generated:
generated, verified, verify-failed, reviewed, review-failed, fixing, resolved, escalated, done"planned", "gen-failed", or absent:
"No generated code found (current status: '{status}')." "Please run
/frontend-react-plugin:fe-gen {feature}first."
E2E scenarios check — verify e2eTests exists and is non-empty in plan.json:
e2eTests is absent or empty:
"No E2E scenarios defined in the implementation plan." "Add multi-page test scenarios to
test-scenarios.mdand re-run/frontend-react-plugin:fe-plan {feature}."
6b. Route-to-scenario URL validation — cross-check E2E URLs against route definitions:
startUrl values from e2eTests[]path values from routes.entries in plan.jsonstartUrl:
/entities/ent-001 matches /entities/:id)routes.entriesstartUrl has no matching route:
"Warning: E2E scenario '{id}' uses URL '{startUrl}' but no matching route found in plan.json." "Available routes: {list of route paths}" "Options: 1. Continue anyway 2. Update plan first (
/frontend-react-plugin:fe-plan {feature})"
Agent-browser CLI check:
agent-browser --version 2>&1
"agent-browser CLI is not installed. Install with one of:" " npm i -g agent-browser" " brew install agent-browser" " cargo install agent-browser"
Agent-browser skill check — verify .claude/skills/agent-browser/SKILL.md exists:
"Agent-browser skill not installed. Run
/frontend-react-plugin:fe-initto install external skills."
Check docs/specs/{feature}/.implementation/frontend/.lock:
lockedAt and operationlockedAt → stale lock, delete and proceed"Another operation is in progress: '{operation}' (started: {lockedAt})"
{ "lockedAt": "{ISO timestamp}", "operation": "fe-e2e" }
Display the E2E test plan:
E2E Testing for '{feature}':
Plan: docs/specs/{feature}/.implementation/frontend/plan.json
Dev server: http://localhost:5173 (VITE_ENABLE_MOCKS=true)
Scenarios ({scenarioCount}):
{id}: {name} ({stepCount} steps) — {source}
{id}: {name} ({stepCount} steps) — {source}
...
Prerequisites:
agent-browser: {version}
MSW mocks: {enabled/disabled}
Ask:
"Proceed with E2E testing?"
If the user declines, release the lock and stop here.
Check if port 5173 is already in use:
lsof -i :5173 -t 2>/dev/null
"Port 5173 is already in use (PID: {pid})." "Options: 1. Use a different port 2. Kill the existing process 3. Cancel"
Start the Vite dev server in background (from {appDir}):
cd {appDir} && VITE_ENABLE_MOCKS=true npx vite --port {port} &
VITE_PID=$!
echo "Vite PID: $VITE_PID"
If
appDiris".", omit thecdprefix.
Wait for server readiness (max 30 seconds):
for i in $(seq 1 30); do
curl -s -o /dev/null -w "%{http_code}" http://localhost:{port} 2>/dev/null | grep -q "200" && break
sleep 1
done
Verify the server is running:
curl -s -o /dev/null -w "%{http_code}" http://localhost:{port}
"Dev server failed to start within 30 seconds." "Check Vite configuration and try again."
Before launching the full E2E suite, verify the app loads without runtime errors:
Open the app in agent-browser:
agent-browser open http://localhost:{port} --session e2e-{feature}-healthcheck
agent-browser wait --network idle --session e2e-{feature}-healthcheck
agent-browser snapshot --session e2e-{feature}-healthcheck
Read the snapshot output and check for:
If any of the above are detected:
agent-browser screenshot e2e-screenshots/{feature}/healthcheck-FAIL.png --session e2e-{feature}-healthcheck
agent-browser close --session e2e-{feature}-healthcheck
"App failed runtime health check. The page did not render correctly." "{description of what was found: blank page / error overlay / stuck loading}" "Fix runtime issues first:
/frontend-react-plugin:fe-debug {feature}or/frontend-react-plugin:fe-fix {feature}"
If the app renders content successfully, close the healthcheck session:
agent-browser close --session e2e-{feature}-healthcheck
Agent(subagent_type: "e2e-test-runner", prompt: "
Execute E2E test scenarios for '{feature}'.
Parameters:
- feature: {feature}
- planFile: docs/specs/{feature}/.implementation/frontend/plan.json
- specDir: docs/specs/{feature}/{workingLanguage}/
- baseDir: {baseDir}
- port: {port}
- e2eTests: {e2eTests from plan.json}
- workingLanguage: {workingLanguage}
Follow the process defined in agents/e2e-test-runner.md.
Read .claude/skills/agent-browser/SKILL.md for agent-browser command reference.
Read templates/e2e-testing.md for plugin-specific E2E patterns.
")
On completion:
On failure (agent error, not test failure):
Always stop the dev server, even if tests failed:
kill {VITE_PID} 2>/dev/null
# Verify the process is stopped
kill -0 {VITE_PID} 2>/dev/null && kill -9 {VITE_PID} 2>/dev/null
Display the results from the e2e-test-runner agent:
E2E Test Report for '{feature}':
Status: {PASS/PARTIAL/FAIL}
Scenarios:
{PASS/FAIL} {id}: {name} — {source}
{step results if failed}
{PASS/FAIL} {id}: {name} — {source}
...
Summary:
Passed: {passed}/{total} scenarios
Failed: {failed} scenarios
Screenshots: e2e-screenshots/{feature}/
{If PARTIAL or FAIL:}
Failed Scenarios:
{id}: {name}
Step {N}: {action} — FAIL
Expected: {expected}
Actual: {actual}
Evidence: {screenshot path}
Save the full report to docs/specs/{feature}/.implementation/frontend/e2e-report.json.
Status mapping from agent output: The e2e-test-runner agent uses different status values than the progress file. When saving e2e-report.json, keep the agent's original status values (completed/partial/failed). The progress file uses the normalized mapping below:
| Agent output | Progress file | Display |
|---|---|---|
completed | pass | PASS |
partial | partial | PARTIAL |
failed | fail | FAIL |
Read docs/specs/{feature}/.progress/{feature}.json and update:
1. E2E field — add or update the e2e field under implementation:
{
"implementation": {
"e2e": {
"status": "pass | partial | fail",
"timestamp": "{ISO timestamp}",
"total": 5,
"passed": 4,
"failed": 1,
"scenarios": [
{ "id": "E2E-001", "name": "Create entity flow", "status": "pass", "source": "TS-050, TS-051" },
{ "id": "E2E-002", "name": "Edit entity flow", "status": "fail", "source": "TS-060" }
],
"reportFile": "docs/specs/{feature}/.implementation/frontend/e2e-report.json"
}
}
}
2. Status update — update implementation.status based on E2E result:
e2e.status is "pass") AND current implementation.status is "fixing":
→ Set implementation.status = "done" (E2E fix loop completed)implementation.statusMerge rule: Read the existing progress file, merge changes into the existing implementation object preserving all other fields (e.g., planFile, tddPhases, verification, review, fix, debug), then write back the complete file.
If all scenarios pass:
"E2E testing complete. All {total} scenarios passed." "Feature is ready for deployment or further review."
If some scenarios fail:
"E2E testing found {failed} failing scenario(s)." "You are now in the E2E testing loop (Loop 2). The fix → re-e2e cycle continues until all scenarios pass." "Fix E2E issues:
/frontend-react-plugin:fe-fix {feature}" "Then re-run E2E:/frontend-react-plugin:fe-e2e {feature}"
If all scenarios fail:
"All E2E scenarios failed. This may indicate a fundamental issue." "Debug:
/frontend-react-plugin:fe-debug {feature}" "Or fix:/frontend-react-plugin:fe-fix {feature}"
If E2E passes after previous E2E fix cycle and code changes were significant:
"E2E tests pass. If significant code changes were made during E2E fixes, consider re-running:" "
/frontend-react-plugin:fe-review {feature}(to verify code quality is maintained)"
Delete docs/specs/{feature}/.implementation/frontend/.lock.
npx claudepluginhub ohmyhotelco/hare-cc-plugins --plugin frontend-react-pluginWrites and runs feature-based E2E tests for user flows in browser after /verify. Supports Playwright, Cypress, agent-browser; runs dev server and validates interactions.
Tests local web applications using Playwright: verifies frontend functionality, debugs UI behavior, captures screenshots, views logs. Mandatory before declaring implementation complete.