design-e2e
Skill2 starsChanged 12 days agoMITView on GitHub
Design and execute Playwright E2E test cases from epic/story acceptance criteria. Generates test specs and runs them.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- claude-docsSkill
- create-agentSkill
- create-commandSkill
- create-skillSkill
- demoSkill
- execute-e2e-testsSkill
- fix-github-issueSkill
- telegramSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 7 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
If no $ARGUMENTS: ask what epic or story to target.
- Very specific: line 35
Read ${CLAUDE_SKILL_DIR}/generation-rules.md for detailed test design methodology.
- Distinctive: line 40
If target is an epic: extract ALL stories and their acceptance criteria
- Distinctive: line 41
If target is a story: extract that single story's acceptance criteria
- Distinctive: line 58
Ask: "Approve, edit, or cancel?"
- Distinctive: line 65
Use Playwright MCP to explore the app UI and validate selectors
- Very specific: line 66
Run the generated tests: npx playwright test <spec-file>
- Very specific: line 71
If Phase 4 reports test failures, launch a general-purpose agent with the prompt from ${CLAUDE_SKILL_DIR}/bugfix-prompt.md, substituting:
- Very specific: line 85
If TESTS_PASSING: false after the bugfix agent — allow one more iteration (max 2 total).
- Very specific: line 89
Update tests/e2e/TEST-INVENTORY.md and tests/e2e/TEST-RESULTS.md
- Distinctive: line 91
If bugfix loop ran: include bugs found, GH issues created/closed, fixes applied
- Distinctive: line 95
Every acceptance criterion MUST map to at least one test assertion
- Very specific: line 96
Prefer getByRole, getByText, getByTestId locators over CSS selectors
- Distinctive: line 98
Use Playwright MCP to explore UI before writing selectors
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
You are a senior QA test architect who designs comprehensive E2E test suites from story acceptance criteria and executes them with Playwright.
Project Context
Stories:
!ls docs/stories/epic-*.md 2>/dev/null || ls stories/epic-*.md 2>/dev/null || echo "No epic files found"
Existing E2E tests:
!find . -path "*/e2e/*.spec.*" -o -path "*/tests/*.spec.*" 2>/dev/null | head -20 || echo "No E2E test files found"
Playwright config:
!ls playwright.config.{ts,js} 2>/dev/null || echo "No Playwright config found"
Argument Parsing
Parse $ARGUMENTS for:
- Target:
epic-NN(all stories in epic) orstory-id(single story, e.g.,01.2-003) - Flags:
--design-only— generate test plan and spec files but do not execute--run-only— run existing test specs without redesigning
If no $ARGUMENTS: ask what epic or story to target.
Execution Flow
Read ${CLAUDE_SKILL_DIR}/generation-rules.md for detailed test design methodology.
Phase 1: Extract Acceptance Criteria (DIRECT)
- Locate the epic file (e.g.,
stories/epic-01-*.mdordocs/stories/epic-01-*.md) - If target is an epic: extract ALL stories and their acceptance criteria
- If target is a story: extract that single story's acceptance criteria
- Parse each criterion into a testable assertion
Phase 2: Design Test Cases (AGENT)
Launch a qa-engineer agent with:
- The extracted acceptance criteria
- The test design rules from
${CLAUDE_SKILL_DIR}/generation-rules.md - Existing test inventory (if any)
- Instructions to produce a test plan + Playwright spec files
The agent returns: test plan summary and generated .spec.ts file contents.
Phase 3: Review & Write (DIRECT)
- Display the test plan: scenarios, expected assertions, file structure
- Display generated spec file contents
- Ask: "Approve, edit, or cancel?"
- On approve: write spec files to
tests/e2e/ - On edit: ask what to change, re-prompt the agent
Phase 4: Execute Tests (AGENT — skip if --design-only)
Launch a qa-engineer agent to:
- Use Playwright MCP to explore the app UI and validate selectors
- Run the generated tests:
npx playwright test <spec-file> - Capture results and return test output with pass/fail status per test
Phase 4b: Bugfix Loop (AGENT — runs if any tests failed)
If Phase 4 reports test failures, launch a general-purpose agent with the prompt from ${CLAUDE_SKILL_DIR}/bugfix-prompt.md, substituting:
{{TEST_FILE}}→ the failing spec file(s){{FAILED_TESTS}}→ list of failed test names{{FAILURE_OUTPUT}}→ test error output from Phase 4{{STORY_ID}}and{{STORY_TITLE}}→ from the target story (if single story)
The bugfix agent:
- Diagnoses each failure as CODE_BUG, TEST_BUG, or ENV_ISSUE
- For code bugs: creates a GitHub issue → fixes the code → retests → closes the issue if fixed
- For test bugs: fixes the test directly (no GH issue)
- For env issues: reports to user without creating an issue
Extract FIX_STATUS, ISSUE_NUMBER, BUGS_FIXED, and TESTS_PASSING from the result.
If TESTS_PASSING: false after the bugfix agent — allow one more iteration (max 2 total). If still failing, log the open issue(s) and continue to Phase 5.
Phase 5: Report (DIRECT)
- Update
tests/e2e/TEST-INVENTORY.mdandtests/e2e/TEST-RESULTS.md - Print summary: tests designed, passed, failed, coverage of acceptance criteria
- If bugfix loop ran: include bugs found, GH issues created/closed, fixes applied
Important Rules
- Every acceptance criterion MUST map to at least one test assertion
- Prefer
getByRole,getByText,getByTestIdlocators over CSS selectors - Tests must be independent — no shared state between specs
- Use Playwright MCP to explore UI before writing selectors
- Match project conventions (TypeScript vs JS, directory structure)
$ARGUMENTS
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

