sebasmzg/sebas.dot/playwright
Claude Code and agent skill by sebasmzg/sebas.dot
- community
Checking that the SKILL.md file is still in the repository.
Playwright E2E testing patterns. Trigger: When writing E2E tests - Page Objects, selectors, MCP workflow.
Install
npx vskill@latest install sebasmzg/sebas.dot/playwrightSKILL.md
The same SKILL.md was published earlier as sebasmzg/sebas.dot/playwright.
MCP Workflow (MANDATORY If Available)
⚠️ If you have Playwright MCP tools, ALWAYS use them BEFORE creating any test:
- Navigate to target page
- Take snapshot to see page structure and elements
- Interact with forms/elements to verify exact user flow
- Take screenshots to document expected states
- Verify page transitions through complete flow (loading, success, error)
- Document actual selectors from snapshots (use real refs and labels)
- Only after exploring create test code with verified selectors
If MCP NOT available: Proceed with test creation based on docs and code analysis.
Why This Matters:
- ✅ Precise tests - exact steps needed, no assumptions
- ✅ Accurate selectors - real DOM structure, not imagined
- ✅ Real flow validation - verify journey actually works
- ✅ Avoid over-engineering - minimal tests for what exists
- ✅ Prevent flaky tests - real exploration = stable tests
- ❌ Never assume how UI "should" work
File Structure
File Naming:
- ✅
sign-up.spec.ts(all sign-up tests) - ✅
sign-up-page.ts(page object) - ✅
sign-up.md(documentation) - ❌
sign-up-critical-path.spec.ts(WRONG - no separate files) - ❌
sign-up-validation.spec.ts(WRONG)
Selector Priority (REQUIRED)
Scope Detection (ASK IF AMBIGUOUS)
| User Says | Action | |
|---|---|---|
| "a test", "one test", "new test", "add test" | Create ONE test() in existing spec | |
| "comprehensive tests", "all tests", "test suite", "generate tests" | Create full suite |
Examples:
- "Create a test for user sign-up" → ONE test only
- "Generate E2E tests for login page" → Full suite
- "Add a test to verify form validation" → ONE test to existing spec
Page Object Pattern
Page Object Reuse (CRITICAL)
Always check existing page objects before creating new ones!
Guidelines:
- Check
tests/for existing page objects first - Import and reuse existing pages
- Create page objects only when page doesn't exist
- If test requires multiple pages, ensure all page objects exist (create if needed)
Refactoring Guidelines
Move to BasePage when:
- ✅ Navigation helpers used by multiple pages (
waitForPageLoad(),getCurrentUrl()) - ✅ Common UI interactions (notifications, modals, theme toggles)
- ✅ Verification patterns repeated across pages (
isVisible(),waitForVisible()) - ✅ Error handling that applies to all pages
- ✅ Screenshot utilities for debugging
Move to helpers.ts when:
- ✅ Test data generation (
generateUniqueEmail(),generateTestUser()) - ✅ Setup/teardown utilities (
createTestUser(),cleanupTestData()) - ✅ Custom assertions (
expectNotificationToContain()) - ✅ API helpers for test setup (
seedDatabase(),resetState()) - ✅ Time utilities (
waitForCondition(),retryAction())
Before (BAD):
After (GOOD):
Test Pattern with Tags
Tag Categories:
- Priority:
@critical,@high,@medium,@low - Type:
@e2e - Feature:
@signup,@signin,@dashboard - Test ID:
@SIGNUP-E2E-001,@LOGIN-E2E-002
Test Documentation Format ({page-name}.md)
Documentation Rules:
- ❌ NO general test running instructions
- ❌ NO file structure explanations
- ❌ NO code examples or tutorials
- ❌ NO troubleshooting sections
- ✅ Focus ONLY on specific test case
- ✅ Keep under 60 lines when possible
Commands
Keywords
playwright, e2e, testing, page object model, selectors, end-to-end, mcp
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.config/opencode/skill/playwright/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sebasmzg/sebas.dot/playwright)