playwright
Playwright MCP usage rules, screenshots, code sandbox, Chrome data. Auto-invoke when using Playwright MCP tools.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Playwright MCP usage rules, screenshots, code sandbox, Chrome data. Auto-invoke when using Playwright MCP tools.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
MSW 2 (Mock Service Worker) mocking in Svelte: Storybook, Vitest browser tests, SvelteKit dev/SSR. Use when writing handlers or fixtures, when a story renders blank or errors Failed to fetch, or when migrating msw-storybook-addon v2 to v3.
Vitest test.projects, browser mode with playwright(), optimizeDeps, separate vitest.config from vite.config. Use when editing vitest config, debugging flaky browser tests, upgrading @vitest/*, or splitting node vs browser projects.
Svelte CSF (@storybook/addon-svelte-csf) + @storybook/addon-vitest: .stories.svelte as Vitest browser tests with play functions and tags. Use when wiring or debugging Svelte Storybook tests in Vitest/CI, not for React/Vue/CSF3 .ts story files.
Validation discipline for all code changes, testing, baselines, browser checks, CSS screenshots. Auto-invoke whenever making code changes, running tests, or declaring a task done.
Storybook workflow, MCP tools, fixtures, CSS import chains. Auto-invoke when working with Storybook stories or components.
Fix and create Svelte 5 tests with vitest-browser-svelte and Playwright. Use when fixing broken tests, debugging failures, writing unit/SSR/e2e tests, or working with vitest/Playwright.
استنادا إلى تصنيف SOC المهني
| name | playwright |
| description | Playwright MCP usage rules, screenshots, code sandbox, Chrome data. Auto-invoke when using Playwright MCP tools. |
| user-invocable | true |
filename with /tmp/ path. NEVER relative paths. NEVER save to the project directory. Every ad-hoc screenshot filename MUST start with /tmp/. Example: /tmp/tabs-before.png. Saving screenshots without /tmp/ prefix pollutes the project with untracked files. This applies to screenshots YOU take for debugging/verification: NOT to automated test screenshots, which follow their own conventions (e.g. tests/**/screenshots/).run_code sandbox: use page.waitForTimeout(ms), never setTimeout.mcp-chrome-*). It has auth cookies.browser_evaluate to measure actual element positions, sizes, and computed styles. Compare measured values against expected values. A 5-minute investigation with JS measurements beats hours of blind CSS tweaking. NEVER change formulas or constants without first understanding WHY the current values produce wrong results.browser_evaluate to MEASURE, not just screenshot. When debugging layout issues, use JS to read actual getBoundingClientRect() positions, getComputedStyle() values, scrollHeight, clientWidth etc. Comparing measured numbers reveals the root cause instantly: screenshots only show symptoms. This is the difference between 5 minutes of investigation and hours of blind guessing.frontend:pixel-perfect. It has the mandatory measurement workflow: measure BEFORE with browser_evaluate, apply change, measure AFTER, report a diff table. Screenshots supplement measurements: they are NOT the comparison. The numbers from getBoundingClientRect() and getComputedStyle() ARE the comparison. Never claim "looks the same" from eyeballing screenshots.browser_evaluate to read errors or check the console log file from the navigation event. A page that renders but throws console errors is NOT working. Console errors are bugs until proven otherwise.