playwright-e2e-testing
Automated end-to-end testing with comprehensive evidence collection using Playwright MCP tools. Use when you need to test user flows, validate workflows, run E2E tests, verify application behavior, or collect evidence for bug reports. Triggers on "test the user flow", "run E2E test", "validate the workflow", "automated testing", "test this feature", or "check if this works". Works with web applications, forms, SPAs, and any browser-based interfaces.
What this skill does
# Playwright E2E Testing
## Quick Start
Test a login flow with evidence collection:
```
You: "Test the login flow at http://localhost:3000"
Claude: [Runs E2E test with]:
1. Initial state capture (snapshot + screenshot)
2. Form interaction (username/password)
3. Console error monitoring
4. Network request verification
5. Final state capture
6. Comprehensive test report
```
**Result:** Complete test report with screenshots, console logs, network activity, and pass/fail status.
## Table of Contents
1. When to Use This Skill
2. What This Skill Does
3. E2E Testing Workflow
3.1. Initial State Capture
3.2. Test Execution
3.3. Evidence Collection
3.4. Final Verification
3.5. Report Generation
4. Common Test Scenarios
5. Supporting Files
6. Expected Outcomes
7. Requirements
8. Red Flags to Avoid
## When to Use This Skill
### Explicit Triggers
- "Test the user flow for [feature]"
- "Run E2E test on [URL]"
- "Validate the [workflow/form/checkout] process"
- "Check if [feature] works end-to-end"
- "Automated testing for [scenario]"
- "Verify [user journey]"
### Implicit Triggers
- Need to validate multi-step workflows (login, checkout, signup)
- Regression testing after changes
- Collecting evidence for bug reports
- Verifying form submissions work correctly
- Testing SPA navigation and state changes
- Validating API interactions from browser
### Debugging Triggers
- "Why is [feature] not working?"
- "Check console for errors during [action]"
- "Monitor network requests during [workflow]"
- "Capture evidence of [bug]"
## What This Skill Does
This skill standardizes end-to-end testing with comprehensive evidence collection:
1. **State Capture** - Takes snapshots and screenshots before and after tests
2. **Interaction Execution** - Fills forms, clicks buttons, navigates pages
3. **Error Monitoring** - Watches console for errors and warnings
4. **Network Verification** - Tracks API calls and responses
5. **Evidence Collection** - Generates reports with all artifacts
6. **Pass/Fail Determination** - Validates expected outcomes
## E2E Testing Workflow
### 3.1. Initial State Capture
**Purpose:** Establish baseline before test execution
```
Step 1: Navigate to application
browser_navigate(url="http://localhost:3000")
Step 2: Wait for page load
browser_wait_for(time=2)
Step 3: Capture accessibility snapshot
browser_snapshot()
→ Save as "initial-state.md"
Step 4: Take screenshot
browser_take_screenshot(filename="initial-state.png")
```
**Why this matters:** Initial state provides context for test failures and debugging.
### 3.2. Test Execution
**Purpose:** Execute user interactions systematically
```
Step 1: Identify form elements
browser_snapshot()
→ Find refs for input fields
Step 2: Fill form fields
browser_fill_form(fields=[
{name: "Email", ref: "ref_5", type: "textbox", value: "[email protected]"},
{name: "Password", ref: "ref_6", type: "textbox", value: "password123"}
])
Step 3: Submit form
browser_click(element="Login button", ref="ref_7")
Step 4: Wait for response
browser_wait_for(text="Welcome")
```
**Pattern:** Snapshot → Identify refs → Interact → Verify
### 3.3. Evidence Collection
**Purpose:** Gather diagnostic information during test
```
Step 1: Check console messages
browser_console_messages(level="error")
→ Capture any errors/warnings
Step 2: Monitor network requests
browser_network_requests()
→ Verify API calls succeeded
Step 3: Capture intermediate states
browser_take_screenshot(filename="step-2-after-login.png")
```
**Evidence types:**
- Console logs (errors, warnings, info)
- Network requests (status codes, URLs, timing)
- Screenshots (visual confirmation)
- Accessibility snapshots (DOM state)
### 3.4. Final Verification
**Purpose:** Validate test success criteria
```
Step 1: Verify expected elements
browser_snapshot()
→ Check for success indicators
Step 2: Capture final state
browser_take_screenshot(filename="final-state.png")
Step 3: Check for errors
browser_console_messages(level="error")
→ Ensure no errors during workflow
```
**Success criteria:**
- Expected text/elements present
- No console errors
- Network requests succeeded (2xx status codes)
- Final state matches expectations
### 3.5. Report Generation
**Purpose:** Create comprehensive test documentation
```
Use scripts/generate_test_report.py:
python scripts/generate_test_report.py \
--test-name "Login Flow" \
--initial-snapshot initial-state.md \
--final-snapshot final-state.md \
--screenshots initial-state.png,final-state.png \
--console-logs console.json \
--network-requests network.json \
--output test-report.md
```
**Report includes:**
- Test metadata (name, URL, timestamp)
- Pass/fail status with reasoning
- Console error summary
- Network request summary
- Screenshot gallery
- Accessibility snapshots
- Recommendations for failures
See `references/report-template.md` for structure.
## Common Test Scenarios
**Login Flow:** Navigate → Capture state → Fill credentials → Submit → Wait for success → Verify console/network → Capture final state → Report
**Form Submission:** Navigate → Capture state → Fill fields → Submit → Wait for confirmation → Verify POST request → Check validation → Capture state → Report
**Multi-Step Checkout:** Add to cart → Checkout → Fill shipping/payment (capture each) → Submit order → Verify confirmation → Check all APIs → Report
**SPA Navigation:** Navigate → Click nav links → Verify URL changes → Check content updates → Monitor console/network → Capture states → Report
See `examples/examples.md` for 10+ detailed scenarios with complete code.
## Supporting Files
**scripts/** - `generate_test_report.py` (creates markdown reports), `setup_test_env.py` (initializes directories)
**references/** - `report-template.md` (report structure), `troubleshooting.md` (common issues/solutions)
**examples/** - `examples.md` (10+ complete test scenarios with code)
## Expected Outcomes
### Successful Test
```
✅ Test Passed: Login Flow
Test Summary:
- URL: http://localhost:3000/login
- Duration: 5.2 seconds
- Steps: 4
- Console Errors: 0
- Network Failures: 0
Evidence:
- Initial state: initial-state.png
- Final state: final-state.png
- Accessibility snapshots: 2
- Network requests: 3 (all 200 OK)
Verification:
✅ "Welcome, User" text found
✅ No console errors
✅ POST /api/login returned 200
✅ Dashboard loaded successfully
Full report: test-reports/login-flow-2025-12-20.md
```
### Failed Test
```
❌ Test Failed: Login Flow
Test Summary:
- URL: http://localhost:3000/login
- Duration: 3.1 seconds (stopped early)
- Steps: 2 of 4 completed
- Console Errors: 2
- Network Failures: 1
Failure Reason:
Network request POST /api/login returned 401 Unauthorized
Console Errors:
1. [Error] Authentication failed: Invalid credentials
2. [Error] Uncaught TypeError: Cannot read property 'token' of undefined
Evidence:
- Initial state: initial-state.png
- Error state: error-state.png
- Network log: network.json
Recommendations:
1. Check API endpoint credentials
2. Verify authentication token handling
3. Add error handling for failed login attempts
Full report: test-reports/login-flow-failed-2025-12-20.md
```
## Requirements
**Tools:**
- Playwright MCP tools (browser_navigate, browser_snapshot, etc.)
- Python 3.8+ (for report generation scripts)
- Write access to test output directory
**Environment:**
- Application running and accessible (local or remote)
- Network connectivity for API calls
- Sufficient disk space for screenshots
**Knowledge:**
- Basic understanding of web application flows
- Familiarity with CSS selectors or accessibility roles
- Understanding of HTTP status codes
## Red Flags to Avoid
**Testing Anti-Patterns:**
- [ ] Starting test without capturing initial state
- [ ] Ignoring console errors during test execution
- [ ] Not verifying network requests succeeded
- [ ] Skipping final state capture
- [ ] Proceeding with test after clear faRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.