원클릭으로
e2e-test
[Testing] Use when generating, updating, or maintaining E2E tests from recordings, specs, or code changes.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
[Testing] Use when generating, updating, or maintaining E2E tests from recordings, specs, or code changes.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
[Architecture] Use when designing solution architecture across backend, frontend, deployment, monitoring, testing, and code quality.
[Utilities] Use when you need to answer technical and architectural questions.
[Content] Use when you need to brainstorm as a PO/BA — structured ideation for problem-solving, new product creation, or feature enhancement.
[Git] Use when the user asks to compare branches, analyze git diffs, review changes between branches, update specifications based on code changes, or analyze what changed.
[Project Management] Use when creating user stories, writing acceptance criteria, analyzing requirements, or mapping business processes.
[Content] Use when you need to evaluate business idea viability: Business Model Canvas, financial projections, risk matrix, go-to-market, execution plan.
| name | e2e-test |
| description | [Testing] Use when generating, updating, or maintaining E2E tests from recordings, specs, or code changes. |
Codex compatibility note:
- Invoke repository skills with
$skill-namein Codex; this mirrored copy rewrites legacy Claude/skill-namereferences.- Task tracker mandate: BEFORE executing any workflow or skill step, create/update task tracking for all steps and keep it synchronized as progress changes.
- User-question prompts mean to ask the user directly in Codex.
- Ignore Claude-specific mode-switch instructions when they appear.
- Strict execution contract: when a user explicitly invokes a skill, execute that skill protocol as written.
- Subagent authorization: when a skill is user-invoked or AI-detected and its protocol requires subagents, that skill activation authorizes use of the required
spawn_agentsubagent(s) for that task.- Do not skip, reorder, or merge protocol steps unless the user explicitly approves the deviation first.
- For workflow skills, execute each listed child-skill step explicitly and report step-by-step evidence.
- If a required step/tool cannot run in this environment, stop and ask the user before adapting.
Codex uses static project-reference loading instead of runtime-injected project docs. When coding, planning, debugging, testing, or reviewing, open project docs explicitly using this routing.
Always read:
docs/project-config.json (project-specific paths, commands, modules, and workflow/test settings)docs/project-reference/docs-index-reference.md (routes to the full docs/project-reference/* catalog)docs/project-reference/lessons.md (always-on guardrails and anti-patterns)Missing/stale context route: If docs/project-config.json, the docs index, lessons.md, CLAUDE.md, AGENTS.md, or any task-required reference doc is missing or stale, auto-run $project-init or the narrow setup route ($project-config, $docs-init, $scan-all, $scan --target=<key>, $claude-md-init) before ordinary project-specific work. If Codex mirrors or AGENTS.md are missing/stale, ask the user to run $sync-codex; do not auto-run it.
Situation-based docs:
backend-patterns-reference.md, domain-entities-reference.md, project-structure-reference.mdfrontend-patterns-reference.md, scss-styling-guide.md, design-system/README.mddocs/specs/ pathing, or TC format: feature-spec-reference.md, spec-system-reference.md, spec-principles.mdworkflow-spec-test-code-cycle-reference.md plus the spec docs abovespec-system-reference.md and source Feature Specs under docs/specs/integration-test-reference.mde2e-test-reference.mdcode-review-rules.md plus domain docs above based on changed filesDo not read all docs blindly. Start from docs-index-reference.md, then open only relevant files for the task.
[BLOCKING] Execute skill steps in declared order. NEVER skip, reorder, or merge steps without explicit user approval. [BLOCKING] Before each step or sub-skill call, update task tracking: set
in_progresswhen step starts, setcompletedwhen step ends. [BLOCKING] Every completed/skipped step MUST include brief evidence or explicit skip reason. [BLOCKING] If Task tools are unavailable, create and maintain an equivalent step-by-step plan tracker with the same status transitions.
Goal: Produce maintainable, spec-traceable E2E tests (TC-{MODULE}-E2E-{NNN}) from recordings, specs, or code changes that protect business behavior using the project's configured framework (Playwright, Selenium, Cypress, others) — so future UI changes break tests only when intended behavior breaks.
Summary:
docs/project-reference/e2e-test-reference.md + the e2eTesting block of docs/project-config.json FIRST, then detect the framework from project files — never assume a stack or invent a TC-annotation marker.TC-{MODULE}-E2E-{NNN} code traced to a spec, structured with the Page Object Model (locators/actions in the page class, assertions in the test).:nth-child, and XPath.e2e-runner sub-agent for generation and baseline updates.Workflow:
Key Rules:
file:line), confidence >80% to act.BEFORE ANY E2E WORK, you MUST ATTENTION:
# 1. Read project-specific E2E patterns (REQUIRED)
head -100 docs/project-reference/e2e-test-reference.md
# 2. Read project config for framework, paths, commands
grep -A 50 '"e2eTesting"' docs/project-config.json
# 3. Find TC codes you need to implement
grep -r "TC-.*-E2E-" docs/specs/ docs/specs/
The e2eTesting section in docs/project-config.json contains:
When investigating/fixing E2E failures, update docs/project-reference/e2e-test-reference.md with learnings.
docs/project-reference/domain-entities-reference.md — Domain entity catalog, relationships, cross-service sync (read when task involves business entities/models)Detect the project's E2E stack before generating tests:
# Use project config, project-reference docs, and existing test config files as the source of truth
rg "playwright|cypress|selenium|webdriver|e2e" docs/project-config.json docs/project-reference/ . 2>/dev/null
rg --files | rg "(playwright|cypress|webdriver|selenium|e2e|test).*config|manifest|project"
| Framework | Config Source | Test Naming | Run Command |
|---|---|---|---|
| Configured E2E framework | project config/reference docs | existing local examples | configured test command |
| Mode | Input | Output |
|---|---|---|
from-recording | Recording JSON + feature | Test spec + page object |
update-ui | Git diff of UI changes | Updated screenshot baselines |
from-changes | Changed test specs or code | Updated test implementations |
from-spec | TC codes from test specs | New tests matching specs |
The success metric of every coding decision is future change cost. DRY, SRP, abstraction, design patterns, naming, layering, tests — every technique exists to serve one goal: making the next change cheaper.
Evaluating code, refactor, test, abstraction, ask: does this make next change cheaper or more expensive?
Apply this lens before invoking any specific rule, pattern, checklist below — if downstream rule would raise change cost, this principle wins.
Every E2E test MUST ATTENTION have:
TC-{MODULE}-E2E-{NNN}// TypeScript
test('TC-RT-E2E-001: Submit return request', async () => { ... });
Use repository's configured test-case annotation mechanism for non-TypeScript E2E tests; NEVER invent a framework-specific marker.
Spec-Loop Discipline (E2E tier — tailored). Trace each E2E scenario to the §8 invariant/behavior it guards — name the protected business rule, not just the click path — so the scenario fails only when that intended behavior breaks (not on cosmetic UI churn). Any coverage gap you find (an §8 behavior with no E2E scenario, or an E2E flow guarding no documented behavior) feeds the Dual-Feedback half into BOTH the spec (the missing/changed behavior) AND the tests — never a test-only fix. Scoped N/A: property/metamorphic generation and the MUTATION-SCORE assertion gate are scoped to unit/integration core-logic; they do NOT apply at the E2E tier — do not force them here.
All frameworks use Page Object pattern:
.block__element), component classes[data-testid], [data-cy], [data-test]role=button, aria-labelAVOID: Generated classes (.ng-star-inserted, .MuiButton-root), positional selectors (:nth-child), XPath
Tests MUST generate unique data to be repeatable:
Document what must exist before test runs:
Report:
MANDATORY: E2E test generation and baseline updates spawn
e2e-runnersub-agent (agent_type: "e2e-runner"), NOT the main agent directly. Rationale:e2e-runnerauto-detects the project's E2E stack, maintains test-to-spec TC traceability, and handles visual baseline updates across Playwright, Selenium, Cypress, and other frameworks.
Spawn e2e-runner sub-agent for:
TC-{MODULE}-E2E-{NNN}) in test implementationsMANDATORY IMPORTANT MUST ATTENTION — NO EXCEPTIONS: If you are NOT already in a workflow, you MUST ATTENTION use a direct user question to ask the user. Do NOT judge task complexity or decide this is "simple enough to skip" — the user decides whether to use a workflow, not you:
- Activate
e2e --source=changesworkflow (Recommended) — scout → e2e-test → test → watzup- Execute
$e2e-testdirectly — run this skill standalone
Category: [Testing] Trigger: e2e test, e2e from recording, generate e2e, playwright test, cypress test, selenium test, webdriver, puppeteer
Generate and maintain E2E tests using project's configured testing framework.
docs/specs/ — Test specifications by module (read existing TCs for E2E scenario coverage; match TC codes to E2E test implementations)Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).
Sub-Agent Selection — Full routing contract:
.claude/skills/shared/sub-agent-selection-guide.mdRule: Route specialized domains (architecture, security, performance, DB, E2E, integration-test, git) to the matching specialist agent (see guide above) — NEVER usecode-reviewerfor these. — why:code-reviewerlacks each domain's checklist, so specialized issues slip through.
Source/test drift check. For coding, fix, debug, investigation, test, or review work: when source behavior changes, inspect affected unit/integration/E2E tests and decide from evidence whether tests should change to match intended behavior or the source change is an unintended bug to fix. Do not write tests for migration code; schema/data migrations are one-time execution paths, not core application logic.
AI Mistake Prevention — Failure modes to avoid on every task:
Re-read files after context changes. Context compaction, resume, or long-running work can make memory stale; verify current files before acting. Verify generated content against source evidence. AI hallucinates APIs, names, claims, and document facts. Check the relevant source before documenting or referencing. Check downstream references before deleting or renaming. Removing an artifact can stale docs, generated mirrors, configs, and callers; map references first. Trace the full impact chain after edits. Changing a definition can miss derived outputs and consumers. Follow the affected chain before declaring done. Verify ALL affected outputs, not just the first. One green check is not all green checks; validate every output surface the change can affect. Assume existing values are intentional — ask WHY before changing. Before changing a constant, limit, flag, wording, or pattern, read nearby context and history. Surface ambiguity before acting — don't pick silently. Multiple valid interpretations require an explicit question or stated assumption with risk. Keep shared guidance role-relevant. Universal guidance must help every receiving skill or agent; code-specific obligations belong only in code-specific protocols.
Critical Thinking Mindset — Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence >80% to act. Anti-hallucination: Never present guess as fact — cite sources for every claim, admit uncertainty freely, self-check output for errors, cross-reference independently, stay skeptical of own confidence — certainty without evidence root of all hallucination.
MUST ATTENTION apply critical + sequential thinking — every claim needs appropriate traced evidence (file:line for repo/code claims; source URL or artifact section for research, product, content, and docs claims); confidence >80% to act, <60% DO NOT recommend. Anti-hallucination: never present guess as fact, admit uncertainty freely, cross-reference independently, stay skeptical of own confidence.
MUST ATTENTION apply AI mistake prevention — verify generated content against evidence, trace downstream references before deleting or renaming, verify all affected outputs, re-read files after context loss, and surface ambiguity before acting.
IMPORTANT MUST ATTENTION follow declared step order for this skill; NEVER skip, reorder, or merge steps without explicit user approval
IMPORTANT MUST ATTENTION for every step/sub-skill call: set in_progress before execution, set completed after execution
IMPORTANT MUST ATTENTION every skipped step MUST include explicit reason; every completed step MUST include concise evidence
IMPORTANT MUST ATTENTION if Task tools unavailable, maintain an equivalent step-by-step plan tracker with synchronized statuses
IMPORTANT MUST ATTENTION Goal: Produce maintainable, spec-traceable E2E tests (TC-{MODULE}-E2E-{NNN}) that protect business behavior using the project's configured framework — so future UI changes break tests only when intended behavior breaks.
IMPORTANT MUST ATTENTION — Protocols in force (concise digest of the SYNC/shared blocks this skill carries):
code-reviewer.file:line proof per claim, confidence >80% to act, NEVER guess as fact.IMPORTANT MUST ATTENTION read docs/project-reference/e2e-test-reference.md + the e2eTesting block of docs/project-config.json FIRST, then detect the framework from project files — NEVER assume a stack — why: the configured framework, paths, run commands, and TC format are project-specific, not framework defaults.
IMPORTANT MUST ATTENTION cite file:line evidence for every claim (confidence >80% to act, <60% DO NOT recommend) — NEVER speculate without proof.
MANDATORY IMPORTANT MUST ATTENTION break work into small todo tasks using task tracking BEFORE starting; mark one in_progress, set completed immediately after each finishes; add a final review todo.
MANDATORY IMPORTANT MUST ATTENTION search the codebase for 3+ similar existing E2E tests/page objects before creating new code; follow the local pattern over generic framework docs — why: projects carry local selector/data conventions that differ from defaults.
IMPORTANT MUST ATTENTION evaluate fit before copying a nearby test — verify the new scenario shares the same base page class, fixtures, and preconditions — why: closest example ≠ matching preconditions.
MANDATORY IMPORTANT MUST ATTENTION every E2E test carries its TC-{MODULE}-E2E-{NNN} code traced to the §8 invariant/behavior it guards — name the protected business rule, not just the click path — so it fails on intended-behavior breaks, not cosmetic UI churn.
IMPORTANT MUST ATTENTION use the repository's configured test-case annotation mechanism — NEVER invent a framework-specific marker.
MANDATORY IMPORTANT MUST ATTENTION selector priority semantic/BEM > data-testid > ARIA/role > visible text; NEVER use generated classes (.ng-star-inserted, .MuiButton-root), positional selectors (:nth-child), or XPath — why: generated/positional selectors break on unrelated markup churn.
MANDATORY IMPORTANT MUST ATTENTION keep locators/actions in the Page Object class, assertions in the test file — why: encapsulation keeps the next UI change a one-place edit.
MANDATORY IMPORTANT MUST ATTENTION generate unique self-sufficient data (GUID/timestamp); NEVER depend on specific pre-existing DB state and NEVER tear down seeded data — why: teardown across shared/parallel runs creates side effects.
IMPORTANT MUST ATTENTION spawn the e2e-runner sub-agent (agent_type: "e2e-runner") for E2E generation and visual baseline updates — NEVER drive them from the main agent — why: e2e-runner carries the stack auto-detection and TC-traceability knowledge.
IMPORTANT MUST ATTENTION any coverage gap (a §8 behavior with no scenario, or a flow guarding no documented behavior) feeds BOTH the spec AND the tests — NEVER a test-only fix; property/metamorphic generation and MUTATION-SCORE gates are scoped to unit/integration, N/A at the E2E tier.
IMPORTANT MUST ATTENTION update docs/project-reference/e2e-test-reference.md with learnings when investigating/fixing E2E failures.
MANDATORY IMPORTANT MUST ATTENTION add a final review todo task to verify work quality.
Anti-Rationalization:
| Evasion | Rebuttal |
|---|---|
| "I know the framework, skip the reference" | Read e2eTesting config + reference FIRST — stack/paths/TC format are project-specific. |
| "data-testid is everywhere, just use it" | Honor the priority — semantic/BEM > data-testid > ARIA > text; show the selector you rejected. |
"This selector is faster via :nth-child" | Positional/generated selectors break on unrelated churn. Use a semantic/data anchor. |
| "I'll clean up the data after the run" | NEVER tear down seeded data — teardown breaks parallel/repeat runs. Leave it in place. |
| "Test passes, traceability is bookkeeping" | No TC code traced to a §8 behavior = no bug protection. Name the rule the scenario guards. |
| "Just generate the test inline, it's quick" | Spawn e2e-runner — it owns stack detection, TC traceability, and baseline updates. |
Closing reminder — Easy to Change is the success metric. Every finding, test, refactor, and abstraction must answer one question: does this make the next change cheaper or more expensive? If it doesn't reduce future change cost, reject it. Coupling, hidden state, duplicated knowledge, and unclear intent are the real enemies — call them out by name.
IMPORTANT MUST ATTENTION read e2eTesting config + e2e-test-reference.md FIRST and detect the framework — NEVER assume a stack.
IMPORTANT MUST ATTENTION every test carries its TC-{MODULE}-E2E-{NNN} code traced to the §8 behavior it guards; selector priority semantic > data-attr > ARIA > text — NEVER generated/positional/XPath.
IMPORTANT MUST ATTENTION generate unique self-sufficient data, NEVER tear down seeded data; spawn e2e-runner for generation and baseline updates.
Source: .claude/.ck.json + .claude/skills/shared/sync-inline-versions.md (:full blocks) + .claude/scripts/lib/hookless-prompt-protocol.cjs
Generic portability boundary: Reusable skills and protocol text stay project-neutral; project-specific conventions are discovered from docs/project-config.json and docs/project-reference/. Apply shared AI-SDD from shared/sdd-artifact-contract.md. Read docs/project-config.json and docs/project-reference/docs-index-reference.md, then open the project reference docs named there. For spec, test-case, behavior-change, public-contract, or docs/specs/ work, route through the local spec docs named by the docs index: feature-spec-reference.md, spec-system-reference.md, spec-principles.md, and workflow-spec-test-code-cycle-reference.md when specs/tests/code must stay synchronized. If either file or a required reference doc is missing or stale, auto-run $project-init (or the narrow lower-level route such as $project-config, $docs-init, $scan-all, or $scan --target=<key>) before ordinary project-specific work. Any supported AI tool may execute when this shared context and local docs are available.
$start-workflow <workflowId>; for a selected skill, invoke that skill; for a custom workflow, sequence custom steps directly; for direct execution, proceed with the task.Source: .claude/skills/shared/sync-inline-versions.md
AI-SDD Artifact Contract — Shared spec-driven development rules stay portable and source-owned.
- Keep reusable AI-SDD principles in
.claude; put repository-specific paths, commands, owners, products, and formats in project config/reference docs.- Preserve cycle:
spec -> plan -> tasks -> implement -> verify -> update spec/docs.- Trace every requirement or invariant through decision, task, TC/test, source evidence, and docs/spec update.
- Treat code-to-spec extraction as reference-only until accepted by the canonical spec owner.
- Any supported AI tool may plan, implement, review, or verify with synced context; using multiple tools is optional.
- Update
.claudesource first, then sync generated mirrors; do not manually edit.agents,.codex, orAGENTS.md. — why: mirrors are generated artifacts; hand-edits are overwritten on the next sync- If
docs/project-config.json, root instruction files, or a required project-reference doc is missing or stale, auto-run$project-initor the narrow lower-level route before ordinary project-specific work.Active reference:
shared/sdd-artifact-contract.mdin the active skills root.
shared/sdd-artifact-contract.md; keep reusable AI-SDD in .claude and local rules in project docs..claude source before syncing generated mirrors; do not manually edit .agents, .codex, or AGENTS.md.$project-init or the narrow setup route automatically.
[TASK-PLANNING] [MANDATORY] BEFORE executing any workflow or skill step, create/update task tracking for all planned steps, then keep it synchronized as each step starts/completes.Break work into small tasks (task tracking) before starting. Add final task: "Analyze AI mistakes & lessons learned".
Extract lessons — ROOT CAUSE ONLY, not symptom fixes:
$learn.$code-review/$code-simplifier/$security-review/$lint catch this?" — Yes → improve review skill instead.$learn.
[CRITICAL-THINKING-MINDSET] Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence >80% to act.
Anti-hallucination principle: Never present guess as fact — cite sources for every claim, admit uncertainty freely, self-check output for errors, cross-reference independently, stay skeptical of own confidence — certainty without evidence root of all hallucination.
AI Attention principle (Primacy-Recency): Put the 3 most critical rules at both top and bottom of long prompts/protocols so instruction adherence survives long context windows.
Goal-driven execution: Define success criteria first, loop until verified, and stop only when observable checks pass.
Tests verify intent: Tests must protect business rules/invariants and fail when the protected intent breaks, not only mirror current behavior.$start-workflow <workflowId>. NEVER answer or write code before checking. Skip = protocol violation.