From e2e-pipeline
Use when creating or updating UI element mappings for E2E testing — mapping page selectors, capturing app structure, or refreshing stale mappings. Triggers on "e2e map", "map the UI", "update mapping", "refresh mapping", "map selectors", "create mapping".
How this skill is triggered — by the user, by Claude, or both
Slash command
/e2e-pipeline:e2e-mapThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate or update the UI element mapping for a web application. Codebase analysis and user interaction run in main context; browser exploration is delegated to the `e2e-mapper` agent.
Generate or update the UI element mapping for a web application. Codebase analysis and user interaction run in main context; browser exploration is delegated to the e2e-mapper agent.
/e2e-map [--scope page|full] [--page <page-name>] [--interactive]
--scope page --page dashboard: re-explore a single page--interactive: skip agent dispatch, run browser exploration inline (for debugging)--page Mode BehaviorWhen --page <name> is specified:
pages.<name> and any dialogs with trigger_page: <name>. Preserve all other pages unchanged.If no mapping exists yet (first map for this app):
base_url (e.g., "What URL is your dev server running at?")app name (e.g., "What should I call this app?")If mapping exists, read base_url and app from it.
agent-browser --version
curl -s -o /dev/null -w "%{http_code}" <base_url>
ls ~/.agent-browser/<app>/ 2>/dev/null && echo "OK" || echo "MISSING"
If agent-browser is not installed: "agent-browser CLI not found. Install it globally — the mapper agent needs it to explore pages and extract selectors. See: https://github.com/anthropics/agent-browser" Stop.
If the dev server is unreachable (non-2xx/3xx or connection error): "Server not reachable at <base_url>. The mapper agent navigates real pages to extract selectors — the dev server must be running. Start it and retry." Stop.
Any 2xx or 3xx HTTP response means the server is running.
First-Run Auth (if mapping exists but profile missing):
auth.type: none in mapping: skip auth entirely.agent-browser --profile ~/.agent-browser/<app> --headed open <base_url>, read auth.manual_prompt from mapping and present to user. Verify using auth.verification condition. If verification fails, re-prompt user. Profile persists — login is one-time only.Use subagents in parallel to gather UI structure from source code.
Glob: <codebase.routes_glob> (from mapping; skip if not defined)
If no mapping exists yet (first map) and no routes_glob: ask user for source directory or skip codebase analysis. If user skips, proceed to Phase 2 (browser-only exploration).
Search in source directory (infer from routes_glob path prefix, or use the directory provided by user). These are examples — adapt patterns to the project's framework:
Grep for: data-testid=" in <source_dir>
Grep for: aria-label=" in <source_dir>
Grep for: Dialog|Drawer|Modal|Popover in <source_dir> (React/Vue)
Read sidebar/navigation components. Adapt globs to the project's framework:
React/Next.js: <source_dir>/**/Sidebar*.tsx, Nav*.tsx, layout.tsx
Django/Flask: <source_dir>/**/urls.py, views.py
Generic: <source_dir>/**/*nav*, *sidebar*, *menu*
Non-file-based routing: Some frameworks (Refine, admin panels) define routes via config objects instead of file-based routing. If standard route patterns yield nothing, ask the user for the framework's route configuration approach.
Compile a route map from discovered paths.
If codebase analysis yields no results, proceed to Phase 2 with browser-only exploration — the agent will discover pages by following links from base_url.
After Phase 1 completes (or is skipped), proceed to Phase 2.
After Phase 1, prepare the agent input and dispatch.
| Field | Source | Required? |
|---|---|---|
base_url | From existing mapping or user prompt | Required |
app | From existing mapping or user prompt | Required |
auth_profile | ~/.agent-browser/<app>/ | Required |
report_dir | $(pwd)/e2e-reports/$(date +%Y%m%d-%H%M%S)-map | Required |
routes | Phase 1 codebase analysis output (may be empty) | Optional |
existing_mapping_path | Path to current mapping (if updating) | Optional |
target_page | From --page flag | Optional |
auth_config | {type, verification, manual_prompt} from existing mapping | Optional |
headed | true (default; set false for headless) | Optional |
Agent(subagent_type="e2e-mapper"):
base_url: <url>
app: <app name>
auth_profile: ~/.agent-browser/<app>/
routes: [list from Phase 1 codebase analysis]
existing_mapping_path: <path if updating>
target_page: <page name if --page mode>
report_dir: $(pwd)/e2e-reports/$(date +%Y%m%d-%H%M%S)-map
auth_config: {type, verification, manual_prompt} from existing mapping
headed: true
Agent returns:
mapping_path — draft YAML written to report_dirpages_found — list of pages exploredelements_mapped — count of elementsunexplored_areas — dialogs/modals behind triggers (feeds Phase 4)report_dir/If agent fails (no Summary block, or reports 0 pages found): Report the agent's output to the user with: "Mapper agent did not return a valid mapping. Check the report at <report_dir> for details. Common causes: server went down during exploration, auth session expired, or no navigable pages found." Ask user whether to retry or switch to --interactive mode.
If --interactive flag: Skip agent dispatch. Run browser exploration in main context using agent-browser directly — navigate each route, snapshot, extract elements, build mapping inline. Use Skill: "agent-browser" patterns.
After Phase 2 completes (agent returns summary or interactive exploration finishes), proceed to Phase 4.
Show the user what was found and what remains unexplored (dialogs, modals, drawers behind triggers). When user picks an area:
snapshot + screenshot --annotate on the revealed contentRepeat until user says "done." After user confirms done, proceed to Phase 5.
.claude/e2e/mappings/<app>.yaml. If the file already exists (re-mapping with --page), read the current mapping first and merge — update changed elements, add new elements, preserve unchanged pages. Never overwrite the entire file.
"Mapping for <page> is up to date. No changes needed." Skip writing the file and proceed to step 3..claude/e2e/flows/ and run /e2e-test?"Generated flow MUST use v2 format:
name: <flow-name>
description: "<description>"
tags: [smoke]
mapping: <mapping-filename-no-ext> # REQUIRED
steps:
- id: <unique-step-id> # REQUIRED — not `name:`
action: "<natural language>"
expect:
- "<element_name> is visible" # grammar strings — NOT structured objects
screenshot: true
Never generate v1 format (app: instead of mapping:, step name: instead of id:, structured expect objects).
agent-browser closeAfter writing the mapping, check if other mappings exist:
ls .claude/e2e/mappings/*.yaml
If other mappings found, suggest multi-site commands (/e2e-test --all-sites, etc.). If this is the only mapping, skip the hint.
| Mistake | Fix |
|---|---|
| Overwriting existing mapping | Always Read the current mapping first; merge, don't replace |
| Missing hidden elements | Phase 4 exists for this — list what needs interaction to reveal |
| Agent returns stale auth | Check profile exists in pre-flight; re-auth before dispatch if needed |
| Skipping codebase analysis | Phase 1 gives the agent a route list — without it, exploration is slower and may miss pages |
npx claudepluginhub iamcxa/claude-e2e-pipelineGenerates E2E tests using Playwright CLI with Page Object Model and visual regression via @visual tags for web apps. Use with target URLs for exploration and test creation.
Generates page objects and test infrastructure for Playwright, Cypress, or Selenium E2E tests. Covers critical-path test implementation and flakiness remediation.
Runs AI-powered adversarial UI testing via the browse CLI — analyzes git diffs, explores full apps, and tests functional correctness, accessibility, responsive layout, and UX heuristics. Use for QA pull requests, auditing accessibility, or exploratory testing.