Claude-code-blueprint e2e-check
Run E2E tests or interactive browser verification. Triggers on: 'run e2e', 'e2e test', 'browser test', 'check in browser', 'verify UI', 'interactive test'.
install
source · Clone the upstream repo
git clone https://github.com/faizkhairi/claude-code-blueprint
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/faizkhairi/claude-code-blueprint "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/e2e-check" ~/.claude/skills/faizkhairi-claude-code-blueprint-e2e-check && rm -rf "$T"
manifest:
skills/e2e-check/SKILL.mdsource content
Run E2E tests or perform interactive browser-based verification using Playwright.
Mode Detection
Parse
$ARGUMENTS to determine mode:
- Runner mode (default): Run the Playwright test suite via CLI
- Interactive mode: If
or--interactive
appears in args, use Playwright MCP tools for manual browser walkthroughinteractive
Runner Mode
1. Detect project
From
$ARGUMENTS or current working directory:
- Match project name from cwd (e.g.,
if cwd containsmy-app
)my-app - Check
in the project root for the configured dev port and test commandCLAUDE.md - No match: ask which project to target
2. Pre-flight check
Check if the dev server is running on the expected port (read from
CLAUDE.md or package.json):
Use:
bash -c "curl -s -o /dev/null -w '%{http_code}' http://localhost:{port}/ 2>/dev/null" or equivalent.
If the server is NOT running:
- Report: "Dev server not running on port {port}. Start it with
/yarn dev
, then re-run /e2e-check."npm run dev - Do NOT auto-start the dev server. Stop here.
3. Run tests
Run the E2E test command from
CLAUDE.md or package.json (e.g., yarn test:e2e or npm run test:e2e).
If a test filter was provided (e.g.,
auth), resolve it to the spec file path:
→authtests/e2e/auth.spec.ts- Full path → use as-is
4. Parse output
Extract from Playwright output:
- Total, passed, failed, skipped counts
- Duration
- On failure: spec file name, test name, error message
5. Report
E2E Test Results -- {project} ================================ Total: X | Passed: X | Failed: X | Skipped: X Duration: Xs Baseline: {expected from CLAUDE.md} tests [If failures:] FAILURES: - {spec-file} > {test-name}: {error summary} [If screenshots saved:] Screenshots: test-results/{spec-file}/
6. On failure
- Check
directory for saved screenshotstest-results/ - Analyze failure type: timeout? Element not found? Assertion mismatch? Network error?
- Suggest fix based on the failure pattern
Interactive Mode
Use Playwright MCP tools to manually verify a user journey in the browser.
1. Navigate
Use
mcp__playwright__browser_navigate to open http://localhost:{port} (port from CLAUDE.md).
ALWAYS use
, NEVER localhost
(cookie domain mismatch issues).127.0.0.1
2. Default journey (if no specific flow in args)
- Navigate to login page
- Fill credentials using
(use dev test credentials frommcp__playwright__browser_fill_form
or.env
).env.test - Submit login form via
mcp__playwright__browser_click - Wait for dashboard to load via
mcp__playwright__browser_wait_for - Take snapshot via
-- verify dashboard renders data (not empty state)mcp__playwright__browser_snapshot - Navigate to a key page (e.g., main feature list, report list)
- Verify data is present (not loading spinner, not error)
- Take screenshot via
as evidencemcp__playwright__browser_take_screenshot
3. Custom journey
If args specify a flow (e.g.,
--interactive reports), walk through that specific flow step by step using:
for page navigationmcp__playwright__browser_navigate
to read current page state (DOM)mcp__playwright__browser_snapshot
for form inputsmcp__playwright__browser_fill_form
for button/link clicksmcp__playwright__browser_click
for dropdownsmcp__playwright__browser_select_option
for loading/transition statesmcp__playwright__browser_wait_for
for visual evidencemcp__playwright__browser_take_screenshot
4. Report
Summarize:
- What pages were visited
- What was verified (data rendered, forms worked, navigation succeeded)
- Any issues found (errors, empty states, broken elements)
- Screenshot paths for evidence
Rules
- Always
, neverlocalhost
-- cookie domain issues127.0.0.1 - Dev port: read from
orCLAUDE.md
for the active projectpackage.json - Package manager: check
or detect from lockfile (CLAUDE.md
→ yarn,yarn.lock
→ npm)package-lock.json - Never auto-start dev servers -- report and stop if not running
- E2E baselines: compare against baseline documented in
CLAUDE.md